/* ============ LexiNova — styles ============ */
:root {
  --a1: #8b5cf6;          /* accent 1 (theme) */
  --a2: #06b6d4;          /* accent 2 (theme) */
  --a3: #f472b6;          /* accent 3 (theme) */
  --ok: #22c55e;
  --ok2: #16a34a;
  --bad: #ef4444;
  --warn: #f59e0b;
  --text: #f8fafc;
  --muted: #b6bfd6;
  --card: rgba(15, 18, 40, .62);
  --card-2: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .14);
  --blur: 14px;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  --font: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-fun: 'Fredoka', 'Poppins', 'Segoe UI', sans-serif;
  --veil: .25;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: #0b1026;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background 1s ease;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

#bg-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -2; pointer-events: none; }
#bg-veil { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: rgba(5, 8, 25, var(--veil)); transition: background .6s; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 12px clamp(14px, 3vw, 36px);
  background: rgba(10, 12, 32, .55);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo { width: 46px; height: 46px; display: grid; place-items: center; }
.brand-logo svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 16px rgba(139, 92, 246, .55)); animation: logoFloat 4s ease-in-out infinite; }
@keyframes logoFloat { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-4deg); } }
.brand-logo .nova-star { transform-origin: 32px 16px; animation: spinStar 6s linear infinite; }
@keyframes spinStar { to { transform: rotate(360deg); } }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-fun); font-size: 1.55rem; font-weight: 700; letter-spacing: .3px; }
.brand-name b { background: linear-gradient(90deg, var(--a1), var(--a2), var(--a3)); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% auto; animation: shine 4s linear infinite; }
.brand-name.small { font-size: 1.1rem; }
@keyframes shine { to { background-position: 200% center; } }
.brand-tag { font-size: .7rem; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav > a, .nav-drop-btn {
  padding: 9px 14px; border-radius: 12px; color: var(--text); font-weight: 500; font-size: .95rem;
  background: transparent; border: 0; transition: background .2s, transform .2s;
}
.nav > a:hover, .nav-drop-btn:hover, .nav > a.active { background: var(--card-2); }
.nav > a.active { box-shadow: inset 0 -2px 0 var(--a2); }
.nav-drop { position: relative; }
.nav-drop-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px; padding: 8px;
  background: rgba(14, 16, 40, .95); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .2s;
}
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu, .nav-drop.open .nav-drop-menu { opacity: 1; visibility: visible; transform: none; }
.nav-drop-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; }
.nav-drop-menu a:hover { background: var(--card-2); }
.nav-drop-menu small { color: var(--muted); margin-left: auto; }

.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; min-width: 44px; padding: 0 12px; justify-content: center;
  border-radius: 14px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font-weight: 600;
  transition: transform .2s, background .2s, box-shadow .2s;
}
.icon-btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .13); box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.burger { display: none; font-size: 1.3rem; }

/* ---------- Bell ---------- */
.bell-wrap { position: relative; }
.bell { position: relative; }
.bell.ring svg { animation: ring 1s ease-in-out 3; transform-origin: 50% 0; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(18deg); } 30% { transform: rotate(-16deg); } 45% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 75% { transform: rotate(4deg); } }
.bell-badge {
  position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: linear-gradient(135deg, #ef4444, #f97316); color: #fff; font-size: .75rem; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 0 0 3px rgba(10, 12, 32, .9), 0 0 14px rgba(239, 68, 68, .8);
  animation: pulseBadge 1.6s ease-in-out infinite;
}
@keyframes pulseBadge { 50% { transform: scale(1.15); } }
.bell-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(380px, 92vw); max-height: 70vh; overflow: hidden;
  display: flex; flex-direction: column;
  background: rgba(14, 16, 40, .97); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  animation: dropIn .22s ease;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.bell-list { overflow-y: auto; }
.bell-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, .06); cursor: pointer; transition: background .2s; }
.bell-item:hover { background: var(--card-2); }
.bell-item.unread { background: linear-gradient(90deg, rgba(139, 92, 246, .18), transparent); }
.bell-item.unread .bell-title::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--a2); margin-right: 8px; box-shadow: 0 0 8px var(--a2); }
.bell-thumb { width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0; object-fit: cover; background: linear-gradient(135deg, var(--a1), var(--a2)); display: grid; place-items: center; font-size: 1.4rem; }
.bell-title { font-weight: 600; font-size: .92rem; }
.bell-date { font-size: .75rem; color: var(--muted); }
.bell-empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.bell-foot { padding: 12px 16px; text-align: center; color: var(--a2); font-weight: 600; border-top: 1px solid var(--line); }
.link-btn { background: none; border: 0; color: var(--a2); font-weight: 600; font-size: .85rem; }

