:root {
  --bg: #0d1117;
  --card: #161b22;
  --card2: #1c2333;
  --primary: #4c8dff;
  --primary2: #3fb950;
  --accent: #a06bff;
  --text: #f0f6fc;
  --muted: #8b949e;
  --danger: #f85149;
  --gold: #d29922;
  --epic: #a06bff;
  --border: #2a3a4a;
  --radius: 18px;
  --streak: #f5a623;
  --warning: #e8b64c;

  --font-heading: 'Unbounded', sans-serif;
  --font-body: 'Onest', sans-serif;
  --font-h: var(--font-heading);
  --font-b: var(--font-body);

  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 18px;
  --text-xl: 24px;
  --text-2xl: 32px;
  --text-3xl: 42px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  --card-grad: linear-gradient(160deg, #1e2637 0%, #181e2c 100%);
  --card-glow: 0 4px 20px rgba(0,0,0,0.22);
  --card-inset: inset 0 1px 0 rgba(255,255,255,0.025);
  --card-shadow: var(--card-glow), var(--card-inset);
}
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
body { font-family:var(--font-body); background:var(--bg); color:var(--text); min-height:100vh; overflow-x:hidden; }

body::before {
  content:''; position:fixed; inset:0;
  background: radial-gradient(circle at 20% 10%, rgba(76,141,255,0.10) 0%, transparent 55%),
              radial-gradient(circle at 85% 90%, rgba(160,107,255,0.10) 0%, transparent 55%),
              radial-gradient(circle at 50% 50%, rgba(76,141,255,0.03) 0%, transparent 70%);
  pointer-events:none; z-index:0;
}

.screen { display:none; flex-direction:column; min-height:100vh; position:relative; z-index:1; }
.screen.active { display:flex; animation: fadeUp .3s ease; }
@keyframes fadeUp { from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:translateY(0)} }

.topbar {
  padding: var(--space-4) var(--space-4);
  display:flex; align-items:center; justify-content:space-between;
  background: transparent; border-bottom:none; flex-shrink:0;
  position:relative;
}
.topbar::after {
  content:'';
  position:absolute;
  left:0; right:0; bottom:0; height:1px;
  background: linear-gradient(90deg, transparent, rgba(76,141,255,0.18), transparent);
}
#s-topic .topbar {
  padding-top: max(24px, calc(env(safe-area-inset-top) + 8px));
  padding-bottom: var(--space-3);
}

.avatar {
  width:38px; height:38px; border-radius:50%;
  background:linear-gradient(135deg,var(--primary),var(--accent));
  display:flex; align-items:center; justify-content:center; font-size:20px;
  position:relative;
}
.avatar::after {
  content:''; position:absolute; inset:-6px; border-radius:50%;
  background: radial-gradient(circle, rgba(76,141,255,0.35) 0%, transparent 65%);
  pointer-events:none; z-index:-1;
}
.avatar svg { width:22px; height:22px; color:#fff; }
.username { font-family:var(--font-heading); font-size:var(--text-sm); font-weight:700; }
.sublabel { font-size:var(--text-xs); color:var(--muted); }
.streak {
  background: rgba(245,166,35,0.12); color: var(--streak);
  font-weight: 700; font-size: var(--text-xs);
  padding: var(--space-2) var(--space-3); border-radius: 20px;
  font-family: var(--font-heading);
  display: inline-flex; align-items: center; gap: 5px; line-height: 1;
  box-shadow: 0 0 18px rgba(245,166,35,0.18);
}
.streak svg { width: 14px; height: 14px; color: var(--streak); }

.scroll { flex:1; padding: var(--space-4); overflow-y:auto; display:flex; flex-direction:column; gap: var(--space-3); padding-bottom:88px; }
.scroll::-webkit-scrollbar { width:3px; }
.scroll::-webkit-scrollbar-thumb { background:#ffffff15; border-radius:8px; }

/* ── ВЫНЕСЕННЫЕ КЛАССЫ ── */
.info-card {
  background: var(--card-grad); border: none;
  border-radius: var(--radius); padding: var(--space-3) var(--space-4);
  box-shadow: var(--card-shadow);
}

.list-row {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3); margin: var(--space-1) 0;
  background: var(--card-grad); border-radius: 12px; border: none;
  border-left: 3px solid var(--muted); cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.02);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.list-row:hover { transform: translateX(2px); }
.list-row:active { transform: scale(0.99); }
.list-row--done { border-left-color: var(--primary2); }
.list-row--perfect { border-left-color: var(--gold); }
.list-row--current { border-left-color: var(--primary); }
.list-row--locked { border-left-color: var(--muted); opacity: 0.45; cursor: default; }

.status-badge {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.status-badge svg { width: 16px; height: 16px; color: #fff; }
.status-badge--done { background: var(--primary2); }
.status-badge--perfect { background: var(--gold); }
.status-badge--current { background: var(--primary); }
.status-badge--locked { background: var(--muted); }

.mini-progress {
  height: 3px; background: rgba(255,255,255,0.08); border-radius: 3px;
  margin-top: var(--space-2); overflow: hidden;
}
.mini-progress-fill { height: 100%; background: var(--primary2); border-radius: 3px; transition: width 0.4s ease; }
.mini-progress--weak .mini-progress-fill { background: linear-gradient(90deg, #5a6b85, #7a8ba5); }

.section-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-xs); font-weight: 600; font-family: var(--font-body);
}
.section-status--weak { color: var(--warning); }
.section-status--strong { color: var(--primary2); }
.section-status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0; position: relative; top: -1px;
}
.section-status-dot--weak { background: var(--warning); box-shadow: 0 0 8px rgba(232,182,76,0.55); }
.section-status-dot--strong { background: var(--primary2); box-shadow: 0 0 8px rgba(63,185,80,0.55); }

.section-title { font-family: var(--font-heading); font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-3); }

/* ── КНОПКИ ── */
.btn-primary, .btn-secondary, .btn-ghost {
  width: 100%; padding: var(--space-4); border-radius: var(--radius);
  font-family: var(--font-heading); font-size: var(--text-sm); font-weight: 700;
  cursor: pointer; transition: transform 0.15s ease, box-shadow 0.2s ease;
  text-align: center;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
}
.btn-primary:active, .btn-secondary:active, .btn-ghost:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; border: none;
  box-shadow: 0 6px 22px rgba(76,141,255,0.28), inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn-secondary { background: var(--card-grad); color: var(--muted); border: none; box-shadow: var(--card-shadow); }
.btn-ghost { background: transparent; border: none; color: var(--primary); }

.continue-card .btn-primary,
.continue-card .btn-secondary,
.continue-card .btn-ghost { width: auto; padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }

/* ── ПРАВДА/ЛОЖЬ v2 ── */
.true-false-buttons { display: flex !important; gap: var(--space-3); margin-top: var(--space-4); }

.true-false-btn {
  flex: 1; min-height: 96px; padding: 20px 12px; border-radius: 20px;
  font-family: var(--font-heading); font-size: 14px; font-weight: 700;
  letter-spacing: -0.01em; border: none; cursor: pointer;
  transition: all 0.18s cubic-bezier(.34,1.4,.64,1);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; position: relative; overflow: hidden;
}
.true-false-btn::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle at center, currentColor 0%, transparent 70%);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.true-false-btn:active { transform: scale(0.95); }
.true-false-btn:active::before { opacity: 0.15; }

.true-false-btn .tf-icon {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  transition: transform .25s cubic-bezier(.34,1.5,.64,1);
}
.true-false-btn .tf-icon svg { width: 24px; height: 24px; }

.true-false-btn.true-btn {
  background: linear-gradient(160deg, rgba(63,185,80,0.18), rgba(63,185,80,0.05));
  color: var(--primary2);
  box-shadow: 0 6px 20px rgba(63,185,80,0.15), inset 0 1px 0 rgba(255,255,255,0.06);
}
.true-false-btn.true-btn .tf-icon { background: rgba(63,185,80,0.2); box-shadow: 0 0 0 1px rgba(63,185,80,0.3); }

.true-false-btn.false-btn {
  background: linear-gradient(160deg, rgba(248,81,73,0.18), rgba(248,81,73,0.05));
  color: var(--danger);
  box-shadow: 0 6px 20px rgba(248,81,73,0.15), inset 0 1px 0 rgba(255,255,255,0.06);
}
.true-false-btn.false-btn .tf-icon { background: rgba(248,81,73,0.2); box-shadow: 0 0 0 1px rgba(248,81,73,0.3); }

.true-false-btn.correct-tf {
  background: linear-gradient(160deg, rgba(63,185,80,0.35), rgba(63,185,80,0.15));
  box-shadow: 0 0 0 3px rgba(63,185,80,0.25), 0 8px 28px rgba(63,185,80,0.35);
  animation: tfSuccess .5s ease-out;
}
.true-false-btn.correct-tf .tf-icon { background: var(--primary2); color: #fff; }
.true-false-btn.correct-tf .tf-icon svg { animation: iconPop .4s cubic-bezier(.34,1.5,.64,1); }

.true-false-btn.wrong-tf {
  background: linear-gradient(160deg, rgba(248,81,73,0.35), rgba(248,81,73,0.15));
  box-shadow: 0 0 0 3px rgba(248,81,73,0.25), 0 8px 28px rgba(248,81,73,0.35);
  animation: tfShake .4s ease-out;
}
.true-false-btn.wrong-tf .tf-icon { background: var(--danger); color: #fff; }
.true-false-btn:disabled { cursor: default; opacity: 0.9; }

@keyframes tfSuccess { 0%,100% { transform: scale(1); } 40% { transform: scale(1.05); } 70% { transform: scale(0.98); } }
@keyframes tfShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes iconPop { 0% { transform: scale(0); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }

.btn-primary svg, .btn-secondary svg, .btn-ghost svg, .true-false-btn svg {
  color: inherit; width: 18px; height: 18px; vertical-align: middle;
}

.xp-panel { background: var(--card-grad); border-radius:var(--radius); padding: var(--space-3) var(--space-4); display:flex; align-items:center; gap: var(--space-3); box-shadow: var(--card-shadow); }
.xp-icon { font-size:26px; }
.xp-bar { height:6px; background:#2d3a55; border-radius:8px; margin: var(--space-2) 0; overflow:hidden; }
.xp-fill { height:100%; background:linear-gradient(90deg,var(--primary),var(--accent)); border-radius:8px; }
.xp-stats { font-size:var(--text-xs); color:var(--muted); }
.xp-title { font-weight:600; font-size:var(--text-base); }

.actions { display:flex; gap: var(--space-3); }
.btn { flex:1; padding: var(--space-3) var(--space-2); border-radius:var(--radius); background: var(--card-grad); border:none; display:flex; flex-direction:column; align-items:center; gap: var(--space-1); color:var(--text); font-weight:600; font-size:var(--text-xs); cursor:pointer; transition:transform .15s; box-shadow: var(--card-shadow); }
.btn:active { transform:scale(.97); }
.btn.primary { background:linear-gradient(135deg,var(--primary),#3b6fd9); border:none; box-shadow:0 6px 18px rgba(76,141,255,0.2); }
.btn.accent { background:linear-gradient(135deg,var(--primary2),#2d8a3e); border:none; box-shadow:0 6px 18px #3fb95025; }
.btn-icon { font-size:24px; }

.grid { display:grid; grid-template-columns:1fr 1fr; gap: var(--space-3); }
.grid-item { background: var(--card-grad); border-radius:var(--radius); padding: var(--space-3); border:none; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap: var(--space-2); color:#c0c8d0; font-size:var(--text-xs); font-weight:500; text-align:center; transition:.15s; box-shadow: var(--card-shadow); }
.grid-item:active { background: #253544; }

.sec-title { font-family: var(--font-heading); font-size: var(--text-base); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.back-link { color:var(--primary); font-size:var(--text-sm); font-weight:500; cursor:pointer; display:inline-flex; align-items:center; gap: var(--space-1); }

.topic-list { display:flex; flex-direction:column; gap: var(--space-2); }
.topic-item { background: var(--card-grad); border-radius:var(--radius); padding: var(--space-3) var(--space-4); border:none; cursor:pointer; font-size:var(--text-sm); color:#c0c8d0; transition:.15s; box-shadow: var(--card-shadow); }
.topic-item:active { background:#253544; }

/* ── AI PANEL ── */
.ai-panel { background:linear-gradient(135deg,#0f1e35,#0d1f2d); border:none; border-radius:var(--radius); overflow:hidden; box-shadow: 0 8px 28px rgba(0,0,0,0.3); }
.ai-header { display:flex; align-items:center; justify-content:space-between; padding: var(--space-3) var(--space-4); background:rgba(76,141,255,0.04); border-bottom:1px solid rgba(76,141,255,0.12); cursor:pointer; }
.ai-header-left { display:flex; align-items:center; gap: var(--space-3); }
.ai-avatar { width:32px; height:32px; border-radius:10px; background:linear-gradient(135deg,var(--primary),var(--accent)); display:flex; align-items:center; justify-content:center; font-size:16px; }
.ai-name { font-size:var(--text-sm); font-weight:700; color:var(--primary); }
.ai-tagline { font-size:var(--text-xs); color:var(--muted); }
.ai-toggle { font-size:var(--text-lg); color:var(--muted); transition:transform .3s; }
.ai-toggle.open { transform:rotate(180deg); }

.ai-body { padding: var(--space-3); display:none; flex-direction:column; gap: var(--space-3); }
.ai-body.open { display:flex; animation: fadeUp .25s ease; }

.ai-prompts { display:flex; flex-wrap:wrap; gap: var(--space-2); }
.ai-prompt-btn { background:rgba(76,141,255,0.08); border:1px solid rgba(76,141,255,0.25); border-radius:20px; padding: var(--space-2) var(--space-3); font-size:var(--text-xs); color:var(--primary); cursor:pointer; font-family:var(--font-body); transition:.15s; }
.ai-prompt-btn:active { background:rgba(76,141,255,0.2); }

.ai-messages { display:flex; flex-direction:column; gap: var(--space-2); max-height:220px; overflow-y:auto; padding-right: var(--space-1); }
.ai-messages::-webkit-scrollbar { width:2px; }
.ai-messages::-webkit-scrollbar-thumb { background:#ffffff15; }

.msg { padding: var(--space-3) var(--space-3); border-radius:12px; font-size:var(--text-sm); line-height:1.55; max-width:92%; }
.msg.user { background:rgba(76,141,255,0.15); border:1px solid rgba(76,141,255,0.28); align-self:flex-end; color:var(--text); }
.msg.ai { background: var(--card-grad); border:none; align-self:flex-start; color:#c8d8e8; box-shadow: var(--card-shadow); }
.msg.loading { color:var(--muted); font-style:italic; }

.ai-input-row { display:flex; gap: var(--space-2); align-items:flex-end; }
.ai-input { flex:1; background: var(--card-grad); border:1px solid rgba(76,141,255,0.22); border-radius:12px; padding: var(--space-3) var(--space-3); color:var(--text); font-family:var(--font-body); font-size:var(--text-sm); resize:none; min-height:40px; max-height:80px; outline:none; }
.ai-input:focus { border-color:rgba(76,141,255,0.5); }
.ai-input::placeholder { color:var(--muted); }
.ai-send { width:40px; height:40px; border-radius:12px; flex-shrink:0; background:linear-gradient(135deg,var(--primary),var(--accent)); border:none; color:#fff; font-size:var(--text-lg); cursor:pointer; display:flex; align-items:center; justify-content:center; transition:transform .15s; box-shadow: 0 4px 14px rgba(76,141,255,0.28); }
.ai-send:active { transform:scale(.93); }
.ai-send:disabled { opacity:.5; cursor:default; }
.ai-context { font-size:var(--text-xs); color:var(--muted); background: var(--card-grad); border:none; border-radius:8px; padding: var(--space-1) var(--space-2); }

/* ── QUIZ ── */
.quiz-wrap { flex:1; padding: var(--space-4); display:flex; flex-direction:column; gap: var(--space-3); padding-bottom: var(--space-6); overflow-y:auto; }
.quiz-wrap::-webkit-scrollbar { width:3px; }
.q-header { display:flex; justify-content:space-between; align-items:center; }
.q-progress { height:4px; background: var(--card2); border-radius:8px; overflow:hidden; }
.q-progress-fill { height:100%; background:linear-gradient(90deg,var(--primary),var(--accent)); transition:width .4s ease; }
.q-card { background: var(--card-grad); border:none; border-radius:var(--radius); padding: var(--space-4); box-shadow: var(--card-shadow); }
.q-tag { font-size:var(--text-xs); font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--primary); margin-bottom: var(--space-3); }
.q-text { font-size:var(--text-base); line-height:1.55; font-weight:500; font-family:var(--font-body); }
.answers { display:flex; flex-direction:column; gap: var(--space-2); }

.ans-btn {
  background: var(--card-grad); border: none; border-radius:14px;
  padding: var(--space-3) var(--space-3);
  display:flex; align-items:center; gap: var(--space-3);
  cursor:pointer; font-family:var(--font-body); font-size:var(--text-sm); color:var(--text);
  transition:.15s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.02);
  position: relative;
}
.ans-btn:active { transform:scale(.98); }
.ans-btn.correct {
  background: linear-gradient(160deg, rgba(63,185,80,0.14), rgba(63,185,80,0.05));
  box-shadow: 0 0 0 1.5px var(--primary2), 0 6px 20px rgba(63,185,80,0.22), inset 0 1px 0 rgba(255,255,255,0.04);
}
.ans-btn.wrong {
  background: linear-gradient(160deg, rgba(248,81,73,0.12), rgba(248,81,73,0.03));
  box-shadow: 0 0 0 1.5px var(--danger), 0 6px 20px rgba(248,81,73,0.22);
}
.ans-btn.fifty-hidden { opacity: .25; pointer-events: none; }
.ans-letter { width:26px; height:26px; border-radius:8px; background:#2a3a55; display:flex; align-items:center; justify-content:center; font-size:var(--text-xs); font-weight:700; flex-shrink:0; transition:.15s; }
.ans-btn.correct .ans-letter { background:var(--primary2); }
.ans-btn.wrong .ans-letter { background:var(--danger); }

.btn-next {
  width:100%; background:linear-gradient(135deg,var(--primary),var(--accent));
  color:#fff; border:none; border-radius:var(--radius);
  padding: var(--space-4);
  font-family:var(--font-heading); font-size:var(--text-sm); font-weight:700; cursor:pointer;
  display:none; transition:transform .15s; margin-top: var(--space-1);
  box-shadow: 0 6px 22px rgba(76,141,255,0.28), inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn-next.show { display:block; animation: fadeUp .3s ease; }
.btn-next:active { transform:scale(.97); }

#lesson-badge { font-family: var(--font-body); font-weight: 500; }

/* ── RESULT ── */
.result-wrap { flex:1; padding: 40px var(--space-6); display:flex; flex-direction:column; align-items:center; text-align:center; gap: var(--space-4); overflow-y:auto; padding-bottom: var(--space-8); }
.result-emoji { font-size:64px; animation: popIn .5s cubic-bezier(.34,1.56,.64,1); display:flex; align-items:center; justify-content:center; }
.result-emoji svg { width:64px; height:64px; }
@keyframes popIn { from{transform:scale(.3);opacity:0} to{transform:scale(1);opacity:1} }
.result-title { font-family:var(--font-heading); font-size:var(--text-xl); font-weight:800; letter-spacing:-.02em; }
.result-sub { font-size:var(--text-base); color:var(--muted); }

.ring-wrap { position:relative; width:130px; height:130px; }
.ring-wrap::before {
  content:''; position:absolute; inset:-16px; border-radius:50%;
  background: radial-gradient(circle, rgba(76,141,255,0.18) 0%, transparent 65%);
  pointer-events:none; z-index:0;
}
.ring-wrap svg { position:relative; z-index:1; transform:rotate(-90deg); }
.ring-bg { fill:none; stroke:var(--card2); stroke-width:10; }
.ring-fill { fill: none; stroke: url(#rg); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(0.34, 1.56, 0.64, 1); }
.ring-fill.glow { filter: drop-shadow(0 0 8px rgba(160,107,255,0.55)); }

#boss-ring-fill { stroke: #d29922; transition: stroke-dashoffset 1s cubic-bezier(0.34, 1.56, 0.64, 1); }
#boss-ring-fill.glow { filter: drop-shadow(0 0 8px rgba(210,153,34,0.55)); }

.ring-text { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; z-index:2; }
.ring-num { font-family:var(--font-heading); font-size:var(--text-2xl); font-weight:800; letter-spacing:-0.02em; }
.ring-denom { font-size:var(--text-xs); color:var(--muted); font-family:var(--font-body); }
.res-stats { display:grid; grid-template-columns:repeat(3,1fr); gap: var(--space-3); width:100%; }
.res-stat { background: var(--card-grad); border:none; border-radius:14px; padding: var(--space-3) var(--space-2); text-align:center; box-shadow: var(--card-shadow); }
.res-num { font-family:var(--font-heading); font-size:var(--text-lg); font-weight:800; letter-spacing:-0.01em; }
.res-num.g{color:var(--primary2)} .res-num.r{color:var(--danger)} .res-num.y{color:var(--gold)}
.res-label { font-size:var(--text-xs); color:var(--muted); margin-top: var(--space-1); font-family:var(--font-body); }
.res-btns { width:100%; display:flex; flex-direction:column; gap: var(--space-2); }

/* ── PATH ── */
.path-progress-card { background: var(--card-grad); border:none; border-radius:var(--radius); padding: var(--space-4); margin-bottom: var(--space-2); box-shadow: var(--card-shadow); }
.path-progress-top { display:flex; justify-content:space-between; align-items:center; margin-bottom: var(--space-3); }
.path-progress-label { font-size:var(--text-sm); font-weight:600; }
.path-progress-pct { font-family:var(--font-heading); font-size:var(--text-base); font-weight:800; color:var(--primary); }
.path-progress-bar { height:8px; background:#2d3a55; border-radius:8px; overflow:hidden; }
.path-progress-fill { height:100%; background:linear-gradient(90deg,var(--primary),var(--accent)); border-radius:8px; transition:width .5s ease; }

.continue-card {
  background: var(--card-grad); border:none; border-radius:var(--radius);
  padding: var(--space-4);
  display:flex; align-items:center; gap: var(--space-3); cursor:pointer;
  transition:transform .15s, box-shadow .2s;
  box-shadow: var(--card-shadow);
}
.continue-card:active { transform:scale(.98); }
.continue-icon { font-size:var(--text-2xl); flex-shrink:0; }
.continue-label { font-size:var(--text-xs); color:var(--primary); font-weight:700; text-transform:uppercase; letter-spacing:.05em; font-family:var(--font-body); }
.continue-title { font-size:var(--text-base); font-weight:700; margin-top: var(--space-1); font-family:var(--font-heading); letter-spacing:-0.01em; }
.continue-arrow { font-size:var(--text-lg); color:var(--primary); margin-left:auto; }

/* ── КАРУСЕЛЬ ── */
.carousel {
  display: flex; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: var(--space-3);
  padding: 0 var(--space-4) var(--space-2);
  margin-bottom: var(--space-3);
}
.carousel::-webkit-scrollbar { display: none; }

.carousel-card {
  flex: 0 0 85%;
  scroll-snap-align: start; scroll-snap-stop: always;
  background: var(--card-grad); border:none; border-radius: var(--radius);
  padding: var(--space-4); min-width: 0;
  transform: scale(0.94); opacity: 0.6;
  transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.025);
}
.carousel-card.active {
  transform: scale(1); opacity: 1;
  box-shadow: 0 8px 32px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.04);
}

.carousel-card--pro {
  background: linear-gradient(160deg, #2a1f08 0%, #1a1408 100%);
  box-shadow: 0 4px 24px rgba(210,153,34,0.18), inset 0 1px 0 rgba(255,220,120,0.06);
}
.carousel-card--tip {
  background: linear-gradient(160deg, rgba(76,141,255,0.08), rgba(160,107,255,0.04)), var(--card-grad);
  box-shadow: 0 4px 20px rgba(76,141,255,0.12), inset 0 1px 0 rgba(255,255,255,0.03);
}

.carousel-dots { display: flex; justify-content: center; gap: var(--space-2); margin-bottom: var(--space-4); }
.carousel-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: background 0.2s; }
.carousel-dot.active { background: var(--primary); }

/* ── ПРОГРЕСС МИКРОУРОКА ── */
.theory-progress-bar { display: flex; gap: 3px; margin-bottom: var(--space-5); }
.progress-segment { flex: 1; height: 6px; border-radius: 3px; background: var(--border); transition: background 0.3s ease; }
.progress-segment.completed { background: linear-gradient(90deg, var(--primary), var(--accent)); }
.progress-segment.current { background: linear-gradient(90deg, var(--primary), var(--accent)); animation: pulse-segment 0.8s infinite alternate; }
@keyframes pulse-segment { from { opacity: 0.7; } to { opacity: 1; } }
.progress-segment.just-completed { animation: segFlash .6s ease-out; }
@keyframes segFlash {
  0%   { background: #fff; box-shadow: 0 0 12px rgba(255,255,255,0.8); }
  100% { background: linear-gradient(90deg, var(--primary), var(--accent)); box-shadow: none; }
}

/* ═══════════════════════════════════════════════
   ТЕОРИЯ v2.0
   ═══════════════════════════════════════════════ */
.theory-card {
  background: var(--card-grad); border: none; border-radius: 22px;
  padding: var(--space-5); margin-bottom: var(--space-4);
  animation: cardEnter .35s ease; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.025);
}
@keyframes cardEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.theory-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.theory-topic {
  font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--space-3);
  color: var(--primary); letter-spacing: -0.02em;
  font-family: var(--font-heading);
  display: flex; align-items: center; gap: 10px; line-height: 1.25;
}
.theory-topic:not(:has(.theory-card-icon)) { display: block; }
.theory-card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(76,141,255,0.2), rgba(160,107,255,0.14));
  border: 1px solid rgba(76,141,255,0.28);
}
.theory-card-icon svg { width: 20px; height: 20px; color: var(--primary); }

.theory-text { line-height: 1.65; color: var(--text); font-size: var(--text-base); font-family: var(--font-body); white-space: normal; }
.theory-p { margin: 0 0 var(--space-3) 0; line-height: 1.6; }
.theory-p:last-child { margin-bottom: 0; }
.theory-ul { margin: 0 0 var(--space-3) 0; padding-left: 0; list-style: none; }
.theory-ul li { position: relative; padding-left: 22px; margin-bottom: 6px; line-height: 1.55; }
.theory-ul li:last-child { margin-bottom: 0; }
.theory-ul li::before { content: ''; position: absolute; left: 6px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.theory-hi { color: var(--primary); font-weight: 800; }
.theory-card .btn-primary { margin-top: var(--space-4); }

.example-block {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-3);
  background: rgba(76,141,255,0.08);
  border-left: 3px solid var(--primary);
  border-radius: 0 10px 10px 0;
  font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', 'Courier New', monospace;
  font-size: var(--text-base);
  color: var(--primary);
  white-space: pre-line;
}

/* ── РЕПЛИКА ПРОФЕССОРА ── */
.prof-note {
  display: flex; gap: 12px; align-items: flex-start;
  background: linear-gradient(135deg, rgba(245,166,35,0.08), rgba(76,141,255,0.05));
  border: 1px solid rgba(245,166,35,0.22);
  border-radius: 14px; padding: 12px; margin-top: var(--space-4);
}
.prof-note-avatar {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background-image: url('/images/professor_avatar.png');
  background-size: cover; background-position: center 25%; background-repeat: no-repeat;
  overflow: hidden; position: relative;
}
.prof-note-avatar::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 12px rgba(255,220,120,0.2); pointer-events: none; }
.professor-note-card .prof-note-avatar, .prof-note-large .prof-note-avatar { width: 72px; height: 72px; border-radius: 18px; }
.prof-note-body { flex: 1; min-width: 0; }
.prof-note-label { font-family: var(--font-heading); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #f5a623; margin-bottom: 4px; }
.prof-note-text { font-size: var(--text-sm); line-height: 1.55; color: var(--text); }

/* ── ИНФОГРАФИКА ── */
.infographic-img { width: 100%; border-radius: 14px; margin-bottom: var(--space-3); display: block; background: var(--card2); }
.infographic-conclusion {
  background: rgba(76,141,255,0.08); border-left: 3px solid var(--primary);
  padding: 10px 12px; border-radius: 0 10px 10px 0;
  font-size: var(--text-sm); line-height: 1.5; margin-bottom: var(--space-3);
}
.infographic-conclusion .theory-p { margin: 0; }
.infographic-conclusion .theory-ul { margin: 0; }

/* ── MINI QUESTION ── */
.mini-question { margin-top: var(--space-2); }
.mini-question-prompt { font-size: var(--text-sm); font-weight: 600; margin-bottom: 8px; }
.mini-answers { display: flex; gap: 8px; }
.mini-answer-btn { flex: 1; background: var(--card-grad); border:none; border-radius: 12px; padding: 10px 12px; font-family: var(--font-body); font-size: var(--text-sm); color: var(--text); font-weight: 600; cursor: pointer; transition: .15s; box-shadow: 0 2px 10px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.02); }
.mini-answer-btn:active { transform: scale(.97); }
.mini-answer-btn.correct { background: rgba(63,185,80,.15); color: var(--primary2); box-shadow: 0 0 0 1.5px rgba(63,185,80,0.4), 0 4px 14px rgba(63,185,80,0.2); }
.mini-answer-btn.wrong { background: rgba(248,81,73,.15); color: var(--danger); box-shadow: 0 0 0 1.5px rgba(248,81,73,0.4), 0 4px 14px rgba(248,81,73,0.2); }

/* ── TAP-TO-REVEAL ── */
.tap-reveal { margin: var(--space-3) 0; }
.tap-reveal-placeholder {
  background: var(--card-grad);
  border: 2px dashed rgba(76,141,255,0.28);
  border-radius: 14px; padding: 24px 16px; text-align: center; cursor: pointer; transition: .2s;
}
.tap-reveal-placeholder:active { transform: scale(.98); border-color: var(--primary); }
.tap-reveal-icon { font-size: 32px; margin-bottom: 6px; }
.tap-reveal-label { font-size: var(--text-sm); font-weight: 700; color: var(--primary); }
.tap-reveal-hint { font-size: var(--text-xs); color: var(--muted); margin-top: 4px; }
.tap-reveal-content { animation: revealFade .4s ease; }
.tap-reveal-content img { width: 100%; border-radius: 14px; display: block; }
.tap-reveal-content-text { font-size: var(--text-sm); line-height: 1.6; color: var(--text); margin-top: var(--space-2); }
@keyframes revealFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── MATCH-PAIRS ── */
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: var(--space-3) 0; }
.match-col { display: flex; flex-direction: column; gap: 8px; }
.match-item {
  background: var(--card-grad); border: none; border-radius: 12px; padding: 10px 12px;
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; color: var(--text);
  cursor: pointer; transition: .15s; text-align: center;
  min-height: 44px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.02);
}
.match-item:active { transform: scale(.97); }
.match-item.selected { box-shadow: 0 0 0 1.5px var(--primary), 0 4px 14px rgba(76,141,255,0.2); background: rgba(76,141,255,.1); }
.match-item.matched { box-shadow: 0 0 0 1.5px var(--primary2), 0 4px 14px rgba(63,185,80,0.2); background: rgba(63,185,80,.1); color: var(--primary2); cursor: default; opacity: .85; }
.match-item.shake { animation: shakeX .3s; }
@keyframes shakeX { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ── XP THUMBSUP ── */
.xp-thumbsup {
  position: fixed; right: 20px; bottom: 90px; width: 64px; height: 64px; border-radius: 20px;
  background-image: url('/images/professor_avatar.png');
  background-size: cover; background-position: center 25%; background-repeat: no-repeat;
  border: 2px solid rgba(160,107,255,0.6);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 20px rgba(160,107,255,0.4);
  z-index: 900; pointer-events: none; opacity: 0;
  transform: scale(0.5) translateY(20px);
  animation: profThumbsUp 1s cubic-bezier(.34,1.5,.64,1) forwards;
}
.xp-thumbsup::after { content: '👍'; position: absolute; right: -6px; bottom: -6px; font-size: 22px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); }
@keyframes profThumbsUp {
  0%   { opacity: 0; transform: scale(0.5) translateY(20px); }
  20%  { opacity: 1; transform: scale(1.12) translateY(0); }
  35%  { transform: scale(1) translateY(0); }
  80%  { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(0.9) translateY(-10px); }
}

/* ── ICON LIST GRID ── */
.icon-list-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: var(--space-3) 0; }
.icon-list-item {
  background: linear-gradient(135deg, rgba(76,141,255,0.06), rgba(160,107,255,0.04));
  border: none; border-radius: 16px; padding: 16px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  transition: transform .15s ease, box-shadow .2s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.02);
}
.icon-list-item:active { transform: scale(0.97); box-shadow: 0 0 0 1.5px var(--primary), 0 4px 16px rgba(76,141,255,0.2); }
.icon-list-icon {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(76,141,255,0.22), rgba(160,107,255,0.15));
  border: 1px solid rgba(76,141,255,0.28);
}
.icon-list-icon svg { width: 26px; height: 26px; color: var(--primary); stroke-width: 1.8; }
.icon-list-label { font-size: var(--text-sm); font-weight: 600; color: var(--text); letter-spacing: -0.01em; line-height: 1.3; }

/* ── MULTI-SELECT ── */
.multi-option {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--card-grad); border: none; border-radius: 14px; cursor: pointer;
  transition: all .15s ease;
  font-family: var(--font-body); font-size: var(--text-base); font-weight: 500; color: var(--text);
  user-select: none; position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.02);
}
.multi-option:active { transform: scale(0.985); }
.multi-option input { position: absolute; opacity: 0; pointer-events: none; }
.multi-option .multi-checkbox {
  width: 26px; height: 26px; border-radius: 9px; flex-shrink: 0;
  border: 2px solid var(--border); background: var(--card);
  display: flex; align-items: center; justify-content: center;
  transition: all .18s cubic-bezier(.34,1.4,.64,1); position: relative;
}
.multi-option .multi-checkbox svg { width: 16px; height: 16px; color: #fff; opacity: 0; transform: scale(0.3); transition: all .2s cubic-bezier(.34,1.5,.64,1); }
.multi-option input:checked + .multi-checkbox {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent; box-shadow: 0 0 0 3px rgba(76,141,255,0.18);
}
.multi-option input:checked + .multi-checkbox svg { opacity: 1; transform: scale(1); }
.multi-option:has(input:checked) { background: linear-gradient(160deg, rgba(76,141,255,0.08), rgba(76,141,255,0.02)); box-shadow: 0 0 0 1.5px rgba(76,141,255,0.4), 0 4px 14px rgba(76,141,255,0.15); }
.multi-option.correct-ms { background: linear-gradient(160deg, rgba(63,185,80,0.12), rgba(63,185,80,0.03)); box-shadow: 0 0 0 1.5px var(--primary2), 0 4px 14px rgba(63,185,80,0.18); }
.multi-option.wrong-ms { background: linear-gradient(160deg, rgba(248,81,73,0.1), rgba(248,81,73,0.02)); box-shadow: 0 0 0 1.5px var(--danger), 0 4px 14px rgba(248,81,73,0.18); }

/* ── СОРТИРОВКА ── */
.sort-list { display: flex; flex-direction: column; gap: 10px; }
.sort-item {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: var(--card-grad); border: none; border-radius: 14px;
  font-family: var(--font-body);
  transition: box-shadow .2s ease, transform .2s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.02);
}
.sort-item .sort-position {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(76,141,255,0.18), rgba(160,107,255,0.1));
  border: 1px solid rgba(76,141,255,0.28);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 14px; font-weight: 800; color: var(--primary);
}
.sort-item .sort-item-text { flex: 1; font-size: var(--text-base); font-weight: 600; color: var(--text); line-height: 1.35; }
.sort-item .sort-controls { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.sort-btn { width: 34px; height: 26px; border-radius: 8px; background: var(--card-grad); border: none; color: var(--primary); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .12s ease; box-shadow: 0 1px 6px rgba(0,0,0,0.18); }
.sort-btn svg { width: 14px; height: 14px; stroke-width: 2.5; }
.sort-btn:active:not(:disabled) { transform: scale(0.9); background: rgba(76,141,255,0.15); }
.sort-btn:disabled { opacity: 0.25; cursor: not-allowed; }
.sort-item.just-moved { animation: sortMoved .5s ease-out; }
@keyframes sortMoved {
  0%   { transform: scale(1); box-shadow: 0 0 0 1.5px var(--primary), 0 0 24px rgba(76,141,255,0.4); }
  100% { transform: scale(1); box-shadow: 0 2px 12px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.02); }
}

.sort-hint { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin-bottom: 4px; padding: 0 4px; }
.sort-hint .sort-hint-top { color: var(--primary2); }
.sort-hint .sort-hint-bottom { color: var(--danger); }

.sort-item, .match-item, .mini-answer-btn, .multi-option, .true-false-btn,
input, textarea, button, label, select { font-family: var(--font-body); }
.theory-topic, .theory-card .theory-topic, .q-text { font-family: var(--font-heading); }

/* ── SKELETON ── */
.skeleton { background: linear-gradient(90deg, var(--card2) 25%, var(--card) 50%, var(--card2) 75%); background-size: 200px 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius); }
.skeleton-card { height: 140px; margin-bottom: var(--space-4); }
.skeleton-list-item { height: 60px; margin-bottom: var(--space-2); border-radius: 12px; }
.skeleton-text { height: 14px; margin: var(--space-2) 0; width: 70%; }
.skeleton-circle { width: 48px; height: 48px; border-radius: 50%; }
@keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: 200px 0; } }

/* ── IMAGE OPTION ── */
.image-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); margin-top: var(--space-4); }
.image-option { aspect-ratio: 1 / 1; background-size: cover; background-position: center; border-radius: var(--radius); border: none; cursor: pointer; transition: all 0.15s ease; min-height: 100px; background-color: var(--card2); box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.image-option:active { transform: scale(0.96); }
.image-option.correct-img { box-shadow: 0 0 0 3px var(--primary2), 0 8px 28px rgba(63,185,80,0.35); }
.image-option.wrong-img { box-shadow: 0 0 0 3px var(--danger), 0 8px 28px rgba(248,81,73,0.35); }

.prof-character-container { display: none !important; }

.prof-modal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0); display: flex; align-items: flex-end; justify-content: center; transition: background .28s ease; }
.prof-modal-overlay.show { background: rgba(0,0,0,.62); }
.prof-modal-card {
  width: 100%; max-width: 480px;
  background: var(--card-grad); border: none;
  border-radius: 22px 22px 0 0;
  padding: var(--space-5) var(--space-4) var(--space-6);
  transform: translateY(100%); transition: transform .28s cubic-bezier(.34,1.3,.64,1);
  box-shadow: 0 -12px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,0.03);
}
.prof-modal-overlay.show .prof-modal-card { transform: translateY(0); }
.prof-modal-header { display:flex; align-items:center; gap: var(--space-3); margin-bottom: var(--space-3); }
.prof-modal-avatar {
  width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0;
  background-image: url('/images/professor_avatar.png');
  background-size: cover; background-position: center 25%; background-repeat: no-repeat; overflow: hidden;
}
.prof-modal-name { font-family:var(--font-heading); font-size:var(--text-base); font-weight:700; }
.prof-modal-level { font-size:var(--text-xs); color:var(--muted); margin-top: var(--space-1); }
.prof-modal-text { font-size:var(--text-base); line-height:1.6; color:#dbe4ee; background:rgba(76,141,255,0.08); border:1px solid rgba(76,141,255,0.18); border-radius:14px; padding: var(--space-3); margin-bottom: var(--space-3); min-height:46px; }
.prof-modal-dots { display:flex; gap: var(--space-2); justify-content:center; margin-bottom: var(--space-4); }
.prof-dot { width:7px; height:7px; border-radius:50%; background:var(--border); transition:background .2s; }
.prof-dot.filled { background:#f5a623; }
.prof-modal-btns { display:flex; gap: var(--space-3); }
.prof-modal-btn { flex:1; padding: var(--space-3); border-radius:14px; font-family:var(--font-body); font-size:var(--text-sm); font-weight:600; cursor:pointer; border:none; transition:.15s; }
.prof-modal-btn:active { transform:scale(.97); }
.prof-modal-btn.close { background: var(--card-grad); color:var(--text); box-shadow: var(--card-shadow); }
.prof-modal-btn.more { background:linear-gradient(135deg,#f5a623,#d29922); color:#241900; box-shadow: 0 6px 18px rgba(245,166,35,0.28); }
.prof-modal-btn.more:disabled { opacity:.35; cursor:default; }

/* ── PROFILE ── */
.profile-header-card { display:flex; align-items:center; gap: var(--space-4); padding: var(--space-2) 0 var(--space-1); }
.profile-avatar-big {
  width: 64px; height: 64px; border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0; overflow: hidden; position: relative;
}
.profile-avatar-big::after {
  content:''; position:absolute; inset:-8px; border-radius:24px;
  background: radial-gradient(circle, rgba(76,141,255,0.35) 0%, transparent 65%);
  pointer-events:none; z-index:-1;
}
.profile-avatar-big img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.profile-name-big { font-family:var(--font-heading); font-size:var(--text-lg); font-weight:800; letter-spacing:-0.01em; }
.profile-level-big { font-size:var(--text-sm); color:var(--primary); margin-top: var(--space-1); font-family:var(--font-heading); font-weight:600; letter-spacing:-0.01em; display:inline-flex; align-items:center; gap:6px; }

.profile-stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap: var(--space-2); }
.profile-stat { background: var(--card-grad); border:none; border-radius:14px; padding: var(--space-3) var(--space-2); text-align:center; box-shadow: var(--card-shadow); }
.profile-stat-num { font-family:var(--font-heading); font-size:var(--text-lg); font-weight:800; color:var(--primary); letter-spacing:-0.02em; }
.profile-stat-label { font-size:var(--text-xs); color:var(--muted); margin-top: var(--space-1); font-family:var(--font-body); font-weight:500; }

.badges-grid-profile { display:grid; grid-template-columns:repeat(4,1fr); gap: var(--space-2); }
.badge-item-p { background: var(--card-grad); border:none; border-radius:14px; padding: var(--space-3) var(--space-2); text-align:center; box-shadow: var(--card-shadow); }
.badge-item-p.locked { opacity:.3; }
.badge-icon-p { font-size:var(--text-xl); margin-bottom: var(--space-1); }
.badge-name-p { font-size:var(--text-xs); color:var(--muted); line-height:1.3; }

.sub-status-card { background: var(--card-grad); border:none; border-radius:var(--radius); padding: var(--space-4); display:flex; align-items:center; gap: var(--space-3); box-shadow: var(--card-shadow); }
.sub-status-card.active { background: linear-gradient(135deg, rgba(63,185,80,0.12), rgba(63,185,80,0.03)); box-shadow: 0 0 0 1px rgba(63,185,80,0.25), 0 4px 20px rgba(63,185,80,0.15); }

/* ── CHEST ANIMATIONS ── */
@keyframes chestGlow { 0% { box-shadow: 0 0 5px #d29922; } 50% { box-shadow: 0 0 20px #d29922; } 100% { box-shadow: 0 0 5px #d29922; } }
@keyframes chestPulse { 0% { transform: scale(1); } 50% { transform: scale(1.03); } 100% { transform: scale(1); } }
.chest-card-available { animation: chestGlow 2s infinite, chestPulse 1.5s infinite; }
.chest-btn-available { background: linear-gradient(135deg, #f5a623, #d29922) !important; animation: chestPulse 1.2s infinite; }

/* ═══════════════════════════════════════════════════════
   СУНДУК 3.0
   ═══════════════════════════════════════════════════════ */
.chest-modal-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0); display: flex; align-items: center; justify-content: center; transition: background .3s ease; pointer-events: none; }
.chest-modal-overlay.show { background: rgba(0,0,0,.7); pointer-events: auto; }

.chest-modal-card {
  position: relative; width: 90%; max-width: 380px;
  background: var(--card-grad); border: none; border-radius: var(--radius);
  padding: var(--space-5) var(--space-4) var(--space-5);
  box-shadow: 0 20px 60px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,0.03);
  transform: scale(.85); opacity: 0;
  transition: transform .32s cubic-bezier(.34,1.4,.64,1), opacity .28s ease;
  overflow: hidden;
}
.chest-modal-overlay.show .chest-modal-card { transform: scale(1); opacity: 1; }
.chest-modal-card.dim-screen { animation: chestDim .8s ease forwards; }
@keyframes chestDim {
  0%   { box-shadow: 0 20px 60px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,0.03); }
  50%  { box-shadow: 0 0 120px 30px rgba(210,153,34,.5), 0 20px 60px rgba(0,0,0,.8); }
  100% { box-shadow: 0 0 80px 15px rgba(210,153,34,.35), 0 20px 60px rgba(0,0,0,.8); }
}

.chest-queue-label { text-align: center; font-family: var(--font-heading); font-size: var(--text-xs); font-weight: 700; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; margin-bottom: var(--space-3); }
.chest-stage { position: relative; width: 100%; min-height: 220px; display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-4); }
.chest-stage.shaking { animation: chestShake .18s ease-in-out infinite; }
@keyframes chestShake {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(-4px, -2px) rotate(-1.5deg); }
  50%  { transform: translate(4px, -3px) rotate(1.5deg); }
  75%  { transform: translate(-3px, -1px) rotate(-1deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
.chest-svg { width: 200px; height: 190px; filter: drop-shadow(0 8px 20px rgba(0,0,0,.5)); }
.chest-body-svg { transition: filter .3s ease; }
.chest-body-svg.chest-body-lit { filter: drop-shadow(0 0 15px rgba(255,220,120,.6)); }
.chest-lid-svg { transition: transform .55s cubic-bezier(.34,1.5,.64,1); transform-box: fill-box; transform-origin: left bottom; }
.chest-lid-svg.lid-open { transform: rotate(-115deg) translate(-8px, -4px); }
.chest-inner-glow { transition: opacity .4s ease; }
.chest-inner-glow.glow-active { animation: glowPulse 1s ease-in-out infinite alternate; }
@keyframes glowPulse { 0% { opacity: .6; } 100% { opacity: 1; } }
.chest-open-btn { animation: chestOpenPulse 1.5s ease-in-out infinite; }
@keyframes chestOpenPulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(76,141,255,.6); }
  50%      { transform: scale(1.03); box-shadow: 0 0 0 10px rgba(76,141,255,0); }
}
.chest-flash { position: absolute; inset: -20%; pointer-events: none; border-radius: 50%; animation: chestFlash .55s ease-out forwards; z-index: 5; }
@keyframes chestFlash { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; transform: scale(1.05); } 100% { opacity: 0; transform: scale(1.5); } }
.chest-particle { position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; animation: chestParticleFly .95s cubic-bezier(.22,.8,.4,1) forwards; box-shadow: 0 0 6px currentColor; z-index: 10; }
@keyframes chestParticleFly {
  0%   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(.2); }
}
.chest-confetti { position: fixed; top: -10px; width: 8px; height: 14px; border-radius: 2px; pointer-events: none; animation: chestConfettiFall linear forwards; z-index: 2100; }
@keyframes chestConfettiFall { 0% { transform: translateY(-10px) rotate(0deg); opacity: 1; } 100% { transform: translateY(105vh) rotate(720deg); opacity: .8; } }
.chest-reveal-card { text-align: center; padding: var(--space-5) var(--space-4); }
.chest-reveal-card.reveal-anim { animation: revealCardEnter .55s cubic-bezier(.34,1.56,.64,1); }
@keyframes revealCardEnter { 0% { transform: scale(.5) rotate(-6deg); opacity: 0; } 60% { transform: scale(1.06) rotate(2deg); opacity: 1; } 100% { transform: scale(1) rotate(0deg); opacity: 1; } }
.chest-reveal-badge { display: inline-block; font-family: var(--font-heading); font-size: var(--text-xs); font-weight: 800; letter-spacing: .12em; padding: 4px 14px; border-radius: 20px; border: 1px solid; margin-bottom: var(--space-4); }
.chest-reveal-icon { font-size: 72px; line-height: 1; margin-bottom: var(--space-3); animation: rewardIconPop .5s cubic-bezier(.34,1.56,.64,1) .15s backwards; }
@keyframes rewardIconPop { 0% { transform: scale(0) rotate(-30deg); opacity: 0; } 70% { transform: scale(1.15) rotate(8deg); } 100% { transform: scale(1) rotate(0deg); opacity: 1; } }
.chest-reveal-title { font-family: var(--font-heading); font-size: var(--text-xl); font-weight: 800; color: var(--text); margin-bottom: var(--space-1); }
.chest-reveal-amount { font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: 800; margin-bottom: var(--space-3); letter-spacing: -.02em; }
.chest-reveal-howto { font-size: var(--text-xs); color: var(--muted); line-height: 1.5; max-width: 280px; margin: 0 auto var(--space-5); }
.chest-claim-btn { animation: chestClaimPulse 1.4s ease-in-out infinite; }
@keyframes chestClaimPulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 6px 20px rgba(76,141,255,.35); }
  50%      { transform: scale(1.025); box-shadow: 0 6px 30px rgba(160,107,255,.55); }
}
.chest-queue-card { text-align: center; padding: var(--space-6) var(--space-4) var(--space-5); }
.chest-queue-count { font-family: var(--font-heading); font-size: var(--text-3xl); font-weight: 800; color: var(--gold); line-height: 1; margin-bottom: var(--space-2); text-shadow: 0 0 24px rgba(210,153,34,.6); letter-spacing: -0.03em; }
.chest-queue-text { font-size: var(--text-base); font-weight: 700; color: var(--text); margin-bottom: var(--space-1); font-family: var(--font-heading); }
.chest-queue-hint { font-size: var(--text-xs); color: var(--muted); margin-bottom: var(--space-5); font-family: var(--font-body); }