/* ---------- Layout ---------- */
#app { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: clamp(18px, 3vw, 36px) clamp(14px, 3vw, 28px) 40px; outline: none; }
.page { animation: pageIn .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } }
.glass {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(var(--blur)) saturate(140%); -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  box-shadow: var(--shadow);
}
.section-title { display: flex; align-items: center; gap: 12px; font-family: var(--font-fun); font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin: 38px 0 18px; }
.section-title::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, var(--a1), transparent); border-radius: 2px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 14px; border: 0;
  font-weight: 600; font-size: 1rem; color: #fff; background: linear-gradient(135deg, var(--a1), var(--a2));
  box-shadow: 0 10px 24px rgba(0, 0, 0, .3); transition: transform .2s, box-shadow .2s, filter .2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 14px 30px rgba(0, 0, 0, .35); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.ghost { background: var(--card-2); border: 1px solid var(--line); box-shadow: none; }
.btn.green { background: linear-gradient(135deg, var(--ok), var(--ok2)); }
.btn.red { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.btn.sm { padding: 8px 14px; font-size: .88rem; border-radius: 11px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--card-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.unit { background: rgba(6, 182, 212, .16); border-color: rgba(6, 182, 212, .4); color: #a5f3fc; }

/* ---------- Hero ---------- */
.hero { position: relative; display: grid; grid-template-columns: 1.25fr .9fr; gap: 28px; align-items: center; padding: clamp(24px, 4vw, 48px); overflow: hidden; }
.hero::before { content: ''; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, var(--a1), transparent 65%); opacity: .45; filter: blur(10px); animation: blob 9s ease-in-out infinite; }
.hero::after { content: ''; position: absolute; width: 320px; height: 320px; left: -100px; bottom: -160px; border-radius: 50%; background: radial-gradient(circle, var(--a2), transparent 65%); opacity: .35; animation: blob 11s ease-in-out infinite reverse; }
@keyframes blob { 50% { transform: translate(30px, 20px) scale(1.12); } }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-family: var(--font-fun); font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.08; margin: 10px 0 16px; }
.hero h1 .grad { background: linear-gradient(90deg, var(--a1), var(--a2), var(--a3), var(--a1)); background-size: 300% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; }
.hero p { color: var(--muted); font-size: 1.06rem; line-height: 1.65; max-width: 560px; }
.hero-badge { display: inline-flex; gap: 8px; align-items: center; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); font-size: .85rem; font-weight: 500; }
.hero-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulseBadge 1.4s infinite; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.typing { font-family: var(--font-fun); color: var(--a2); min-height: 1.5em; font-size: 1.15rem; }
.typing::after { content: '|'; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-art { position: relative; height: 330px; }
.orbit { position: absolute; inset: 0; margin: auto; border: 1.5px dashed rgba(255, 255, 255, .22); border-radius: 50%; animation: spin linear infinite; }
.orbit span { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-fun); font-weight: 700; font-size: 1.2rem; color: #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, .35); }
.orbit.o1 { width: 300px; height: 300px; animation-duration: 22s; }
.orbit.o2 { width: 210px; height: 210px; animation-duration: 15s; animation-direction: reverse; }
.orbit.o3 { width: 120px; height: 120px; animation-duration: 10s; }
@keyframes spin { to { transform: rotate(360deg); } }
.orbit-core { position: absolute; inset: 0; margin: auto; width: 96px; height: 96px; display: grid; place-items: center; }
.orbit-core svg { width: 100%; filter: drop-shadow(0 0 26px var(--a1)); animation: logoFloat 3s ease-in-out infinite; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.stat { padding: 18px; text-align: center; }
.stat b { display: block; font-family: var(--font-fun); font-size: 2rem; background: linear-gradient(135deg, #fff, var(--a2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: .9rem; }

/* ---------- Level cards ---------- */
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.level-card {
  position: relative; padding: 24px 22px; overflow: hidden; cursor: pointer; isolation: isolate;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
}
.level-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--lg); opacity: .9; }
.level-card::after { content: ''; position: absolute; inset: -50%; z-index: -1; background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, .25), transparent 30%); animation: spin 6s linear infinite; opacity: 0; transition: opacity .3s; }
.level-card:hover { transform: translateY(-8px) rotate(-.6deg); box-shadow: 0 26px 60px rgba(0, 0, 0, .45); }
.level-card:hover::after { opacity: 1; }
.level-emoji { font-size: 2.6rem; display: inline-block; animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(6deg); } }
.level-card h3 { font-family: var(--font-fun); font-size: 1.5rem; margin: 10px 0 4px; }
.level-card .cefr { font-size: .8rem; font-weight: 700; letter-spacing: 1px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .25); }
.level-card p { color: rgba(255, 255, 255, .88); font-size: .9rem; line-height: 1.5; min-height: 64px; }
.level-meta { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .9rem; margin-top: 8px; }
.level-progress { height: 7px; background: rgba(0, 0, 0, .28); border-radius: 9px; overflow: hidden; margin-top: 12px; }
.level-progress i { display: block; height: 100%; background: #fff; border-radius: 9px; transition: width 1s; }

/* ---------- Level page / test buttons ---------- */
.level-head { display: flex; align-items: center; gap: 20px; padding: 26px; margin-bottom: 22px; position: relative; overflow: hidden; }
.level-head::before { content: ''; position: absolute; inset: 0; background: var(--lg); opacity: .55; z-index: 0; }
.level-head > * { position: relative; z-index: 1; }
.level-head .level-emoji { font-size: 3.4rem; }
.level-head h1 { font-family: var(--font-fun); margin: 0 0 6px; font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.level-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.level-tabs a { padding: 9px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; transition: .2s; }
.level-tabs a.on, .level-tabs a:hover { background: linear-gradient(135deg, var(--a1), var(--a2)); border-color: transparent; }
.tests-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.test-btn {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; text-align: left; color: var(--text);
  border-radius: 18px; border: 1px solid var(--line); background: var(--card); backdrop-filter: blur(var(--blur));
  transition: transform .25s, box-shadow .25s, border-color .25s; overflow: hidden; animation: popIn .5s backwards;
}
@keyframes popIn { from { opacity: 0; transform: scale(.85) translateY(10px); } }
.test-btn::before { content: ''; position: absolute; inset: 0; background: var(--lg); opacity: 0; transition: opacity .3s; z-index: -1; }
.test-btn:hover { transform: translateY(-5px); border-color: transparent; box-shadow: 0 18px 40px rgba(0, 0, 0, .4); }
.test-btn:hover::before { opacity: .9; }
.test-btn .tnum { font-family: var(--font-fun); font-size: 1.6rem; font-weight: 700; }
.test-btn .tinfo { font-size: .82rem; color: var(--muted); }
.test-btn:hover .tinfo { color: rgba(255, 255, 255, .9); }
.test-btn .ttopics { font-size: .78rem; line-height: 1.4; color: rgba(255, 255, 255, .78); min-height: 2.8em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.test-btn .tbest { position: absolute; top: 12px; right: 12px; }
.test-btn .play { position: absolute; right: 14px; bottom: 14px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); transition: .3s; }
.test-btn:hover .play { background: #fff; color: #111; transform: scale(1.1) rotate(360deg); }
.score-pill { padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.score-pill.good { background: rgba(34, 197, 94, .25); color: #86efac; }
.score-pill.mid { background: rgba(245, 158, 11, .25); color: #fcd34d; }
.score-pill.low { background: rgba(239, 68, 68, .25); color: #fca5a5; }

/* ---------- Test runner ---------- */
.runner { display: grid; grid-template-columns: 1fr 290px; gap: 20px; align-items: start; }
.runner-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 16px; }
.runner-top h2 { margin: 0; font-family: var(--font-fun); font-size: 1.35rem; }
.runner-top .spacer { flex: 1; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; padding: 8px 14px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); }
.progress { height: 10px; border-radius: 10px; background: rgba(255, 255, 255, .1); overflow: hidden; width: 100%; }
.progress i { display: block; height: 100%; width: 0; border-radius: 10px; background: linear-gradient(90deg, var(--ok), var(--a2)); box-shadow: 0 0 12px var(--ok); transition: width .4s; }
.q-card { padding: clamp(20px, 3.5vw, 36px); position: relative; overflow: hidden; }
.q-card.slide { animation: qIn .35s ease; }
@keyframes qIn { from { opacity: 0; transform: translateX(26px); } }
.q-num { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--a2); font-size: .95rem; letter-spacing: .5px; }
.q-num b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--a1), var(--a2)); font-size: 1.05rem; }
.q-text { font-size: clamp(1.12rem, 2.2vw, 1.45rem); line-height: 1.6; margin: 18px 0 24px; font-weight: 500; }
.blank { display: inline-block; min-width: 70px; border-bottom: 3px dashed var(--a2); margin: 0 4px; text-align: center; color: var(--a2); font-weight: 700; line-height: 1.1; }
.blank.cur { border-bottom-style: solid; background: rgba(6, 182, 212, .14); border-radius: 6px 6px 0 0; padding: 0 6px; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.opt {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-align: left;
  border-radius: 16px; border: 2px solid var(--line); background: rgba(255, 255, 255, .06); color: var(--text);
  font-size: 1.04rem; font-weight: 500; transition: transform .18s, border-color .18s, background .18s, box-shadow .25s;
}
.opt:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .11); }
.opt .letter { flex-shrink: 0; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: rgba(255, 255, 255, .12); font-weight: 700; font-family: var(--font-fun); transition: .2s; }
/* ★ Selected answer: glowing green button */
.opt.selected {
  border-color: #4ade80; color: #fff;
  background: linear-gradient(135deg, #22c55e, #15803d);
  animation: glowGreen 1.5s ease-in-out infinite alternate;
  transform: translateY(-2px) scale(1.015);
}
.opt.selected .letter { background: #fff; color: #15803d; }
.opt.selected::after { content: '✓'; position: absolute; right: 16px; font-weight: 800; font-size: 1.2rem; animation: popIn .3s; }
@keyframes glowGreen {
  from { box-shadow: 0 0 0 2px rgba(74, 222, 128, .6), 0 0 16px rgba(34, 197, 94, .7), 0 0 34px rgba(34, 197, 94, .35); }
  to   { box-shadow: 0 0 0 4px rgba(74, 222, 128, .9), 0 0 28px rgba(34, 197, 94, .95), 0 0 70px rgba(34, 197, 94, .55); }
}
.opt .ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, .5); animation: ripple .6s linear; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.q-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.kbd-hint { font-size: .78rem; color: var(--muted); margin-top: 14px; text-align: center; }
kbd { padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--card-2); font-family: inherit; }