/* ── ОНБОРДИНГ ── */
.onboarding-overlay { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,0); display: flex; align-items: flex-end; justify-content: center; transition: background .28s ease; }
.onboarding-overlay.show { background: rgba(0,0,0,.62); }
.onboarding-card {
  position: relative; width: 100%; max-width: 480px;
  background: var(--card-grad); border: none;
  border-radius: 22px 22px 0 0;
  padding: var(--space-5) var(--space-4) var(--space-6);
  transform: translateY(100%); transition: transform .28s cubic-bezier(.34,1.3,.64,1);
  box-shadow: 0 -12px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,0.03);
}
.onboarding-overlay.show .onboarding-card { transform: translateY(0); }
.onboarding-dots { display: flex; gap: var(--space-2); justify-content: center; margin-bottom: var(--space-4); }
.onboarding-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background 0.2s; }
.onboarding-dot.active { background: var(--primary); }
.onboarding-skip { position: absolute; top: var(--space-3); right: var(--space-3); background: transparent; border: none; color: var(--muted); font-size: var(--text-xs); cursor: pointer; padding: var(--space-1) var(--space-2); font-family: var(--font-body); }
.onboarding-illustration { display: flex; align-items: center; justify-content: center; height: 80px; margin-bottom: var(--space-4); font-size: 48px; color: var(--primary); }
.onboarding-title { font-family: var(--font-heading); font-size: var(--text-xl); font-weight: 800; margin-bottom: var(--space-2); text-align: center; color: var(--text); }
.onboarding-text { font-size: var(--text-base); color: var(--muted); text-align: center; margin-bottom: var(--space-5); line-height: 1.5; font-family: var(--font-body); }
.onboarding-next { width: 100%; }

/* ── CONTEXTUAL HINTS ── */
.contextual-hint-overlay { position: fixed; inset: 0; pointer-events: none; }
.contextual-hint-tooltip { background: var(--card-grad); border: none; border-radius: 14px; padding: var(--space-3) var(--space-4); font-size: var(--text-sm); color: var(--text); box-shadow: 0 8px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.03); pointer-events: none; }

@keyframes pulse-hint {
  0% { transform: translate(-50%, -100%) scale(1); opacity: 0.9; }
  50% { transform: translate(-50%, -100%) scale(1.05); opacity: 1; }
  100% { transform: translate(-50%, -100%) scale(1); opacity: 0.9; }
}

/* ── СТАРЫЕ ТАРИФЫ ── */
.tariff-card { background: var(--card-grad); border: none; border-radius: var(--radius); padding: var(--space-4); cursor: pointer; transition: transform 0.15s ease, box-shadow 0.2s; text-align: center; box-shadow: var(--card-shadow); }
.tariff-card:active { transform: scale(0.97); }
.tariff-card:hover { box-shadow: 0 8px 28px rgba(76,141,255,0.25); }
.tariff-name { font-family: var(--font-heading); font-size: var(--text-base); font-weight: 700; color: var(--text); margin-bottom: var(--space-1); }
.tariff-price { font-size: var(--text-2xl); font-weight: 800; color: var(--primary2); margin-bottom: var(--space-1); font-family: var(--font-heading); letter-spacing: -0.02em; }
.tariff-desc { font-size: var(--text-xs); color: var(--muted); font-family: var(--font-body); }