.navigator { padding: 18px; position: sticky; top: 92px; }
.navigator h4 { margin: 0 0 12px; display: flex; justify-content: space-between; }
.nav-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.nav-cell { aspect-ratio: 1; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--text); font-size: .78rem; font-weight: 600; transition: .15s; }
.nav-cell:hover { border-color: var(--a2); }
.nav-cell.done { background: linear-gradient(135deg, var(--ok), var(--ok2)); border-color: #4ade80; box-shadow: 0 0 10px rgba(34, 197, 94, .55); }
.nav-cell.cur { outline: 2px solid #fff; outline-offset: 1px; }
.legend { display: flex; gap: 14px; font-size: .78rem; color: var(--muted); margin: 12px 0; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -2px; margin-right: 5px; }

/* ---------- Results ---------- */
.result-hero { display: grid; grid-template-columns: 240px 1fr; gap: 30px; align-items: center; padding: 30px; }
.ring { position: relative; width: 220px; height: 220px; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-bg { stroke: rgba(255, 255, 255, .1); }
.ring .ring-fg { transition: stroke-dashoffset 1.6s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 0 10px currentColor); }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-label b { font-family: var(--font-fun); font-size: 3rem; line-height: 1; }
.result-hero h2 { font-family: var(--font-fun); font-size: 2rem; margin: 0 0 6px; }
.res-stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.res-stat { padding: 12px 18px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); min-width: 110px; }
.res-stat b { display: block; font-size: 1.6rem; font-family: var(--font-fun); }
.res-stat.ok b { color: #4ade80; } .res-stat.bad b { color: #f87171; } .res-stat.skip b { color: #fcd34d; }
.tabs { display: flex; gap: 8px; margin: 26px 0 16px; flex-wrap: wrap; }
.tabs button { padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 600; }
.tabs button.on { background: linear-gradient(135deg, var(--a1), var(--a2)); border-color: transparent; }
.mistake { padding: 18px 20px; margin-bottom: 12px; border-left: 4px solid var(--bad); animation: pageIn .4s backwards; }
.mistake .m-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.mistake .m-q { font-size: 1.05rem; line-height: 1.55; margin: 6px 0 12px; }
.ans-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ans { padding: 8px 14px; border-radius: 11px; font-weight: 600; font-size: .92rem; }
.ans.your { background: rgba(239, 68, 68, .18); border: 1px solid rgba(239, 68, 68, .5); color: #fecaca; text-decoration: line-through; text-decoration-color: rgba(254, 202, 202, .6); }
.ans.skip { background: rgba(245, 158, 11, .16); border: 1px solid rgba(245, 158, 11, .5); color: #fde68a; }
.ans.right { background: rgba(34, 197, 94, .2); border: 1px solid rgba(34, 197, 94, .6); color: #bbf7d0; }
.m-why { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(6, 182, 212, .1); border: 1px dashed rgba(6, 182, 212, .4); font-size: .92rem; line-height: 1.55; }
.m-why a { color: var(--a2); font-weight: 600; cursor: pointer; }

.rule-card { padding: 24px; margin-bottom: 18px; position: relative; overflow: hidden; animation: pageIn .45s backwards; }
.rule-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(var(--a1), var(--a2)); }
.rule-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.rule-head h3 { margin: 0; font-family: var(--font-fun); font-size: 1.35rem; }
.rule-head .uz { color: var(--muted); font-size: .92rem; }
.rule-count { margin-left: auto; padding: 6px 12px; border-radius: 12px; background: rgba(239, 68, 68, .18); color: #fecaca; font-weight: 700; font-size: .85rem; }
.rule-body { margin-top: 14px; line-height: 1.7; font-size: .98rem; }
.formula { display: grid; gap: 6px; margin: 14px 0; }
.formula code { display: block; padding: 10px 14px; border-radius: 10px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); font-family: 'Consolas', 'Courier New', monospace; font-size: .92rem; color: #e9d5ff; white-space: pre-wrap; }
.examples { display: grid; gap: 6px; margin: 10px 0; }
.ex { padding: 8px 12px; border-radius: 10px; font-size: .95rem; }
.ex.ok { background: rgba(34, 197, 94, .12); border-left: 3px solid var(--ok); }
.ex.bad { background: rgba(239, 68, 68, .12); border-left: 3px solid var(--bad); text-decoration: line-through; text-decoration-color: rgba(248, 113, 113, .5); }
.ex.ok::before { content: '✓ '; color: #4ade80; font-weight: 800; }
.ex.bad::before { content: '✗ '; color: #f87171; font-weight: 800; display: inline-block; text-decoration: none; }
.tip { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(250, 204, 21, .1); border: 1px solid rgba(250, 204, 21, .35); color: #fef08a; font-size: .92rem; }
.rule-qs { margin-top: 14px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: .85rem; color: var(--muted); }
.rule-qs span { padding: 3px 9px; border-radius: 8px; background: rgba(239, 68, 68, .15); color: #fecaca; font-weight: 600; }
.book-ref { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); margin-top: 10px; }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.news-card { overflow: hidden; cursor: pointer; transition: transform .3s, box-shadow .3s; display: flex; flex-direction: column; }
.news-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(0, 0, 0, .45); }
.news-img { height: 180px; background: linear-gradient(135deg, var(--a1), var(--a2), var(--a3)); background-size: cover; background-position: center; position: relative; display: grid; place-items: center; font-size: 3rem; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.news-card:hover .news-img img { transform: scale(1.07); }
.news-new { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; background: linear-gradient(135deg, #ef4444, #f97316); font-size: .72rem; font-weight: 800; letter-spacing: 1px; animation: pulseBadge 1.5s infinite; }
.news-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-body h3 { margin: 0; font-size: 1.1rem; }
.news-body p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-date { font-size: .78rem; color: var(--muted); margin-top: auto; }
.news-full img { border-radius: 14px; margin-bottom: 16px; max-height: 360px; width: 100%; object-fit: cover; }
.news-full p { white-space: pre-wrap; line-height: 1.7; color: #e2e8f0; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- Modal & toasts ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(3, 5, 18, .7); backdrop-filter: blur(6px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal-card { width: min(680px, 100%); max-height: 88vh; overflow-y: auto; padding: 26px; border-radius: 22px; background: rgba(16, 18, 44, .97); border: 1px solid var(--line); box-shadow: var(--shadow); animation: dropIn .25s; }
.modal-card h2 { margin-top: 0; font-family: var(--font-fun); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; gap: 12px; align-items: center; min-width: 260px; max-width: 380px; padding: 14px 16px; border-radius: 16px; background: rgba(16, 18, 44, .96); border: 1px solid var(--line); box-shadow: var(--shadow); animation: toastIn .4s cubic-bezier(.2, .9, .3, 1.3); cursor: pointer; }
.toast.out { animation: toastOut .3s forwards; }
.toast .t-ico { font-size: 1.5rem; }
.toast b { display: block; }
.toast small { color: var(--muted); }
.toast.news { border-color: var(--a2); box-shadow: 0 0 0 1px var(--a2), 0 12px 40px rgba(6, 182, 212, .35); }
@keyframes toastIn { from { opacity: 0; transform: translateX(60px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(60px); } }

/* ---------- Admin ---------- */
.login-wrap { display: grid; place-items: center; min-height: 60vh; }
.login-card { width: min(420px, 100%); padding: 34px; text-align: center; }
.login-card .lock { font-size: 3rem; animation: bob 3s infinite; }
.field { display: flex; flex-direction: column; gap: 6px; text-align: left; margin-bottom: 14px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.input, textarea.input, select.input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .28);
  color: var(--text); font-family: inherit; font-size: .98rem; outline: none; transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--a2); box-shadow: 0 0 0 3px rgba(6, 182, 212, .25); }
textarea.input { min-height: 130px; resize: vertical; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 22px; }
.admin-card { padding: 20px; position: relative; overflow: hidden; }
.admin-card .ac-ico { font-size: 1.8rem; }
.admin-card b { display: block; font-family: var(--font-fun); font-size: 1.9rem; margin-top: 6px; }
.admin-card span { color: var(--muted); font-size: .88rem; }
.admin-card::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, var(--a1), transparent 70%); opacity: .45; }
.admin-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 20px 24px; margin-bottom: 18px; }
.admin-head h1 { margin: 0; font-family: var(--font-fun); font-size: 1.6rem; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-tabs button { padding: 11px 18px; border-radius: 13px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 600; }
.admin-tabs button.on { background: linear-gradient(135deg, var(--a1), var(--a2)); border-color: transparent; }
.panel { padding: 24px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.dropzone { position: relative; display: grid; place-items: center; min-height: 190px; border: 2px dashed var(--line); border-radius: 16px; background: rgba(0, 0, 0, .2); text-align: center; color: var(--muted); cursor: pointer; overflow: hidden; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.drag { border-color: var(--a2); background: rgba(6, 182, 212, .08); }
.dropzone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dropzone input { display: none; }
.preview-card { pointer-events: none; }
.admin-news-row { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); margin-bottom: 10px; }
.admin-news-row .bell-thumb { width: 64px; height: 64px; }
.admin-news-row .grow { flex: 1; min-width: 0; }
.admin-news-row h4 { margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bg-tile { position: relative; height: 104px; border-radius: 14px; border: 2px solid transparent; overflow: hidden; color: #fff; text-align: left; padding: 10px; display: flex; flex-direction: column; justify-content: flex-end; transition: transform .2s, border-color .2s, box-shadow .2s; }
.bg-tile canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bg-tile:hover { transform: translateY(-3px); }
.bg-tile.on { border-color: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .35), 0 0 22px rgba(34, 197, 94, .6); }
.bg-tile.on::after { content: '✓'; position: absolute; top: 8px; right: 10px; width: 24px; height: 24px; border-radius: 50%; background: #22c55e; display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.bg-tile b { position: relative; font-size: .86rem; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.bg-tile small { position: relative; font-size: .7rem; opacity: .85; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.theme-row { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-dot { width: 48px; height: 48px; border-radius: 14px; border: 3px solid transparent; transition: transform .2s; }
.theme-dot:hover { transform: scale(1.08); }
.theme-dot.on { border-color: #fff; box-shadow: 0 0 16px rgba(255, 255, 255, .5); }
.range-row { display: grid; grid-template-columns: 170px 1fr 50px; align-items: center; gap: 12px; margin: 12px 0; }
.range-row input[type=range] { accent-color: var(--a2); width: 100%; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; margin: 8px 0; }
.switch input { display: none; }
.switch i { width: 48px; height: 26px; border-radius: 26px; background: rgba(255, 255, 255, .18); position: relative; transition: .25s; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .25s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { left: 25px; }
.sub-title { font-size: 1.05rem; margin: 22px 0 12px; }
.mode-note { font-size: .82rem; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--muted); }

/* ---------- Progress page ---------- */
.hist-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 120px; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.hist-row.head { font-weight: 700; color: var(--muted); font-size: .85rem; }
.bar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--a1), var(--a2)); }

.footer { padding: 22px clamp(14px, 3vw, 36px); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .88rem; border-top: 1px solid var(--line); background: rgba(10, 12, 32, .5); backdrop-filter: blur(10px); }

.confetti { position: fixed; top: -12px; width: 10px; height: 14px; z-index: 300; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }

/* ---------- Members, avatars, accounts ---------- */
.avatar { border-radius: 50%; object-fit: cover; background: #fff; flex-shrink: 0; display: inline-block; }
.avatar.sm { width: 34px; height: 34px; border: 2px solid rgba(255, 255, 255, .7); }
.avatar.sm.inline { width: 30px; height: 30px; vertical-align: middle; }
.avatar.md { width: 52px; height: 52px; border: 2px solid var(--line); }
.avatar.xl { width: 96px; height: 96px; border: 3px solid #fff; box-shadow: 0 0 0 4px var(--a1), 0 10px 30px rgba(0, 0, 0, .4); }
.avatar.xxl { width: 132px; height: 132px; border: 4px solid #fff; }
.av-stack { display: inline-flex; }
.av-stack img { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #0f1230; margin-left: -10px; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.av-stack img:first-child { margin-left: 0; }
.av-stack.mini img { width: 22px; height: 22px; margin-left: -8px; border-width: 1.5px; }
.av-stack img { animation: avPop .5s backwards; }
.av-stack img:nth-child(2) { animation-delay: .08s; } .av-stack img:nth-child(3) { animation-delay: .16s; } .av-stack img:nth-child(4) { animation-delay: .24s; } .av-stack img:nth-child(5) { animation-delay: .32s; }
@keyframes avPop { from { opacity: 0; transform: scale(.3) translateY(8px); } }

.members-chip { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 14px 0 10px; border-radius: 14px; background: linear-gradient(135deg, rgba(34, 197, 94, .18), rgba(6, 182, 212, .18)); border: 1px solid rgba(74, 222, 128, .4); font-size: .9rem; white-space: nowrap; }
.members-chip b { font-family: var(--font-fun); font-size: 1.1rem; color: #86efac; font-variant-numeric: tabular-nums; }
.members-chip .mc-label { color: var(--muted); }
.user-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 5px; border-radius: 22px; background: var(--card-2); border: 1px solid var(--line); font-weight: 600; transition: .2s; max-width: 170px; }
.user-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-btn:hover { background: rgba(255, 255, 255, .14); transform: translateY(-2px); }
.hero-members { display: flex; align-items: center; gap: 12px; margin-top: 22px; color: var(--muted); font-size: .95rem; }
.hero-members b { color: #fff; font-family: var(--font-fun); font-size: 1.15rem; }
.stats { grid-template-columns: repeat(5, 1fr); }
.stat-members { background: linear-gradient(135deg, rgba(34, 197, 94, .22), rgba(6, 182, 212, .18)); border-color: rgba(74, 222, 128, .45); }
.stat-members b { background: linear-gradient(135deg, #fff, #4ade80); -webkit-background-clip: text; background-clip: text; }

.welcome { text-align: center; }
.welcome-logo { width: 96px; height: 96px; margin: 0 auto 6px; }
.welcome-logo svg { width: 100%; filter: drop-shadow(0 0 24px var(--a1)); animation: logoFloat 3s ease-in-out infinite; }
.welcome h2 { font-size: 1.8rem; margin: 8px 0; }
.welcome-members { display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px; margin: 12px 0; border-radius: 999px; background: rgba(34, 197, 94, .14); border: 1px solid rgba(74, 222, 128, .4); }
.welcome-members b { font-family: var(--font-fun); font-size: 1.3rem; color: #86efac; }
.welcome-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; text-align: left; }
.welcome-perks div { padding: 12px 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); font-size: .9rem; animation: popIn .45s backwards; }
.welcome-perks div:nth-child(2) { animation-delay: .07s; } .welcome-perks div:nth-child(3) { animation-delay: .14s; } .welcome-perks div:nth-child(4) { animation-delay: .21s; }
.modal-actions.center { justify-content: center; }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 16px; background: rgba(0, 0, 0, .3); margin-bottom: 18px; }
.auth-tabs button { padding: 11px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 600; }
.auth-tabs button.on { background: linear-gradient(135deg, var(--a1), var(--a2)); color: #fff; }
.auth-reason { padding: 10px 14px; border-radius: 12px; background: rgba(250, 204, 21, .12); border: 1px solid rgba(250, 204, 21, .4); color: #fef08a; margin-bottom: 14px; font-size: .92rem; }
.auth-err { color: #fca5a5; min-height: 1.3em; margin: 4px 0 10px; font-size: .9rem; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; font-size: 1.1rem; padding: 6px; }
.av-picker { margin-bottom: 8px; }
.av-preview { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.av-upload { cursor: pointer; }
.av-sub { font-size: .85rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.av-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.av-opt { padding: 0; border: 3px solid transparent; border-radius: 50%; background: none; aspect-ratio: 1; transition: transform .15s, border-color .15s; }
.av-opt img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.av-opt:hover { transform: scale(1.08); }
.av-opt.on { border-color: #4ade80; box-shadow: 0 0 14px rgba(34, 197, 94, .7); }

.profile-head { display: flex; align-items: center; gap: 28px; padding: 28px; margin-bottom: 20px; flex-wrap: wrap; }
.profile-head h1 { margin: 0 0 4px; font-family: var(--font-fun); }
.profile-ring { padding: 6px; border-radius: 50%; background: conic-gradient(var(--a1), var(--a2), var(--a3), var(--a1)); animation: spin 8s linear infinite; }
.profile-ring .avatar { display: block; animation: spin 8s linear infinite reverse; }
.member-row .grow h4 { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .levels { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { height: 260px; }
  .orbit.o1 { width: 240px; height: 240px; }
  .runner { grid-template-columns: 1fr; }
  .navigator { position: static; }
  .result-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .res-stats { justify-content: center; }
  .two-col { grid-template-columns: 1fr; }
  .burger { display: inline-flex; }
  .nav { position: fixed; top: 70px; left: 10px; right: 10px; flex-direction: column; align-items: stretch; padding: 10px; background: rgba(12, 14, 36, .97); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); display: none; }
  .nav.open { display: flex; }
  .nav-drop-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 10px; }
  .admin-btn span, .brand-tag { display: none; }
  .members-chip .mc-label, .members-chip .mc-stack, .user-btn span { display: none; }
  .user-btn { padding: 0 5px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .options { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat-members { grid-column: 1 / -1; }
  .welcome-perks { grid-template-columns: 1fr; }
  .av-grid { grid-template-columns: repeat(4, 1fr); }
  .members-chip { padding: 0 10px; }
  .top-actions { gap: 6px; }
  .levels, .admin-grid { grid-template-columns: 1fr; }
  .hist-row { grid-template-columns: 1fr 80px; }
  .hist-row > :nth-child(2), .hist-row > :nth-child(3) { display: none; }
  .range-row { grid-template-columns: 1fr 60px; }
  .range-row label { grid-column: 1 / -1; }
  .brand-name { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body.no-anim *, body.no-anim *::before, body.no-anim *::after { animation: none !important; }
body.no-anim .opt.selected { animation: glowGreen 1.5s ease-in-out infinite alternate !important; }

/* ---------- top bar spacing with members chip + user button ---------- */
.top-actions > * { flex-shrink: 0; }
.nav > a, .nav-drop-btn { white-space: nowrap; }
.mc-stack { display: inline-flex; }
@media (max-width: 1360px) {
  .brand-tag, .members-chip .mc-stack { display: none; }
  .nav > a, .nav-drop-btn { padding: 9px 10px; font-size: .9rem; }
  .topbar { gap: 12px; }
}
@media (max-width: 1180px) and (min-width: 901px) {
  .admin-btn span, .members-chip .mc-label { display: none; }
}
.nav-admin { display: none; }
.welcome h2 { overflow-wrap: anywhere; }
html, body { max-width: 100%; }
@media (max-width: 600px) {
  .topbar { padding: 10px 10px; gap: 8px; }
  .brand-logo { width: 38px; height: 38px; }
  .brand-name { font-size: 1.1rem; }
  .top-actions .admin-btn { display: none; }
  .nav .nav-admin { display: block; }
  .icon-btn, .members-chip, .user-btn { height: 40px; min-width: 40px; }
  .icon-btn { padding: 0 9px; }
  #authBtn { padding: 8px 10px; font-size: .82rem; }
  .modal { padding: 10px; }
  .modal-card { padding: 20px 16px; }
}
@media (max-width: 380px) {
  .brand-text { display: none; }
}
.hero-members .av-stack { flex-shrink: 0; } .hero-members { flex-wrap: wrap; }