/* ═══════════════════════════════════════════════
   PAYWALL v3
   ═══════════════════════════════════════════════ */
.paywall-card { max-width: 440px !important; padding: var(--space-5) var(--space-4) var(--space-4) !important; }
.paywall-head { text-align: center; margin-bottom: var(--space-4); }
.paywall-title { font-family: var(--font-heading); font-size: var(--text-xl); font-weight: 800; color: var(--text); margin-bottom: 6px; letter-spacing: -0.02em; }
.paywall-sub { font-size: var(--text-sm); color: var(--muted); }
.paywall-badge-legacy { display: inline-block; background: linear-gradient(135deg, rgba(63,185,80,0.15), rgba(63,185,80,0.06)); border: 1px solid rgba(63,185,80,0.4); color: var(--primary2); font-family: var(--font-heading); font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 12px; border-radius: 20px; margin-bottom: 10px; }

.paywall-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--space-3); }
.paywall-option {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; background: var(--card-grad); border: none; border-radius: 14px; cursor: pointer; transition: all .15s ease; text-align: left;
  font-family: var(--font-body); color: var(--text);
  box-shadow: 0 2px 12px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.02);
}
.paywall-option:active { transform: scale(0.985); }
.paywall-option--accent { background: linear-gradient(160deg, rgba(63,185,80,0.12), rgba(63,185,80,0.03)); box-shadow: 0 0 0 1px rgba(63,185,80,0.35), 0 6px 20px rgba(63,185,80,0.15); }
.paywall-option-ribbon { position: absolute; top: -8px; left: 14px; background: var(--primary2); color: #fff; font-size: 9px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 10px; }
.paywall-option-left { flex: 1; min-width: 0; }
.paywall-option-name { font-size: var(--text-base); font-weight: 700; color: var(--text); margin-bottom: 2px; }
.paywall-option-note { font-size: var(--text-xs); color: var(--muted); }
.paywall-option-right { text-align: right; flex-shrink: 0; }
.paywall-option-price { font-family: var(--font-heading); font-size: var(--text-lg); font-weight: 800; color: var(--text); letter-spacing: -0.02em; }

.paywall-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: var(--space-3); }
.paywall-col { position: relative; background: var(--card-grad); border: none; border-radius: 18px; padding: 16px 12px 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--card-shadow); }
.paywall-col--pro { background: linear-gradient(160deg, #2a1f08 0%, #1a1408 100%); box-shadow: 0 0 30px rgba(210,153,34,0.18), inset 0 1px 0 rgba(255,220,120,0.08); }
.paywall-col-ribbon { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #f5a623, #d29922); color: #1a1408; font-family: var(--font-heading); font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.paywall-col-name { font-family: var(--font-heading); font-size: var(--text-base); font-weight: 800; color: var(--text); text-align: center; margin-bottom: 4px; }
.paywall-col--pro .paywall-col-name { color: var(--gold); }
.paywall-col-feats { list-style: none; padding: 0; margin: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.paywall-col-feats li { position: relative; padding-left: 14px; font-size: 10.5px; line-height: 1.35; color: var(--text); }
.paywall-col-feats li::before { position: absolute; left: 0; top: 0; font-size: 10px; font-weight: 700; }
.paywall-col-feats li.ok::before { content: '✓'; color: var(--primary2); }
.paywall-col-feats li.no { color: var(--muted); opacity: 0.5; text-decoration: line-through; text-decoration-color: rgba(139,148,158,0.3); }
.paywall-col-feats li.no::before { content: '—'; color: var(--muted); }
.paywall-col-feats li.soon { color: #f5a623; }
.paywall-col-feats li.soon::before { content: '◆'; color: #f5a623; font-size: 7px; top: 3px; }

.paywall-price-btn { width: 100%; background: var(--card-grad); border: none; border-radius: 12px; padding: 10px 8px; cursor: pointer; transition: all .15s ease; font-family: var(--font-body); text-align: center; color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.02); }
.paywall-price-btn:active { transform: scale(0.97); }
.paywall-price-btn-label { font-size: 10px; color: var(--muted); font-weight: 600; margin-bottom: 3px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.paywall-price-btn-price { font-family: var(--font-heading); font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.paywall-price-btn--pro { background: rgba(255,255,255,0.04); box-shadow: 0 0 0 1px rgba(245,166,35,0.35), 0 2px 10px rgba(0,0,0,0.18); }
.paywall-price-btn--pro-hot { background: linear-gradient(135deg, #f5a623, #d29922); box-shadow: 0 4px 14px rgba(210,153,34,0.35); }
.paywall-price-btn--pro-hot .paywall-price-btn-label,
.paywall-price-btn--pro-hot .paywall-price-btn-price { color: #1a1408; }

.paywall-disc { display: inline-block; background: rgba(63,185,80,0.15); color: var(--primary2); font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 6px; letter-spacing: 0.02em; }
.paywall-price-btn--pro-hot .paywall-disc { background: rgba(26,20,8,0.2); color: #1a1408; }

.paywall-honest { background: rgba(76,141,255,0.06); border-left: 3px solid var(--primary); border-radius: 0 10px 10px 0; padding: 10px 12px; font-size: 11px; line-height: 1.5; color: var(--muted); margin-bottom: var(--space-3); }
.paywall-honest b { color: var(--primary); font-weight: 700; }
.paywall-refresh { width: 100%; padding: 10px; font-size: 12px; color: var(--primary); margin-bottom: 4px; }
.paywall-cancel { width: 100%; padding: 10px; font-size: 12px; color: var(--muted); }

/* ── SVG ── */
.node-circle svg, .boss-node svg, .continue-card svg, .carousel-card svg,
.true-false-btn svg, .continue-icon svg, .continue-arrow svg {
  color: inherit; width: 24px; height: 24px; vertical-align: middle;
}

/* ═══════════════════════════════════════════════
   БРЕНДОВАЯ ТИПОГРАФИКА
   ═══════════════════════════════════════════════ */
.sec-title, .section-title, .theory-topic, .result-title, .onboarding-title {
  font-family: var(--font-heading); font-weight: 700;
}
.theory-text, .theory-card .theory-text, .example-block, .onboarding-text, .q-card .q-text {
  font-family: var(--font-body);
}
.continue-title, .path-progress-card > div > div:first-child {
  font-family: var(--font-heading); font-weight: 700; letter-spacing: -0.01em;
}
.profile-stat-num, .profile-level-big, .ring-num, #boss-num, .res-num, .ogeprog-ring-num {
  font-family: var(--font-heading); font-weight: 800; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}
.ring-num, #boss-num, .profile-stat-num, .ogeprog-ring-num { letter-spacing: -0.025em; }
.profile-stat-label, .res-label, .ring-denom, .continue-label {
  font-family: var(--font-body); font-weight: 500;
}
.profile-stat-num, .res-num, .ring-num { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══════════════════════════════════════════════
   AI-ЧАТ v2
   ═══════════════════════════════════════════════ */
#btn-ask-ai { display: flex; align-items: center; justify-content: center; gap: 8px; transition: all .2s ease; }
#btn-ask-ai.ai-btn--locked { background: linear-gradient(135deg, rgba(210,153,34,0.1), rgba(210,153,34,0.04)); border-color: rgba(210,153,34,0.4); color: #d29922; }

.ai-panel.ai-panel--open { display: block !important; animation: aiPanelIn .35s cubic-bezier(.34,1.4,.64,1); margin-top: 12px; background: linear-gradient(160deg, #0f1e35 0%, #0d1f2d 100%); border: none; border-radius: 18px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.02); }
@keyframes aiPanelIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.ai-chat-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: rgba(76,141,255,0.05); border-bottom: 1px solid rgba(76,141,255,0.12); }
.ai-chat-header-left { display: flex; align-items: center; gap: 10px; }
.ai-chat-avatar { width: 36px; height: 36px; border-radius: 12px; background-image: url('/images/professor_avatar.png'); background-size: cover; background-position: center 25%; background-color: #1a2333; border: 1.5px solid rgba(76,141,255,0.4); flex-shrink: 0; }
.ai-chat-name { font-family: var(--font-heading); font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.ai-chat-status { font-size: 11px; color: var(--primary2); font-family: var(--font-body); }
.ai-chat-close { width: 30px; height: 30px; border-radius: 10px; border: none; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s ease; }
.ai-chat-close:active { background: rgba(255,255,255,0.06); transform: scale(0.92); }

.ai-chat-messages { max-height: 340px; min-height: 180px; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.ai-chat-messages::-webkit-scrollbar { width: 3px; }
.ai-chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }

.ai-chat-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.55; font-family: var(--font-body); word-wrap: break-word; }
.ai-chat-msg--user { align-self: flex-end; background: linear-gradient(135deg, rgba(76,141,255,0.28), rgba(76,141,255,0.15)); color: var(--text); border-bottom-right-radius: 6px; box-shadow: 0 2px 12px rgba(76,141,255,0.18); }
.ai-chat-msg--assistant { align-self: flex-start; background: var(--card-grad); color: var(--text); border-bottom-left-radius: 6px; box-shadow: 0 2px 12px rgba(0,0,0,0.2); }

.ai-chat-typing { display: flex; align-items: center; gap: 4px; padding: 14px 16px; }
.ai-chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: aiTyping 1.2s infinite ease-in-out; }
.ai-chat-typing span:nth-child(1) { animation-delay: 0s; }
.ai-chat-typing span:nth-child(2) { animation-delay: .2s; }
.ai-chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes aiTyping { 0%,60%,100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }

.ai-chat-quick { padding: 8px 12px 12px; display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid rgba(76,141,255,0.1); }
.ai-chat-quick-btn { background: rgba(76,141,255,0.1); border: 1px solid rgba(76,141,255,0.25); border-radius: 20px; padding: 7px 12px; font-family: var(--font-body); font-size: 11px; font-weight: 600; color: var(--primary); cursor: pointer; transition: all .15s ease; }
.ai-chat-quick-btn:active { transform: scale(0.96); background: rgba(76,141,255,0.2); }

.ai-chat-input-row { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid rgba(76,141,255,0.15); background: rgba(0,0,0,0.15); }
.ai-chat-input { flex: 1; background: var(--card-grad); border: 1px solid rgba(76,141,255,0.22); border-radius: 14px; padding: 10px 14px; color: var(--text); font-family: var(--font-body); font-size: 13px; line-height: 1.4; resize: none; min-height: 40px; max-height: 100px; outline: none; transition: border-color .15s ease; }
.ai-chat-input:focus { border-color: rgba(76,141,255,0.5); }
.ai-chat-input::placeholder { color: var(--muted); }

.ai-chat-send { width: 42px; height: 42px; border-radius: 14px; border: none; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .15s ease; box-shadow: 0 4px 14px rgba(76,141,255,0.3); }
.ai-chat-send:active:not(:disabled) { transform: scale(0.94); }
.ai-chat-send:disabled { opacity: 0.4; cursor: default; box-shadow: none; }

.ai-fullscreen-wrap { display: flex; flex-direction: column; min-height: calc(100vh - 60px); }
.ai-fullscreen-wrap .ai-chat-messages { flex: 1; max-height: none; min-height: auto; padding: 16px 14px; }

/* ═══════════════════════════════════════════════
   НИЖНЯЯ НАВИГАЦИЯ v2
   ═══════════════════════════════════════════════ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(13,17,23,0.94);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(76,141,255,0.08);
  display: flex; justify-content: space-around; align-items: stretch;
  padding: 8px 4px calc(env(safe-area-inset-bottom) + 10px);
  z-index: 100;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
}
.bottom-nav .nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 6px 4px; background: transparent; border: none; cursor: pointer;
  color: var(--muted); font-family: var(--font-body);
  transition: color .2s ease, transform .15s ease;
  position: relative; -webkit-tap-highlight-color: transparent;
}
.bottom-nav .nav-item:active { transform: scale(0.94); }
.bottom-nav .nav-item .nav-icon { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; transition: transform .2s cubic-bezier(.34,1.5,.64,1); color: inherit; }
.bottom-nav .nav-item .nav-icon svg { width: 22px; height: 22px; stroke-width: 2; color: inherit; }
.bottom-nav .nav-item .nav-label { font-size: 10px; font-weight: 600; letter-spacing: -0.01em; transition: color .2s ease; }
.bottom-nav .nav-item.active { color: var(--primary); }
.bottom-nav .nav-item.active .nav-icon { transform: translateY(-1px) scale(1.08); filter: drop-shadow(0 0 8px rgba(76,141,255,0.5)); }
.bottom-nav .nav-item.active .nav-label { color: var(--primary); font-weight: 700; }
.bottom-nav .nav-item.active::before {
  content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.bottom-nav .nav-item[data-tab="ai"] .nav-icon::after {
  content: ''; position: absolute; inset: -8px; border-radius: 50%;
  background: radial-gradient(circle, rgba(160,107,255,0.28) 0%, transparent 70%);
  pointer-events: none; z-index: -1;
}

/* ── Модалка «Ещё» ── */
.more-menu { display: flex; flex-direction: column; gap: 6px; }
.more-menu-title { font-family: var(--font-heading); font-size: 16px; font-weight: 700; color: var(--text); text-align: center; margin-bottom: 10px; letter-spacing: -0.01em; }
.more-menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; background: var(--card-grad); border: none; border-radius: 14px; cursor: pointer; transition: all .15s ease; font-family: var(--font-body); color: var(--text); text-align: left; box-shadow: var(--card-shadow); }
.more-menu-item:active { transform: scale(0.98); }
.more-menu-icon { font-size: 20px; flex-shrink: 0; }
.more-menu-label { font-size: 14px; font-weight: 600; }

/* ── Отступ под навбар ── */
#s-home .scroll, #s-rating .scroll, #s-ai .scroll, #s-profile .scroll, #s-upgrade .scroll, #s-review .scroll { padding-bottom: 100px; }
#s-quiz .quiz-wrap, #s-topic .scroll { padding-bottom: var(--space-6); }

/* ═══════════════════════════════════════════════
   ТАБЫ ПРОФИЛЯ — pill
   ═══════════════════════════════════════════════ */
.profile-tabs { display: flex; gap: 6px; padding: 12px 16px; background: transparent; border-bottom: none; flex-shrink: 0; position: relative; z-index: 2; }
.profile-tab {
  flex: 1; padding: 11px 14px; border-radius: 14px;
  background: transparent; border: 1.5px solid transparent; cursor: pointer;
  color: var(--muted); font-family: var(--font-body); font-size: 13px; font-weight: 700;
  transition: all 0.18s cubic-bezier(.34,1.4,.64,1);
  -webkit-tap-highlight-color: transparent;
}
.profile-tab:active { transform: scale(0.97); }
.profile-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-weight: 700;
  box-shadow: 0 4px 16px rgba(76,141,255,0.32), 0 2px 6px rgba(0,0,0,0.25);
}
.profile-tab.active::after { display: none; }
#s-profile .scroll { padding-top: var(--space-4); }

/* ═══════════════════════════════════════════════
   UPGRADE
   ═══════════════════════════════════════════════ */
.upgrade-hero {
  position: relative; text-align: center;
  padding: 32px 20px 24px;
  background: linear-gradient(160deg, rgba(245,166,35,0.12), rgba(76,141,255,0.05));
  border: none; border-radius: 22px; margin-bottom: var(--space-4); overflow: hidden;
  box-shadow: 0 4px 24px rgba(245,166,35,0.08), inset 0 1px 0 rgba(255,255,255,0.04);
}
.upgrade-hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #f5a623, #d29922); }
.upgrade-hero-icon { font-size: 56px; line-height: 1; margin-bottom: var(--space-3); filter: drop-shadow(0 8px 24px rgba(245,166,35,0.4)); display: flex; align-items: center; justify-content: center; }
.upgrade-hero-icon svg { width: 56px; height: 56px; }
.upgrade-hero-title { font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: 800; color: var(--gold); letter-spacing: -0.02em; margin-bottom: var(--space-2); }
.upgrade-hero-sub { font-size: var(--text-sm); color: var(--muted); line-height: 1.5; max-width: 320px; margin: 0 auto; }

.upgrade-section-title { font-family: var(--font-heading); font-size: var(--text-base); font-weight: 700; color: var(--text); margin: var(--space-5) 0 var(--space-3); display: flex; align-items: center; gap: 8px; }

.upgrade-features { display: flex; flex-direction: column; gap: 10px; }
.upgrade-feature {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; background: var(--card-grad); border: none;
  border-radius: 14px; transition: box-shadow .2s ease;
  box-shadow: var(--card-shadow);
}
.upgrade-feature.soon {
  background: linear-gradient(135deg, rgba(245,166,35,0.06), transparent), var(--card-grad);
  box-shadow: 0 4px 20px rgba(245,166,35,0.1), inset 0 1px 0 rgba(255,255,255,0.02);
}
.upgrade-feature-icon { width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; background: rgba(76,141,255,0.12); }
.upgrade-feature-icon svg { width: 22px; height: 22px; color: var(--primary); }
.upgrade-feature.soon .upgrade-feature-icon { background: rgba(245,166,35,0.15); }
.upgrade-feature.soon .upgrade-feature-icon svg { color: #f5a623; }
.upgrade-feature-body { flex: 1; min-width: 0; }
.upgrade-feature-title { font-size: var(--text-sm); font-weight: 700; color: var(--text); margin-bottom: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.upgrade-feature-desc { font-size: var(--text-xs); color: var(--muted); line-height: 1.45; }
.upgrade-feature-tag { display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; background: rgba(245,166,35,0.15); color: #f5a623; padding: 2px 6px; border-radius: 6px; }

.upgrade-plans { display: flex; flex-direction: column; gap: 12px; }
.upgrade-plan {
  position: relative; background: var(--card-grad); border: none; border-radius: 18px;
  padding: 18px 16px; cursor: pointer; transition: all .15s ease; text-align: left;
  font-family: var(--font-body); color: var(--text); width: 100%;
  box-shadow: var(--card-shadow);
}
.upgrade-plan:active { transform: scale(0.985); }
.upgrade-plan--pro { background: linear-gradient(160deg, #2a1f08 0%, #1a1408 100%); box-shadow: 0 0 30px rgba(210,153,34,0.18), inset 0 1px 0 rgba(255,220,120,0.08); }
.upgrade-plan-ribbon { position: absolute; top: -10px; left: 16px; background: linear-gradient(135deg, #f5a623, #d29922); color: #1a1408; font-family: var(--font-heading); font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.upgrade-plan-ribbon svg { width: 11px; height: 11px; }
.upgrade-plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.upgrade-plan-name { font-family: var(--font-heading); font-size: var(--text-base); font-weight: 800; color: var(--text); letter-spacing: -0.01em; display: flex; align-items: center; gap: 6px; }
.upgrade-plan-name svg { width: 18px; height: 18px; }
.upgrade-plan--pro .upgrade-plan-name { color: var(--gold); }
.upgrade-plan-period { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.upgrade-plan-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.upgrade-plan-price { font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: 800; color: var(--text); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.upgrade-plan--pro .upgrade-plan-price { color: var(--gold); }
.upgrade-plan-permonth { font-size: 12px; color: var(--muted); font-weight: 600; }
.upgrade-plan-note { font-size: var(--text-xs); color: var(--muted); line-height: 1.45; }
.upgrade-plan-discount { display: inline-block; background: rgba(63,185,80,0.15); color: var(--primary2); font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 8px; margin-left: 6px; letter-spacing: 0.02em; vertical-align: middle; }
.upgrade-plan--pro .upgrade-plan-discount { background: linear-gradient(135deg, #f5a623, #d29922); color: #1a1408; }

.upgrade-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: var(--space-3); }
.upgrade-compare-col { background: var(--card-grad); border: none; border-radius: 16px; padding: 14px 12px; box-shadow: var(--card-shadow); }
.upgrade-compare-col--pro { background: linear-gradient(160deg, #2a1f08 0%, #1a1408 100%); box-shadow: 0 0 24px rgba(245,166,35,0.14), inset 0 1px 0 rgba(255,220,120,0.06); }
.upgrade-compare-name { font-family: var(--font-heading); font-size: 13px; font-weight: 800; color: var(--text); text-align: center; margin-bottom: 10px; }
.upgrade-compare-col--pro .upgrade-compare-name { color: var(--gold); }
.upgrade-compare-feats { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.upgrade-compare-feats li { position: relative; padding-left: 16px; font-size: 11px; line-height: 1.4; color: var(--text); }
.upgrade-compare-feats li::before { position: absolute; left: 0; top: 0; font-size: 11px; font-weight: 700; }
.upgrade-compare-feats li.ok::before { content: '✓'; color: var(--primary2); }
.upgrade-compare-feats li.no { color: var(--muted); opacity: 0.5; text-decoration: line-through; }
.upgrade-compare-feats li.no::before { content: '—'; color: var(--muted); }
.upgrade-compare-feats li.soon { color: #f5a623; }
.upgrade-compare-feats li.soon::before { content: '◆'; color: #f5a623; font-size: 8px; top: 3px; }

.upgrade-honest { background: rgba(76,141,255,0.06); border-left: 3px solid var(--primary); border-radius: 0 12px 12px 0; padding: 14px 16px; font-size: 12px; line-height: 1.55; color: var(--muted); margin-bottom: var(--space-4); }
.upgrade-honest b { color: var(--primary); font-weight: 700; }

.upgrade-active-card {
  text-align: center; padding: 40px 20px 32px;
  background: linear-gradient(160deg, #2a1f08 0%, #1a1408 100%);
  border: none; border-radius: 22px; margin-bottom: var(--space-4);
  position: relative; overflow: hidden;
  box-shadow: 0 0 32px rgba(245,166,35,0.16), inset 0 1px 0 rgba(255,220,120,0.06);
}
.upgrade-active-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #f5a623, #d29922); }
.upgrade-active-icon { font-size: 64px; line-height: 1; margin-bottom: var(--space-3); filter: drop-shadow(0 8px 24px rgba(245,166,35,0.5)); display: flex; align-items: center; justify-content: center; }
.upgrade-active-icon svg { width: 64px; height: 64px; }
.upgrade-active-title { font-family: var(--font-heading); font-size: var(--text-xl); font-weight: 800; color: var(--gold); letter-spacing: -0.02em; margin-bottom: var(--space-2); }
.upgrade-active-sub { font-size: var(--text-sm); color: var(--muted); line-height: 1.5; max-width: 300px; margin: 0 auto var(--space-5); }

.pro-block-card { margin-top: var(--space-3); border-radius: 16px; overflow: hidden; transition: all .2s ease; }
.pro-block-card--active {
  background: linear-gradient(160deg, #2a1f08 0%, #1a1408 100%);
  box-shadow: 0 0 32px rgba(245,166,35,0.18), inset 0 1px 0 rgba(255,220,120,0.06);
  position: relative;
}
.pro-block-card--active::after {
  content: ''; position: absolute; inset: -8px; border-radius: 24px;
  background: radial-gradient(circle at 20% 0%, rgba(245,166,35,0.15) 0%, transparent 60%);
  pointer-events: none; z-index: -1;
}
.pro-block-card--locked { background: var(--card-grad); cursor: pointer; box-shadow: var(--card-shadow); }
.pro-block-card--locked:active { transform: scale(0.985); }

.pro-block-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(245,166,35,0.12); }
.pro-block-card--locked .pro-block-head { border-bottom-color: rgba(245,166,35,0.08); }
.pro-block-icon { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: rgba(245,166,35,0.15); flex-shrink: 0; }
.pro-block-icon svg { width: 20px; height: 20px; color: #f5a623; }
.pro-block-title { font-family: var(--font-heading); font-size: var(--text-sm); font-weight: 800; color: var(--gold); letter-spacing: -0.01em; line-height: 1.3; }
.pro-block-card--locked .pro-block-title { color: var(--text); font-weight: 700; }

.pro-block-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; background: transparent; border: none; border-top: 1px solid rgba(245,166,35,0.08); cursor: pointer; transition: background .15s ease; font-family: var(--font-body); color: var(--text); text-align: left; }
.pro-block-row:first-of-type { border-top: none; }
.pro-block-row:active { background: rgba(245,166,35,0.06); }
.pro-block-row-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; display: flex; align-items: center; justify-content: center; }
.pro-block-row-icon svg { width: 20px; height: 20px; color: inherit; }
.pro-block-row-body { flex: 1; min-width: 0; }
.pro-block-row-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.pro-block-row-desc { font-size: 11px; color: var(--muted); }
.pro-block-row-arrow { font-size: 16px; color: var(--gold); flex-shrink: 0; }
.pro-block-card--locked .pro-block-row-arrow { color: var(--muted); font-size: 14px; }
.pro-block-card--locked .pro-block-row-arrow svg { width: 14px; height: 14px; }
.pro-block-lock-badge { display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; background: rgba(245,166,35,0.2); color: #f5a623; padding: 2px 6px; border-radius: 6px; margin-left: 4px; vertical-align: middle; }

/* ═══════════════════════════════════════════════
   ФИКСЫ
   ═══════════════════════════════════════════════ */
.profile-stat-num, .profile-stat-label, .btn-fifty, #btn-fifty { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1, 'lnum' 1; }
.res-num, .ring-num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1, 'lnum' 1; }

.section-title-with-icon { display: flex; align-items: center; gap: 8px; font-family: var(--font-heading); font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-3); }
.section-title-with-icon svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }
.profile-stat-num svg { width: 16px; height: 16px; vertical-align: middle; margin-right: 2px; position: relative; top: -1px; }
.pro-block-row-icon svg { width: 20px; height: 20px; color: inherit; vertical-align: middle; }
.upgrade-feature-icon svg { width: 22px; height: 22px; color: var(--primary); }
.upgrade-feature.soon .upgrade-feature-icon svg { color: #f5a623; }
.section-title svg { width: 20px; height: 20px; vertical-align: middle; margin-right: 2px; position: relative; top: -1px; }

/* ═══════════════════════════════════════════════
   ДОСТИЖЕНИЯ v2
   ═══════════════════════════════════════════════ */
.ach-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(76,141,255,0.08), rgba(160,107,255,0.05));
  border: none; border-radius: 16px; margin-bottom: var(--space-3);
  box-shadow: 0 2px 16px rgba(76,141,255,0.08), inset 0 1px 0 rgba(255,255,255,0.02);
}
.ach-banner-icon { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(76,141,255,0.22), rgba(160,107,255,0.15)); border: 1px solid rgba(76,141,255,0.28); }
.ach-banner-icon svg { width: 22px; height: 22px; color: var(--primary); }
.ach-banner-body { flex: 1; min-width: 0; }
.ach-banner-title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.35; }

.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ach-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px 10px; background: var(--card-grad); border: none;
  border-radius: 14px; text-align: center;
  transition: transform .15s ease, box-shadow .2s ease; min-height: 130px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.02);
}
.ach-card:active { transform: scale(0.97); }
.ach-card--common { box-shadow: 0 2px 12px rgba(0,0,0,0.18), inset 0 0 0 1px rgba(139,148,158,0.2); }
.ach-card--rare { background: linear-gradient(160deg, rgba(76,141,255,0.08), rgba(76,141,255,0.02)), var(--card-grad); box-shadow: 0 2px 12px rgba(76,141,255,0.15), inset 0 0 0 1px rgba(76,141,255,0.25); }
.ach-card--epic { background: linear-gradient(160deg, rgba(160,107,255,0.1), rgba(160,107,255,0.02)), var(--card-grad); box-shadow: 0 0 20px rgba(160,107,255,0.28), inset 0 0 0 1px rgba(160,107,255,0.3); }
.ach-card--legendary { background: linear-gradient(160deg, #2a1f08 0%, #1a1408 100%); box-shadow: 0 0 24px rgba(210,153,34,0.28), inset 0 1px 0 rgba(255,220,120,0.08); animation: achLegendaryGlow 3s ease-in-out infinite alternate; }
@keyframes achLegendaryGlow { 0% { box-shadow: 0 0 18px rgba(210,153,34,0.2), inset 0 1px 0 rgba(255,220,120,0.08); } 100% { box-shadow: 0 0 28px rgba(210,153,34,0.4), inset 0 1px 0 rgba(255,220,120,0.15); } }
.ach-card--locked { opacity: 0.6; filter: grayscale(0.4); }
.ach-card--locked.ach-card--rare, .ach-card--locked.ach-card--epic, .ach-card--locked.ach-card--legendary { box-shadow: none; animation: none; filter: grayscale(0.3) brightness(0.85); }
.ach-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.05); margin-bottom: 2px; flex-shrink: 0; background: rgba(0,0,0,0.15); }
.ach-icon svg { width: 22px; height: 22px; color: var(--primary); }
.ach-card:not(.ach-card--locked).ach-card--common .ach-icon { background: radial-gradient(circle, rgba(139,148,158,0.13) 0%, rgba(139,148,158,0.03) 70%); }
.ach-card:not(.ach-card--locked).ach-card--common .ach-icon svg { color: var(--muted); }
.ach-card:not(.ach-card--locked).ach-card--rare .ach-icon { background: radial-gradient(circle, rgba(76,141,255,0.15) 0%, rgba(76,141,255,0.03) 70%); }
.ach-card:not(.ach-card--locked).ach-card--rare .ach-icon svg { color: var(--primary); }
.ach-card:not(.ach-card--locked).ach-card--epic .ach-icon { background: radial-gradient(circle, rgba(160,107,255,0.18) 0%, rgba(160,107,255,0.04) 70%); }
.ach-card:not(.ach-card--locked).ach-card--epic .ach-icon svg { color: var(--epic); }
.ach-card:not(.ach-card--locked).ach-card--legendary .ach-icon { background: radial-gradient(circle, rgba(210,153,34,0.2) 0%, rgba(210,153,34,0.05) 70%); }
.ach-card:not(.ach-card--locked).ach-card--legendary .ach-icon svg { color: var(--gold); }
.ach-card--locked .ach-icon { background: rgba(0,0,0,0.15); }
.ach-card--locked .ach-icon svg { color: var(--muted); }
.ach-title { font-size: 11px; font-weight: 700; color: var(--text); line-height: 1.3; letter-spacing: -0.01em; padding: 0 2px; }
.ach-card--locked .ach-title { color: var(--muted); }
.ach-progress { width: 100%; display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.ach-progress-text { font-size: 10px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.ach-reward { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 10px; font-weight: 700; color: var(--muted); margin-top: auto; padding-top: 4px; line-height: 1.2; }
.ach-reward svg { width: 14px; height: 14px; color: inherit; flex-shrink: 0; }
.ach-card--common .ach-reward { color: var(--muted); }
.ach-card--rare .ach-reward { color: var(--primary); }
.ach-card--epic .ach-reward { color: var(--epic); }
.ach-card--legendary .ach-reward { color: var(--gold); }
.ach-card--locked .ach-reward { opacity: 0.75; }
.ach-lock-badge { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: var(--card-grad); border: none; display: flex; align-items: center; justify-content: center; z-index: 2; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.ach-lock-badge svg { width: 12px; height: 12px; color: var(--muted); }
.ach-date { font-size: 9px; color: var(--primary2); font-weight: 600; margin-top: 2px; }
.ach-unlock-modal { overflow: visible; position: relative; }
.ach-confetti { position: absolute; top: -10px; left: var(--x, 50%); width: 8px; height: 14px; border-radius: 2px; background: var(--c, #4c8dff); pointer-events: none; animation: achConfettiFall 2s ease-in var(--d, 0s) forwards; z-index: 3; opacity: 0; }
@keyframes achConfettiFall { 0% { opacity: 1; transform: translateY(-20px) rotate(0deg); } 100% { opacity: 0; transform: translateY(220px) rotate(720deg); } }
.ach-unlock-modal .chest-reveal-card { padding: 24px 20px; }
.ach-unlock-modal .chest-reveal-icon { display: flex; align-items: center; justify-content: center; font-size: 0; }
.ach-unlock-modal .chest-reveal-icon svg { width: 72px; height: 72px; }
.ach-unlock-modal .chest-reveal-badge { background: transparent; }

/* ═══════════════════════════════════════════════
   ИЕРАРХИЯ КНОПОК: список уроков
   ═══════════════════════════════════════════════ */
.list-row-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex-shrink: 0; margin-right: var(--space-2); }
.list-row-icon svg { width: 20px; height: 20px; }
.list-row-title { flex: 1; min-width: 0; font-size: var(--text-sm); color: inherit; line-height: 1.3; }
.list-row-hint { font-size: var(--text-xs); color: var(--muted); margin-left: var(--space-2); white-space: nowrap; }

.list-row--next {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none; border-left: 3px solid transparent; color: #fff;
  box-shadow: 0 6px 24px rgba(76,141,255,0.35), inset 0 1px 0 rgba(255,255,255,0.14);
}
.list-row--next:hover { transform: translateX(2px); }
.list-row--next .list-row-icon svg { color: #fff; }
.list-row--next .list-row-title { color: #fff; font-family: var(--font-heading); font-weight: 700; }

.list-row--done { background: var(--card-grad); border-left-color: rgba(63,185,80,0.5); box-shadow: 0 2px 12px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.02); }
.list-row--done .list-row-icon svg { color: var(--primary2); }

.list-row--locked { background: transparent; border: none; box-shadow: none; opacity: 0.5; cursor: default; }
.list-row--locked:hover { transform: none; }
.list-row--locked .list-row-icon svg { color: var(--muted); }

.list-row .status-badge--done { background: rgba(63,185,80,0.12); box-shadow: inset 0 0 0 1px rgba(63,185,80,0.35); }
.list-row .status-badge--done svg { color: var(--primary2); }

.continue-card--primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 6px 24px rgba(76,141,255,0.35), inset 0 1px 0 rgba(255,255,255,0.14);
}
.continue-card--primary:hover { transform: translateX(2px); }
.continue-card--primary .continue-label { color: rgba(255,255,255,0.85); }
.continue-card--primary .continue-title { color: #fff; font-family: var(--font-heading); font-weight: 700; font-size: var(--text-lg); letter-spacing: -0.01em; }
.continue-card--primary .continue-icon { display: inline-flex; align-items: center; justify-content: center; }
.continue-card--primary .continue-icon svg { width: 26px; height: 26px; color: #fff; }
.continue-card--primary .continue-arrow svg { width: 22px; height: 22px; color: #fff; }

/* ═══════════════════════════════════════════════
   ПРОФИЛЬ v2 — roadmap, ogeprog, чип уровня
   ═══════════════════════════════════════════════ */
.sec-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex-shrink: 0; color: var(--primary); }
.sec-icon svg { width: 18px; height: 18px; }
.btn-ico { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex-shrink: 0; color: inherit; }
.btn-ico svg { width: 18px; height: 18px; }

.profile-stat-num--streak { color: var(--streak); }
.profile-stat-sub { font-size: 10px; color: var(--muted); margin-top: 3px; line-height: 1.25; font-family: var(--font-body); font-weight: 500; }
.profile-stat-sub b { color: var(--streak); font-weight: 700; }

.rank-next-link {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(76,141,255,0.1); border: none;
  color: var(--primary); font-family: var(--font-body); font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 20px; cursor: pointer;
  transition: all .15s ease; margin-left: var(--space-2); vertical-align: middle;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 10px rgba(76,141,255,0.15), inset 0 0 0 1px rgba(76,141,255,0.25);
}
.rank-next-link:active { transform: scale(0.96); background: rgba(76,141,255,0.2); }
.rank-next-link svg { width: 12px; height: 12px; color: inherit; }

.roadmap-list { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; padding-right: 4px; margin-bottom: var(--space-3); }
.roadmap-list::-webkit-scrollbar { width: 3px; }
.roadmap-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 8px; }
.roadmap-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card-grad); border: none; transition: all .15s ease; box-shadow: var(--card-shadow); }
.roadmap-item--past { opacity: 0.7; }
.roadmap-item--current { background: linear-gradient(135deg, rgba(76,141,255,0.16), rgba(160,107,255,0.1)); box-shadow: 0 0 0 1.5px rgba(76,141,255,0.4), 0 8px 24px rgba(76,141,255,0.2); }
.roadmap-item--future { opacity: 0.4; }
.roadmap-item-badge { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: rgba(76,141,255,0.12); color: var(--primary); font-family: var(--font-heading); font-weight: 800; font-size: 13px; line-height: 1; box-shadow: inset 0 0 0 1px rgba(76,141,255,0.22); }
.roadmap-item--current .roadmap-item-badge { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; box-shadow: 0 4px 14px rgba(76,141,255,0.4); }
.roadmap-item--past .roadmap-item-badge { background: rgba(63,185,80,0.15); color: var(--primary2); box-shadow: inset 0 0 0 1px rgba(63,185,80,0.3); }
.roadmap-item-body { flex: 1; min-width: 0; }
.roadmap-item-name { font-family: var(--font-heading); font-size: var(--text-sm); font-weight: 700; color: var(--text); margin-bottom: 2px; letter-spacing: -0.01em; }
.roadmap-item--current .roadmap-item-name { color: var(--primary); }
.roadmap-item-threshold { font-size: var(--text-xs); color: var(--muted); font-weight: 500; }
.roadmap-item-check { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--primary2); }
.roadmap-item-check svg { width: 20px; height: 20px; }

/* ── Прогноз ОГЭ (кольцо) ── */
.ogeprog-card { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center; padding: var(--space-4) var(--space-3); }
.ogeprog-head { font-family: var(--font-heading); font-size: var(--text-base); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.ogeprog-head svg { width: 20px; height: 20px; color: var(--primary); }
.ogeprog-ring-wrap { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
.ogeprog-ring-wrap::before {
  content:''; position: absolute; inset: -20px; border-radius: 50%;
  background: radial-gradient(circle, rgba(160,107,255,0.18) 0%, transparent 68%);
  pointer-events: none; z-index: 0;
}
.ogeprog-ring-wrap svg { transform: rotate(-90deg); display: block; position: relative; z-index: 1; }
.ogeprog-ring-wrap .ring-bg { fill: none; stroke: var(--card2); stroke-width: 10; }
.ogeprog-ring-wrap .ogeprog-ring-fill { fill: none; stroke: url(#ogeprog-gradient); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(0.34, 1.56, 0.64, 1); }
.ogeprog-ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 2; }
.ogeprog-ring-num { font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: 800; letter-spacing: -0.03em; color: var(--gold); line-height: 1; }
.ogeprog-ring-denom { font-size: 11px; color: var(--muted); font-family: var(--font-body); margin-top: 2px; }
.ogeprog-caption { font-size: var(--text-sm); color: var(--muted); font-weight: 500; }
.ogeprog-next { width: 100%; max-width: 320px; margin-top: var(--space-1); }
.ogeprog-next-label { font-size: var(--text-xs); color: var(--muted); margin-bottom: var(--space-1); line-height: 1.4; }
.ogeprog-next-label b { color: var(--primary); font-weight: 700; }

/* ── Чип уровня в рейтинге ── */
.lb-level-chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 8px; border-radius: 8px;
  background: rgba(76,141,255,0.12);
  color: var(--primary);
  font-family: var(--font-heading); font-size: 10px; font-weight: 800; letter-spacing: 0.01em;
  flex-shrink: 0; white-space: nowrap; line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(76,141,255,0.28);
}

/* ── Адаптив для маленьких экранов ── */
@media (max-width: 360px) {
  .profile-name-big { font-size: var(--text-base); }
  .ogeprog-ring-wrap { width: 120px; height: 120px; }
  .ogeprog-ring-wrap svg { width: 120px; height: 120px; }
}

/* ═══════════════════════════════════════════════
   КАРУСЕЛЬ v2 — редизайн карточек
   ═══════════════════════════════════════════════ */
.carousel {
  gap: 12px;
  padding: 4px var(--space-4) var(--space-2);
}

.carousel-card {
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  min-height: 180px;
}

.cc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.cc-head-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(76,141,255,0.2), rgba(160,107,255,0.12));
  box-shadow: inset 0 0 0 1px rgba(76,141,255,0.25);
}
.cc-head-icon svg { width: 18px; height: 18px; color: var(--primary); }
.cc-head-icon--gold {
  background: linear-gradient(135deg, rgba(245,166,35,0.22), rgba(210,153,34,0.12));
  box-shadow: inset 0 0 0 1px rgba(245,166,35,0.3);
}
.cc-head-icon--gold svg { color: #f5a623; }

.cc-head-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: 1.2;
}
.cc-head-title--gold { color: var(--gold); }

.cc-metric {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.cc-metric--gold { color: var(--gold); }
.cc-metric--streak { color: var(--streak); }
.cc-metric--primary { color: var(--primary); }
.cc-metric--muted { color: var(--muted); }

.cc-subtitle {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-body);
  line-height: 1.4;
  margin-bottom: 12px;
}

.cc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.cc-chips--mb { margin-bottom: 12px; }

.cc-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
}
.cc-chip svg { width: 12px; height: 12px; }
.cc-chip--primary {
  background: rgba(76,141,255,0.14);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(76,141,255,0.28);
}
.cc-chip--success {
  background: rgba(63,185,80,0.14);
  color: var(--primary2);
  box-shadow: inset 0 0 0 1px rgba(63,185,80,0.3);
}
.cc-chip--gold {
  background: rgba(210,153,34,0.14);
  color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(210,153,34,0.32);
}

.cc-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}
.cc-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.cc-tasks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.cc-task {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
  transition: color 0.2s ease;
}
.cc-task--done { color: var(--muted); }
.cc-task-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.12);
  transition: all 0.2s ease;
}
.cc-task--done .cc-task-check {
  background: var(--primary2);
  box-shadow: 0 0 12px rgba(63,185,80,0.4);
}
.cc-task-check svg {
  width: 13px;
  height: 13px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cc-task--done .cc-task-check svg { opacity: 1; }

.cc-action {
  margin-top: auto;
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(76,141,255,0.28), inset 0 1px 0 rgba(255,255,255,0.14);
  transition: transform 0.15s ease;
}
.cc-action:active { transform: scale(0.97); }
.cc-action svg { width: 16px; height: 16px; }
.cc-action--gold {
  background: linear-gradient(135deg, #f5a623, #d29922);
  color: #1a1408;
  box-shadow: 0 4px 16px rgba(210,153,34,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
.cc-action--gold svg { color: #1a1408; }

.cc-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  padding: 8px 4px;
}

@media (max-width: 360px) {
  .cc-metric { font-size: 34px; }
  .cc-head-title { font-size: 13px; }
}

/* ═══════════════════════════════════════════════
   ★ AI-ЧАТ НА ВКЛАДКЕ «ПРОФЕССОР» — фиксы
   ═══════════════════════════════════════════════ */

#s-ai {
  overflow: hidden;
  height: 100vh;
}

#s-ai .scroll {
  padding: 0 !important;
  padding-bottom: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ai-fullscreen-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.ai-fullscreen-wrap .ai-chat-messages {
  flex: 1;
  min-height: 0;
  max-height: none;
  padding: 16px 14px;
  overflow-y: auto;
}

.ai-fullscreen-wrap .ai-chat-input-row {
  flex-shrink: 0;
  border-top: 1px solid rgba(76,141,255,0.15);
  background: rgba(0,0,0,0.15);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 74px);
}

.ai-fullscreen-wrap .ai-chat-avatar,
.ai-chat-avatar {
  background-image: url('/images/professor_avatar.png');
  background-size: cover;
  background-position: center 25%;
  background-color: #1a2333;
}

.ai-fullscreen-wrap .ai-chat-quick {
  border-top: 1px solid rgba(76,141,255,0.08);
  padding: 10px 12px 4px;
  background: transparent;
}

/* ═══════════════════════════════════════════════
   ★ Строки сообщений — с мини-аватаром
   ═══════════════════════════════════════════════ */
.ai-chat-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  animation: aiMsgIn .3s ease-out;
}
.ai-chat-msg-row--assistant { justify-content: flex-start; }
.ai-chat-msg-row--user      { justify-content: flex-end; }

.ai-chat-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  background-image: url('/images/professor_avatar.png');
  background-size: cover;
  background-position: center 25%;
  background-color: #1a2333;
  border: 1.5px solid rgba(76,141,255,0.45);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 10px rgba(76,141,255,0.2);
}

.ai-chat-msg { align-self: auto; animation: none; }

.ai-chat-msg-row .ai-chat-typing { padding: 14px 16px; }

/* ═══════════════════════════════════════════════
   ★ Гасим .xp-thumbsup на экране Профессора
   ═══════════════════════════════════════════════ */
body.ai-chat-open .xp-thumbsup {
  display: none !important;
  opacity: 0 !important;
  animation: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#s-ai .xp-thumbsup,
.ai-fullscreen-wrap .xp-thumbsup {
  display: none !important;
}

.xp-thumbsup {
  animation-fill-mode: forwards !important;
  animation-iteration-count: 1 !important;
}

/* ═══════════════════════════════════════════════
   ★ Точка-индикатор новых сообщений на вкладке «Профессор»
   ═══════════════════════════════════════════════ */
.bottom-nav .nav-item[data-tab="ai"] .ai-unread-dot {
  position: absolute;
  top: 4px;
  right: 50%;
  transform: translateX(18px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary2);
  box-shadow: 0 0 8px rgba(63,185,80,0.6);
  z-index: 2;
  animation: aiUnreadPulse 2s ease-in-out infinite;
}
@keyframes aiUnreadPulse {
  0%, 100% { transform: translateX(18px) scale(1); }
  50%      { transform: translateX(18px) scale(1.2); }
}

/* ═══════════════════════════════════════════════
   ★ ЭКРАН АВТОРИЗАЦИИ (для веб-версии, вне Telegram)
   ═══════════════════════════════════════════════ */
#auth-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow-y: auto;
  padding: 32px 20px;
  padding-top: max(32px, calc(env(safe-area-inset-top) + 24px));
  padding-bottom: max(32px, calc(env(safe-area-inset-bottom) + 24px));
  font-family: var(--font-body);
  color: var(--text);
}
#auth-screen.show { display: flex; animation: fadeUp .3s ease; }

#auth-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(76,141,255,0.10) 0%, transparent 55%),
    radial-gradient(circle at 85% 90%, rgba(160,107,255,0.10) 0%, transparent 55%);
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--card-grad);
  border-radius: 24px;
  padding: 32px 24px 28px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5),
              inset 0 1px 0 rgba(255,255,255,0.03);
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.auth-avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  border-radius: 26px;
  background-image: url('/images/professor_avatar.png');
  background-size: cover;
  background-position: center 25%;
  background-color: #1a2333;
  border: 2px solid rgba(76,141,255,0.45);
  box-shadow: 0 0 32px rgba(76,141,255,0.35),
              inset 0 0 16px rgba(255,255,255,0.05);
  position: relative;
}
.auth-avatar::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 30px;
  background: radial-gradient(circle, rgba(76,141,255,0.28) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 10px;
}

.auth-subtitle {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 24px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.auth-btn {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 6px 22px rgba(76,141,255,0.32),
              inset 0 1px 0 rgba(255,255,255,0.14);
  transition: transform .15s ease, box-shadow .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}
.auth-btn:last-of-type { margin-bottom: 0; }
.auth-btn:hover { box-shadow: 0 8px 28px rgba(76,141,255,0.45), inset 0 1px 0 rgba(255,255,255,0.18); }
.auth-btn:active { transform: scale(0.97); }
.auth-btn:disabled { opacity: 0.55; cursor: default; transform: none; }

/* ★ Логотип внутри кнопки */
.auth-btn-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.auth-btn-logo svg {
  width: 100%;
  height: 100%;
  color: #fff;
}

/* ★ VK-кнопка — фирменный синий */
.auth-btn--vk {
  background: linear-gradient(135deg, #0077FF, #005BCC);
  box-shadow: 0 6px 22px rgba(0,119,255,0.35),
              inset 0 1px 0 rgba(255,255,255,0.14);
}
.auth-btn--vk:hover {
  box-shadow: 0 8px 28px rgba(0,119,255,0.5),
              inset 0 1px 0 rgba(255,255,255,0.2);
}

.auth-status {
  min-height: 20px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  transition: color .2s ease;
}
.auth-status.is-error   { color: var(--danger); }
.auth-status.is-success { color: var(--primary2); }

.auth-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin 0.8s linear infinite;
}
@keyframes authSpin { to { transform: rotate(360deg); } }

.auth-note {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  opacity: 0.75;
}

@media (min-width: 720px) {
  .auth-card { padding: 40px 36px 32px; }
  .auth-title { font-size: 26px; }
  .auth-subtitle { font-size: 15px; }
}
