/* CyberMath — Тоглоомын төвийн шинэ цайвар загвар (C «Адал явдал»). cm-ui.js нь апп нээгдэх үед html.cmx тавина.
   Компьютер (≥769px): дээд цэс (#cmx-tabs + «Цааш» #cmx-more). Утас: app-mobile.css-ийн доод таб (+ «Нүүр»).
   «Нүүр» (#tab-home): өдөр/үдэш/шөнийн тэнгэр дэх бүлгийн арлууд, арлын сэдвүүд, сорилын нислэг; доор нь тоглоом, тэргүүлэгчид, богино картууд.
   Хуучин hero, хэвтээ табын мөр, streak/XP баннерыг нууна — агуулга нь «Нүүр»-т шилжинэ. */
#cmx-tabs, #cmx-more { display: none; }

html.cmx {
  --cx-tx: #1E1A4D; --cx-mut: #68628F; --cx-mut2: #9C96BC; --cx-line: rgba(30, 26, 77, .08); --cx-line2: rgba(30, 26, 77, .14);
  --cx-vio: #7B52EE; --cx-vio-d: #5B3BD9; --cx-gold: #FFC113; --cx-cy: #12C6D8; --cx-fd: 'Unbounded', 'Nunito', sans-serif;
}
html.cmx body {
  font-family: 'Nunito', 'Baloo 2', sans-serif; color: var(--cx-tx);
  background: radial-gradient(900px 520px at 8% -12%, rgba(123, 82, 238, .12), transparent 60%),
    radial-gradient(760px 460px at 100% -4%, rgba(18, 198, 216, .10), transparent 60%), linear-gradient(180deg, #FAF8FF, #F3F0FF 900px) #F3F0FF;
}
html.cmx #cybermath-app .hero,
html.cmx #cybermath-app .tabs,
html.cmx #streak-section,
html.cmx #cybermath-app .xp-banner,
html.cmx #tab-path > .section-title { display: none !important; }
/* «Төв солих» (Математикийн тоглоомын төв · Дасгалын төв) — дээд мөрөнд харагдана (утсан дээр «Цааш»-д) */
html.cmx #cybermath-app .cm-sw-chip { color: #4B2BC7 !important; }
html.cmx #cybermath-app .cm-sw-chip svg { color: var(--cx-vio); }
@media (min-width: 769px) and (max-width: 1239px) { html.cmx #cybermath-app .cm-sw-chip span { display: none; } }
html.cmx .tab-content[id^="tab-"] .section-title {
  font-family: var(--cx-fd); font-weight: 700; font-size: 1.25rem; letter-spacing: .2px; background: none; -webkit-text-fill-color: currentColor; color: var(--cx-tx);
}
html.cmx .tab-content[id^="tab-"] .section-title svg { color: var(--cx-vio); }

/* ════════ Компьютер: дээд цэс ════════ */
@media (min-width: 769px) {
  html.cmx #cybermath-app .navbar {
    min-height: 72px; padding: 0 26px; gap: 16px; overflow: visible; background: rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--cx-line); box-shadow: 0 10px 30px -28px rgba(30, 26, 77, .45);
  }
  html.cmx #cybermath-app .navbar > .logo svg { height: 34px !important; }
  html.cmx #cmx-tabs { display: flex; align-items: center; gap: 2px; margin: 0 auto; min-width: 0; }
  html.cmx #cybermath-app .nav-stats { gap: 8px; flex: none; }
  html.cmx #cybermath-app .stat-chip, html.cmx #friends-chip, html.cmx #daily-chip {
    min-height: 38px; padding: 0 13px !important; gap: 7px; font: 900 .9rem/1 'Nunito', sans-serif; border-radius: 999px;
    background: #fff !important; color: var(--cx-tx) !important; border: 1px solid var(--cx-line) !important; box-shadow: 0 8px 18px -12px rgba(30, 26, 77, .3);
  }
  html.cmx #daily-chip { color: #B05000 !important; }
  html.cmx #cybermath-app .stat-chip .icon svg { width: 18px; height: 18px; }
  html.cmx .tab-content[id^="tab-"].active { padding: 24px 28px 56px; box-sizing: border-box; max-width: 1320px; margin-left: auto; margin-right: auto; }
  html.cmx #tab-home.active { padding: 0 0 56px; max-width: none; }
  html.cmx #tab-path .lesson-path { max-width: 760px; margin: 0 auto; border-radius: 28px; overflow: hidden; box-shadow: 0 30px 60px -36px rgba(30, 26, 77, .55); }
}
#cmx-tabs a, #cmx-tabs .more {
  display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 12px; border: 0; background: none; cursor: pointer;
  color: #5F5986; font: 800 .9rem/1 'Nunito', sans-serif; text-decoration: none; white-space: nowrap; transition: background .15s ease, color .15s ease;
}
#cmx-tabs a:hover, #cmx-tabs .more:hover { background: #F6F3FF; color: var(--cx-tx); }
#cmx-tabs svg { width: 19px; height: 19px; flex: none; }
#cmx-tabs .more svg:last-child { width: 14px; height: 14px; margin-left: -2px; }
#cmx-tabs a.on, #cmx-tabs .more.on { color: #4B2BC7; background: #F1ECFF; box-shadow: inset 0 -3px 0 var(--cx-gold); }
#cmx-tabs a.on svg, #cmx-tabs .more.on svg { color: var(--cx-vio); }
#cmx-tabs a:focus-visible, #cmx-tabs .more:focus-visible { outline: 3px solid var(--cx-gold); outline-offset: 1px; }
@media (min-width: 769px) and (max-width: 1239px) {
  #cmx-tabs a span, #cmx-tabs .more span { display: none; }
  #cmx-tabs a, #cmx-tabs .more { padding: 0 12px; }
  html.cmx #cybermath-app .navbar { padding: 0 18px; gap: 10px; }
}
@media (min-width: 769px) and (max-width: 979px) {
  html.cmx #cybermath-app .stat-chip, html.cmx #friends-chip, html.cmx #daily-chip { padding: 0 9px !important; font-size: .82rem; }
  html.cmx #daily-chip { display: none !important; }
}
/* «Цааш» цэс */
#cmx-more.on {
  display: block; position: fixed; z-index: 1300; min-width: 250px; padding: 8px; border-radius: 18px; background: #fff; border: 1px solid var(--cx-line);
  box-shadow: 0 24px 48px -20px rgba(30, 26, 77, .45);
}
#cmx-more button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 12px; background: none; cursor: pointer; text-align: left;
  color: var(--cx-tx); font: 800 .92rem/1.2 'Nunito', sans-serif;
}
#cmx-more button:hover, #cmx-more button:focus-visible { background: #F6F3FF; outline: none; }
#cmx-more button svg { width: 19px; height: 19px; color: var(--cx-vio); flex: none; }
#cmx-more button em { margin-left: auto; font: 900 .68rem/1 'Nunito', sans-serif; font-style: normal; padding: 4px 8px; border-radius: 999px; background: var(--cx-cy); color: #fff; }

/* ════════ «Нүүр» ════════ */
#tab-home { color: var(--cx-tx, #1E1A4D); font-family: 'Nunito', sans-serif; }
#tab-home * { box-sizing: border-box; }
#tab-home h1, #tab-home h2, #tab-home h3, #tab-home h4 { margin: 0; font-family: var(--cx-fd, 'Unbounded', sans-serif); font-weight: 700; letter-spacing: .1px; }
#tab-home button { font-family: inherit; }
#tab-home .hx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 22px; border-radius: 16px; border: 0; cursor: pointer;
  font: 900 1rem/1 'Nunito', sans-serif; white-space: nowrap; text-decoration: none; transition: transform .12s ease, filter .15s ease;
}
#tab-home .hx-btn svg { width: 19px; height: 19px; flex: none; }
#tab-home .hx-btn:active { transform: translateY(2px); }
#tab-home .hx-btn.gold { background: linear-gradient(180deg, #FFD84A, #FFB300); color: #3B2700; box-shadow: 0 5px 0 #C68600, 0 18px 34px -12px rgba(255, 179, 0, .75); }
#tab-home .hx-btn.gold:hover { filter: brightness(1.04); }
#tab-home .hx-btn.ghost { background: #fff; color: var(--cx-tx, #1E1A4D); border: 1.5px solid #E1DBF4; box-shadow: 0 4px 0 #E1DBF4; }
#tab-home .hx-btn.sm { height: 40px; padding: 0 14px; font-size: .88rem; border-radius: 12px; }
#tab-home .hx-btn:focus-visible, #tab-home .hx-isl:focus-visible, #tab-home .hx-tp:focus-visible, #tab-home .hx-mini:focus-visible, #tab-home .hx-link:focus-visible { outline: 3px solid #7B52EE; outline-offset: 3px; }
#tab-home .hx-prog { height: 9px; border-radius: 99px; background: #ECE8F8; overflow: hidden; }
#tab-home .hx-prog i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #FFB300, #FFE066); }
#tab-home .hx-eb { display: inline-flex; align-items: center; gap: 8px; color: #D99A00; font: 900 .76rem/1 'Nunito', sans-serif; letter-spacing: .14em; text-transform: uppercase; }
#tab-home .hx-eb i { width: 8px; height: 8px; border-radius: 50%; background: #FFC113; box-shadow: 0 0 0 4px rgba(255, 193, 19, .22), 0 0 12px #FFC113; }
#tab-home .hx-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font: 900 .7rem/1.1 'Nunito', sans-serif;
  color: #fff; background: rgba(10, 5, 32, .6); border: 1px solid rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
#tab-home .hx-chip svg { width: 12px; height: 12px; }
#tab-home .hx-chip.pr { color: #FFD84A; border-color: rgba(255, 193, 19, .45); }
#tab-home .hx-chip.new { background: var(--cx-cy, #12C6D8); border-color: transparent; color: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
#tab-home .hx-chip.st { background: #F1ECFF; color: #5B3BD9; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
#tab-home .hx-chip.st.done { background: #E3F9EE; color: #138A55; }

/* ── Тэнгэр + газрын зураг ── */
#tab-home .hx-sky {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 410px minmax(0, 1fr); grid-template-rows: auto 1fr;
  min-height: 470px; border-bottom: 1px solid var(--cx-line, rgba(30, 26, 77, .08)); isolation: isolate;
}
/* Сансар (гарагууд): өдөр — цэнхэр сансар ба нар, үдэш — ягаан мананцар ба жаргах нар, шөнө — гүн сансар ба сар. Бүгд бараан тул нэр цагаан. */
#tab-home .hx-sky { color: #fff; }
#tab-home .hx-sky.day { background: radial-gradient(560px 300px at 72% 10%, rgba(96, 165, 250, .45), transparent 70%), radial-gradient(520px 280px at 30% 110%, rgba(167, 139, 250, .5), transparent 70%), linear-gradient(180deg, #0F2A6E 0%, #26338F 55%, #4A3BB3 100%); }
#tab-home .hx-sky.dusk { background: radial-gradient(600px 300px at 88% 96%, rgba(255, 140, 90, .55), transparent 70%), radial-gradient(520px 280px at 30% 0%, rgba(236, 72, 153, .35), transparent 70%), linear-gradient(180deg, #1E0B4A 0%, #4B1A78 55%, #8A3584 100%); }
#tab-home .hx-sky.night { background: radial-gradient(600px 300px at 50% 120%, rgba(123, 82, 238, .55), transparent 70%), linear-gradient(180deg, #0A0626 0%, #1A0E4A 64%, #29156B 100%); }
#tab-home .hx-deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
#tab-home .hx-deco .neb { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .5; }
#tab-home .hx-deco .n1 { left: 38%; top: 8%; width: 260px; height: 120px; background: rgba(129, 140, 248, .55); }
#tab-home .hx-deco .n2 { left: 66%; top: 58%; width: 300px; height: 130px; background: rgba(236, 72, 153, .32); }
#tab-home .night .hx-deco .neb { opacity: .3; }
#tab-home .hx-deco .sun { position: absolute; right: 22%; top: 30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, #FFFEF2 0 16%, #FFE58A 30%, rgba(255, 210, 90, .45) 46%, rgba(255, 210, 90, .12) 60%, rgba(255, 210, 90, 0) 70%); }
#tab-home .dusk .hx-deco .sun { top: auto; bottom: 20px; right: 2%; width: 150px; height: 150px; background: radial-gradient(circle, #FFF1C9 0 14%, #FFB070 30%, rgba(255, 140, 90, .45) 46%, rgba(255, 140, 90, .12) 60%, rgba(255, 140, 90, 0) 70%); }
#tab-home .hx-deco .moon { position: absolute; right: 10%; top: 38px; width: 70px; height: 70px; border-radius: 50%; box-shadow: -14px 10px 0 0 #FFF4C9; filter: drop-shadow(0 0 18px rgba(255, 244, 201, .6)); }
#tab-home .hx-deco .stars { position: absolute; inset: 0; opacity: .75;
  background-image: radial-gradient(1.6px 1.6px at 22px 34px, #fff, transparent), radial-gradient(1.1px 1.1px at 96px 120px, #fff, transparent),
    radial-gradient(1.4px 1.4px at 170px 62px, #E6DCFF, transparent), radial-gradient(1px 1px at 236px 168px, #fff, transparent), radial-gradient(1.3px 1.3px at 300px 26px, #fff, transparent);
  background-size: 330px 210px; }
#tab-home .hx-deco .cl { position: absolute; height: 34px; border-radius: 40px; background: rgba(255, 255, 255, .85); filter: blur(1px); }
#tab-home .hx-deco .cl::before, #tab-home .hx-deco .cl::after { content: ''; position: absolute; bottom: 10px; border-radius: 50%; background: inherit; }
#tab-home .hx-deco .cl::before { left: 18%; width: 46%; height: 150%; }
#tab-home .hx-deco .cl::after { right: 16%; width: 34%; height: 120%; }
#tab-home .hx-deco .c1 { left: 44%; top: 70px; width: 120px; }
#tab-home .hx-deco .c2 { left: 70%; top: 150px; width: 90px; opacity: .8; }
#tab-home .hx-deco .c3 { left: 28%; top: 200px; width: 70px; opacity: .7; }
#tab-home .dusk .hx-deco .cl { background: rgba(255, 228, 236, .8); }
#tab-home .hx-hi { position: relative; z-index: 3; grid-column: 1; grid-row: 1; padding: 30px 0 0 32px; }
#tab-home .hx-hi h1 { font-size: 1.85rem; line-height: 1.15; }
#tab-home .hx-hi p { margin: 6px 0 0; color: #D9D2FA; font-size: .95rem; }
#tab-home .hx-stat { position: absolute; z-index: 3; right: 30px; top: 26px; text-align: right; }
#tab-home .hx-stat b { display: block; font: 700 2rem/1 var(--cx-fd, 'Unbounded', sans-serif); }
#tab-home .hx-stat span { display: block; margin-top: 4px; font-size: .84rem; color: #D9D2FA; }
#tab-home .hx-stat .lv { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .85); color: var(--cx-tx, #1E1A4D); font: 900 .8rem/1 'Nunito', sans-serif; box-shadow: 0 8px 18px -12px rgba(30, 26, 77, .35); }
#tab-home .hx-stat .lv i { display: block; width: 70px; height: 6px; border-radius: 9px; background: #ECE8F8; overflow: hidden; }
#tab-home .hx-stat .lv i span { display: block; height: 100%; margin: 0; border-radius: 9px; background: linear-gradient(90deg, #FFB300, #FFE066); }
#tab-home .hx-map { position: relative; z-index: 2; grid-column: 2; grid-row: 1 / span 2; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#tab-home .hx-map::-webkit-scrollbar { display: none; }
#tab-home .hx-lay { position: relative; height: 470px; transition: transform .45s cubic-bezier(.2, .8, .2, 1); transform-origin: var(--zx, 50%) 60%; }
#tab-home .hx-lay.zoom { transform: scale(1.1); }
#tab-home .hx-road { position: absolute; left: 0; top: 0; pointer-events: none; }
#tab-home .hx-isl {
  position: absolute; width: 176px; margin-left: -88px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none;
  cursor: pointer; color: inherit; transition: transform .2s ease, opacity .3s ease;
}
#tab-home .hx-isl:hover { transform: translateY(-4px); }
#tab-home .hx-isl .ig { width: 150px; height: 80px; display: block; overflow: visible; filter: drop-shadow(0 14px 14px rgba(30, 26, 77, .18)); }
/* Гараг: хэмжээ нь SVG-ийн width/height, хөвөх (bob), гадаргуу эргэх (plSpin), бүслүүрийн бөөмс гүйх (plRing) */
#tab-home .hx-isl .ig.pl { width: auto; height: auto; filter: drop-shadow(0 16px 18px rgba(5, 2, 30, .45)); animation: plBob 6s ease-in-out infinite; animation-delay: var(--bd, 0s); }
#tab-home .hx-isl.cur .ig.pl { filter: drop-shadow(0 0 26px rgba(255, 200, 40, .55)) drop-shadow(0 16px 18px rgba(5, 2, 30, .45)); }
#tab-home .hx-isl.lock .ig.pl { filter: saturate(.3) brightness(.78) drop-shadow(0 16px 18px rgba(5, 2, 30, .45)); }
#tab-home .pl-sf { animation: plSpin 30s linear infinite; }
#tab-home .pl-pt text { fill: rgba(255, 255, 255, .5); font-family: 'Unbounded', 'Nunito', sans-serif; font-weight: 700; }
#tab-home .pl-pt path, #tab-home .pl-pt circle { fill: none; stroke: rgba(255, 255, 255, .45); stroke-linecap: round; stroke-linejoin: round; }
#tab-home .pl-pt rect { fill: rgba(255, 255, 255, .34); }
#tab-home .pl-rp { stroke-dasharray: 1.5 11; animation: plRing 6s linear infinite; }
@keyframes plSpin { to { transform: translateX(var(--pw, -88px)); } }
@keyframes plRing { to { stroke-dashoffset: -25; } }
@keyframes plBob { 50% { transform: translateY(-5px); } }
#tab-home .hx-isl .nm { font: 700 .82rem/1.25 var(--cx-fd, 'Unbounded', sans-serif); text-align: center; max-width: 176px; color: #fff; text-shadow: 0 2px 10px rgba(5, 2, 30, .75), 0 0 2px rgba(5, 2, 30, .6); }
#tab-home .hx-isl .ss { padding: 4px 10px; border-radius: 999px; font: 900 .72rem/1 'Nunito', sans-serif; color: #EDE7FF; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .18); }
#tab-home .hx-isl.cur .ss { color: #3B2700; background: linear-gradient(180deg, #FFD84A, #FFB300); border-color: transparent; }
#tab-home .hx-isl.done .ss { color: #fff; background: #16A34A; border-color: transparent; }
#tab-home .hx-isl.lock .ss { color: #C9C0F2; background: rgba(255, 255, 255, .08); }
#tab-home .hx-lay.zoom .hx-isl:not(.sel) { opacity: .45; }
#tab-home .hx-isl.sel { transform: translateY(-6px) scale(1.06); }
#tab-home .hx-pin { position: absolute; z-index: 4; width: 96px; margin-left: -48px; pointer-events: none; }
#tab-home .hx-pin .ck svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 12px 14px rgba(30, 26, 77, .3)); }
#tab-home .hx-pin .bal { display: none; position: absolute; left: 50%; bottom: 66%; width: 92px; margin-left: -46px; }
#tab-home .hx-pin .bal svg { width: 100%; height: auto; display: block; }
#tab-home .hx-pin.fly .bal { display: block; }
#tab-home .hx-pin.land { animation: hxLand .5s ease; }
@keyframes hxLand { 0% { transform: translateY(-10px); } 60% { transform: translateY(4px); } 100% { transform: none; } }
#tab-home .hx-fly {
  position: absolute; z-index: 5; left: 50%; top: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  background: #1E1A4D; color: #fff; font: 800 .86rem/1.2 'Nunito', sans-serif; box-shadow: 0 16px 30px -16px rgba(30, 26, 77, .7); white-space: nowrap; animation: hxIn .4s ease;
}
#tab-home .hx-fly svg { width: 16px; height: 16px; color: #FFD84A; }
@keyframes hxIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
#tab-home .hx-load { position: absolute; left: 40px; right: 40px; top: 50%; display: flex; gap: 60px; justify-content: center; }
#tab-home .hx-load i { width: 140px; height: 44px; border-radius: 50%; background: rgba(123, 82, 238, .14); animation: hxPulse 1.2s ease-in-out infinite; }
@keyframes hxPulse { 50% { opacity: .45; } }

/* Самбар: дараагийн зогсоол / арлын сэдвүүд / багшийн самбар */
#tab-home .hx-panel {
  position: relative; z-index: 3; grid-column: 1; grid-row: 2; align-self: end; margin: 18px 0 30px 32px; max-width: 370px; padding: 20px 22px; border-radius: 24px;
  background: rgba(255, 255, 255, .93); color: var(--cx-tx, #1E1A4D); border: 1px solid #E3DCFA; box-shadow: 0 30px 60px -34px rgba(60, 40, 140, .5);
}
#tab-home .hx-panel h2 { font-size: 1.45rem; line-height: 1.15; margin: 10px 0 6px; overflow-wrap: anywhere; }
#tab-home .hx-panel .mt { color: var(--cx-mut, #68628F); font-size: .88rem; line-height: 1.4; }
#tab-home .hx-panel .mt b { color: var(--cx-tx, #1E1A4D); }
#tab-home .hx-panel .pw { display: flex; align-items: center; gap: 10px; margin: 14px 0 16px; font: 800 .78rem/1 'Nunito', sans-serif; color: var(--cx-mut, #68628F); }
#tab-home .hx-panel .pw .hx-prog { flex: 1; }
#tab-home .hx-panel .ac { display: flex; gap: 10px; flex-wrap: wrap; }
#tab-home .hx-panel .ac .gold { flex: 1 1 auto; }
#tab-home .hx-back { display: inline-flex; align-items: center; gap: 4px; padding: 4px 2px; border: 0; background: none; cursor: pointer; color: #6D45E8; font: 800 .84rem/1 'Nunito', sans-serif; }
#tab-home .hx-back svg { width: 16px; height: 16px; }
#tab-home .hx-tl { list-style: none; margin: 12px 0 0; padding: 0; max-height: 236px; overflow-y: auto; scrollbar-width: thin; }
#tab-home .hx-tp {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 8px; border: 0; border-radius: 12px; background: none; cursor: pointer; text-align: left;
  color: var(--cx-tx, #1E1A4D); font: 800 .88rem/1.25 'Nunito', sans-serif;
}
#tab-home .hx-tp:hover { background: #F6F3FF; }
#tab-home .hx-tp .dt { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #F1EEFA; color: #8E86BC; }
#tab-home .hx-tp .dt svg { width: 14px; height: 14px; }
#tab-home .hx-tp.ok .dt { background: #16B26A; color: #fff; }
#tab-home .hx-tp.now .dt { background: linear-gradient(180deg, #FFD84A, #FFB300); color: #3B2700; box-shadow: 0 0 0 4px rgba(255, 193, 19, .25); }
#tab-home .hx-tp.op .dt { background: #EFE9FF; color: #6D45E8; }
#tab-home .hx-tp.lk { color: #9C96BC; }
#tab-home .hx-tp .tn { flex: 1; min-width: 0; }
#tab-home .hx-tp .ch { color: #B9B2D6; flex: none; }
#tab-home .hx-tp .ch svg { width: 16px; height: 16px; }
#tab-home .hx-tch { position: relative; z-index: 2; grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; justify-content: center; gap: 28px; padding: 30px; }
#tab-home .hx-tch .ck { width: 200px; }
#tab-home .hx-tch .ck svg { width: 100%; height: auto; display: block; }
#tab-home .hx-tch p { max-width: 280px; font: 700 1.25rem/1.35 var(--cx-fd, 'Unbounded', sans-serif); }

/* ── Доод хэсэг ── */
#tab-home .hx-below { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .9fr); gap: 20px; max-width: 1320px; margin: 0 auto; padding: 24px 28px 0; align-items: start; }
#tab-home .hx-card { position: relative; overflow: hidden; border-radius: 24px; padding: 20px 22px; background: #fff; border: 1px solid var(--cx-line, rgba(30, 26, 77, .08)); box-shadow: 0 18px 36px -28px rgba(30, 26, 77, .35); }
#tab-home .hx-card > h3 { display: flex; align-items: center; gap: 10px; font-size: 1.08rem; margin-bottom: 14px; }
#tab-home .hx-card > h3 svg { width: 21px; height: 21px; color: #7B52EE; flex: none; }
#tab-home .hx-link { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; padding: 4px 2px; border: 0; background: none; cursor: pointer; color: #6D45E8; font: 800 .84rem/1 'Nunito', sans-serif; white-space: nowrap; }
#tab-home .hx-link svg { width: 15px !important; height: 15px !important; }
#tab-home .hx-feat { position: relative; display: block; width: 100%; height: 160px; border-radius: 18px; overflow: hidden; border: 0; padding: 0; cursor: pointer; margin-bottom: 12px; background: #1d1150; text-align: left; color: #fff; }
#tab-home .hx-feat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#tab-home .hx-feat::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 5, 32, .9), rgba(10, 5, 32, 0) 72%); }
#tab-home .hx-feat .tx { position: absolute; z-index: 2; left: 18px; top: 50%; transform: translateY(-50%); }
#tab-home .hx-feat .tx b { display: block; font: 700 1.45rem/1.05 var(--cx-fd, 'Unbounded', sans-serif); }
#tab-home .hx-feat .tx small { display: block; margin: 5px 0 12px; font-size: .8rem; color: #E1D8FF; }
#tab-home .hx-feat .tx .hx-btn { height: 38px; font-size: .86rem; padding: 0 14px; }
#tab-home .hx-feat .tp { position: absolute; z-index: 2; top: 10px; right: 10px; }
#tab-home .hx-gl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#tab-home .hx-gi { display: block; padding: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--cx-line, rgba(30, 26, 77, .08)); background: #fff; cursor: pointer; text-align: left; color: inherit; transition: transform .15s ease; }
#tab-home .hx-gi:hover { transform: translateY(-2px); }
#tab-home .hx-gi .im { position: relative; display: block; height: 66px; background: #1d1150; }
#tab-home .hx-gi .im img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#tab-home .hx-gi .im .hx-chip { position: absolute; top: 5px; right: 5px; padding: 3px 7px; font-size: .62rem; }
#tab-home .hx-gi b { display: block; padding: 7px 9px 8px; font: 700 .72rem/1.2 var(--cx-fd, 'Unbounded', sans-serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tab-home .hx-lb ol { list-style: none; margin: 0; padding: 0; }
#tab-home .hx-lb li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #EEEAF8; font: 800 .9rem/1.2 'Nunito', sans-serif; min-width: 0; }
#tab-home .hx-lb li .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tab-home .hx-lb li .av { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; background: #FFE9A6; }
#tab-home .hx-lb li .av svg, #tab-home .hx-lb li .av img { width: 100%; height: 100%; display: block; object-fit: cover; }
#tab-home .hx-lb li .r { width: 24px; text-align: center; flex: none; font: 700 .95rem/1 var(--cx-fd, 'Unbounded', sans-serif); color: #9C96BC; }
#tab-home .hx-lb li.p1 .r { color: #E0A100; } #tab-home .hx-lb li.p2 .r { color: #8E96B0; } #tab-home .hx-lb li.p3 .r { color: #D9813C; }
#tab-home .hx-lb li .x { color: var(--cx-mut, #68628F); font-size: .8rem; white-space: nowrap; }
#tab-home .hx-lb li.me { margin-top: 6px; padding: 8px 10px; border: 1px solid #FFE08A; border-radius: 14px; background: #FFF7DB; }
#tab-home .hx-lb li.me .r { color: var(--cx-tx, #1E1A4D); }
#tab-home .hx-lb li.me .x { color: #C98A00; }
#tab-home .hx-empty { color: var(--cx-mut, #68628F); font-size: .88rem; padding: 10px 0; }
#tab-home .hx-side { display: flex; flex-direction: column; gap: 12px; }
#tab-home .hx-mini {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 16px; border-radius: 20px; background: #fff; border: 1px solid var(--cx-line, rgba(30, 26, 77, .08));
  box-shadow: 0 18px 36px -30px rgba(30, 26, 77, .4); cursor: pointer; text-align: left; color: inherit; transition: transform .15s ease;
}
#tab-home button.hx-mini:hover { transform: translateY(-2px); }
#tab-home .hx-mini .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; }
#tab-home .hx-mini .ic svg { width: 23px; height: 23px; }
#tab-home .hx-mini .tx { flex: 1; min-width: 0; }
#tab-home .hx-mini .tx b { display: block; font: 700 .92rem/1.2 var(--cx-fd, 'Unbounded', sans-serif); }
#tab-home .hx-mini .tx small { display: block; margin-top: 3px; font-size: .8rem; color: var(--cx-mut, #68628F); line-height: 1.3; }
#tab-home .hx-mini .go { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #F3F0FF; color: #6D45E8; }
#tab-home .hx-mini .go svg { width: 15px; height: 15px; }
#tab-home .hx-mini.f { cursor: default; flex-wrap: wrap; background: radial-gradient(200px 120px at 0% 0%, rgba(255, 138, 42, .18), transparent 70%), #fff; border-color: #FFE2CC; }
#tab-home .hx-mini.f .ic { background: linear-gradient(180deg, #FFEBD9, #FFD6B3); color: #FF7A1A; }
#tab-home .hx-mini.m .ic { background: linear-gradient(135deg, #FF5FA2, #B14CFF); }
#tab-home .hx-mini.e .ic { background: linear-gradient(135deg, #2EE6F6, #3B82F6); }
#tab-home .hx-mini.t .ic { background: linear-gradient(135deg, #7B52EE, #A855F7); }
#tab-home .hx-wk { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; width: 100%; }
#tab-home .hx-wk span { display: flex; flex-direction: column; align-items: center; gap: 4px; font: 800 .64rem/1 'Nunito', sans-serif; color: var(--cx-mut, #68628F); }
#tab-home .hx-wk b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #F2EFFA; border: 1px solid #E6E1F5; color: #fff; }
#tab-home .hx-wk b svg { width: 13px; height: 13px; }
#tab-home .hx-wk .ok b { background: linear-gradient(180deg, #FFA04D, #FF6A00); border-color: transparent; }
#tab-home .hx-wk .td b { background: linear-gradient(180deg, #FFD84A, #FFB300); border-color: transparent; color: #3B2700; }
#tab-home .hx-wk .td { color: #C98A00; }

/* ════════ Тавлет / утас ════════ */
@media (min-width: 769px) and (max-width: 1099px) {
  #tab-home .hx-sky { grid-template-columns: 340px minmax(0, 1fr); }
  #tab-home .hx-panel { margin-left: 22px; }
  #tab-home .hx-hi { padding-left: 22px; }
  #tab-home .hx-below { grid-template-columns: 1fr 1fr; }
  #tab-home .hx-side { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  html.cmx body.cm-app-on #streak-section, html.cmx body.cm-app-on #cybermath-app .xp-banner { display: none !important; }
  html.cmx .tab-content[id^="tab-"] .section-title { font-size: 1.05rem; }
  #tab-home .hx-sky { grid-template-columns: 1fr; grid-template-rows: auto auto auto; min-height: 0; }
  #tab-home .hx-hi { grid-column: 1; grid-row: 1; padding: 18px 16px 0; }
  #tab-home .hx-hi h1 { font-size: 1.3rem; }
  #tab-home .hx-hi p { font-size: .8rem; }
  #tab-home .hx-stat { display: none; }
  #tab-home .hx-map { grid-column: 1; grid-row: 2; }
  #tab-home .hx-tch { grid-column: 1; grid-row: 2; padding: 16px; gap: 14px; }
  #tab-home .hx-tch .ck { width: 120px; }
  #tab-home .hx-tch p { font-size: 1rem; }
  #tab-home .hx-lay { height: 300px; }
  #tab-home .hx-isl { width: 140px; margin-left: -70px; }
  #tab-home .hx-isl .ig { width: 116px; height: 62px; }
  #tab-home .hx-isl .ig.pl { width: auto; height: auto; }
  #tab-home .hx-isl .nm { font-size: .68rem; max-width: 136px; }
  #tab-home .hx-isl .ss { font-size: .64rem; padding: 3px 8px; }
  #tab-home .hx-pin { width: 72px; margin-left: -36px; }
  #tab-home .hx-deco .sun, #tab-home .hx-deco .moon { display: none; }
  #tab-home .hx-panel { grid-column: 1; grid-row: 3; margin: 0 14px 16px; max-width: none; padding: 16px; border-radius: 20px; }
  #tab-home .hx-panel h2 { font-size: 1.2rem; }
  #tab-home .hx-panel .ac .hx-btn { flex: 1 1 100%; }
  #tab-home .hx-fly { top: 64px; font-size: .74rem; padding: 7px 12px; max-width: calc(100% - 24px); white-space: normal; text-align: center; }
  #tab-home .hx-below { grid-template-columns: 1fr; gap: 14px; padding: 16px 14px 0; }
  #tab-home .hx-side { order: -1; }
  #tab-home .hx-feat { height: 130px; }
  #tab-home .hx-feat .tx b { font-size: 1.15rem; }
  #tab-home .hx-gi .im { height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  #tab-home .hx-lay, #tab-home .hx-isl, #tab-home .hx-mini, #tab-home .hx-gi, #tab-home .hx-btn, #cmx-tabs a { transition: none; }
  #tab-home .hx-pin.land, #tab-home .hx-fly, #tab-home .hx-load i, #tab-home .hx-isl .ig.pl, #tab-home .pl-sf, #tab-home .pl-rp { animation: none; }
}

/* ════════ Бодлогын дэлгэц (#quiz-modal.cmq — cm-quiz.js) ════════
   Логик хэвээр — зөвхөн харагдац: цайвар дэвсгэр, компьютерт 2 багана (бодлогын хуудас · хариулт), A–D, зам маягийн явц.
   MathLive-ийн гар (document.body-д) хөндөгдөхгүй; хуучин inline өнгийг (шар) !important-аар зөөлрүүлнэ. */
html.cmx #quiz-modal.cmq {
  background: radial-gradient(900px 520px at 6% -14%, rgba(123, 82, 238, .16), transparent 60%), radial-gradient(760px 460px at 100% -4%, rgba(18, 198, 216, .12), transparent 60%),
    linear-gradient(180deg, #FAF8FF, #F1EDFF);
  -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0;
}
html.cmx #quiz-modal.cmq .quiz-card {
  max-width: 780px; padding: 18px 24px 40px; background: transparent; border: 0; box-shadow: none; border-radius: 0; font-family: 'Nunito', 'Baloo 2', sans-serif; color: #1E1A4D;
}
html.cmx #quiz-modal.cmq-q { align-items: flex-start; }   /* асуулт дээд талдаа (MathLive гар гарахад inline flex-start тавьдагтай нийцнэ) */
html.cmx #quiz-modal.cmq-q .quiz-card { max-width: 1200px; margin: 0 auto; }
html.cmx #quiz-modal.cmq .quiz-header { gap: 14px; margin-bottom: 18px; align-items: center; }
html.cmx #quiz-modal.cmq .quiz-progress-bar { position: relative; overflow: visible; height: 10px; margin-right: 0; background: #E7E2F6; }
html.cmx #quiz-modal.cmq .quiz-progress-fill { background: linear-gradient(90deg, #FFB300, #FFD84A); }
html.cmx #quiz-modal.cmq .cmq-me {
  position: absolute; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: #FFE9A6; box-shadow: 0 0 0 3px #fff, 0 6px 12px -4px rgba(30, 26, 77, .35); transition: left .5s ease; pointer-events: none;
}
html.cmx #quiz-modal.cmq .cmq-me svg, html.cmx #quiz-modal.cmq .cmq-me img { width: 100%; height: 100%; display: block; object-fit: cover; }
html.cmx #quiz-modal.cmq .close-btn {
  flex: none; width: 42px; height: 42px; padding: 0; border-radius: 13px; background: #fff; border: 1px solid rgba(30, 26, 77, .08);
  box-shadow: 0 6px 14px -10px rgba(30, 26, 77, .4); display: grid; place-items: center; font-size: 1.05rem; color: #68628F;
}
html.cmx #quiz-modal.cmq .cmq-hud { display: flex; gap: 8px; flex: none; }
html.cmx #quiz-modal.cmq .cmq-hud span {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 999px; background: #fff; border: 1px solid rgba(30, 26, 77, .08);
  font: 900 .9rem/1 'Nunito', sans-serif; color: #1E1A4D; box-shadow: 0 8px 18px -12px rgba(30, 26, 77, .3);
}
html.cmx #quiz-modal.cmq .cmq-hud svg { width: 17px; height: 17px; }
html.cmx #quiz-modal.cmq .cmq-hud .h svg { color: #FF4B6E; }
html.cmx #quiz-modal.cmq .cmq-hud .c svg { color: #FF7A1A; }

/* 2 багана */
html.cmx #quiz-modal.cmq-q .cmq-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
html.cmx #quiz-modal.cmq-q .cmq-paper {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; padding: 20px 26px 22px; border-radius: 26px;
  background-color: #fff; background-image: linear-gradient(rgba(123, 82, 238, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(123, 82, 238, .07) 1px, transparent 1px);
  background-size: 26px 26px; background-position: -1px -1px; border: 1px solid rgba(30, 26, 77, .08); box-shadow: 0 26px 50px -34px rgba(30, 26, 77, .45);
}
html.cmx #quiz-modal.cmq-q .cmq-paper > * { flex: 1 1 100%; min-width: 0; }
html.cmx #quiz-modal.cmq-q .cmq-paper > .question-counter {
  flex: 0 0 auto; order: -3; margin: 0; padding: 7px 12px; border-radius: 999px; background: #F1ECFF; color: #5B3BD9; font: 900 .76rem/1 'Nunito', sans-serif; letter-spacing: .04em;
}
html.cmx #quiz-modal.cmq-q .cmq-paper > .cmq-char { flex: 0 0 auto; order: -2; margin: 0 0 0 auto !important; }
html.cmx #quiz-modal.cmq-q .cmq-paper > .cmq-flag { flex: 0 0 auto; order: -1; width: 36px !important; height: 36px !important; border-radius: 11px !important; background: #fff !important; border: 1px solid rgba(30, 26, 77, .1) !important; }
html.cmx #quiz-modal.cmq-q .cmq-paper .char-wrap { width: 64px; height: 64px; }
html.cmx #quiz-modal.cmq-q .cmq-paper .question-text {
  margin: 6px 0 4px; font-family: 'Nunito', 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.55rem; line-height: 1.4; color: #1E1A4D;
  padding-bottom: 14px; border-bottom: 1.5px dashed rgba(123, 82, 238, .18);
}
html.cmx #quiz-modal.cmq-q .cmq-bar { display: flex; flex-wrap: wrap; gap: 8px; }
html.cmx #quiz-modal.cmq-q .cmq-bar > button {
  display: inline-flex !important; align-items: center !important; justify-content: center; gap: 7px !important; width: auto !important; height: 38px !important; min-height: 0 !important;
  margin: 0 !important; padding: 0 14px !important; border-radius: 12px !important; background: #fff !important; border: 1.5px solid #E6E0F7 !important; box-shadow: none !important;
  color: #4B4475 !important; font: 800 .84rem/1 'Nunito', sans-serif !important; cursor: pointer;
}
html.cmx #quiz-modal.cmq-q .cmq-bar > button:hover { background: #F6F3FF !important; border-color: #C9B8FF !important; }
html.cmx #quiz-modal.cmq-q .cmq-bar > button svg { width: 17px; height: 17px; color: #7B52EE; stroke: currentColor; flex: none; }
html.cmx #quiz-modal.cmq-q .cmq-bar .cmq-tl { display: inline; }
html.cmx #quiz-modal.cmq-q .hint-box { margin: 4px 0 0; padding: 10px 14px; background: transparent; border: 0; border-left: 4px solid #C084FC; border-radius: 0 12px 12px 0; color: #4B4475; }
html.cmx #quiz-modal.cmq-q #memo-overlay { border-color: #E2DAF8 !important; border-radius: 18px !important; }
html.cmx #quiz-modal.cmq-q #memo-toolbar { background: #F7F5FF !important; border-top-color: #E6E0F7 !important; }
html.cmx #quiz-modal.cmq-q #qimage-box, html.cmx #quiz-modal.cmq-q #graph-box { border-color: #E2DAF8 !important; border-radius: 14px !important; }

/* Хариулт */
html.cmx #quiz-modal.cmq-q .cmq-ans { min-width: 0; display: flex; flex-direction: column; }
html.cmx #quiz-modal.cmq-q .cmq-ah { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 2px 12px; }
html.cmx #quiz-modal.cmq-q .cmq-ah b { font: 700 .95rem/1.2 'Unbounded', 'Nunito', sans-serif; }
html.cmx #quiz-modal.cmq-q .cmq-ah small { font: 800 .74rem/1 'Nunito', sans-serif; color: #68628F; white-space: nowrap; }
html.cmx #quiz-modal.cmq-q kbd {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: #fff; border: 1px solid #DCD5F2; box-shadow: 0 2px 0 #DCD5F2;
  font: 900 .68rem/1 'Nunito', sans-serif; color: #68628F;
}
html.cmx #quiz-modal.cmq-q .options-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; }
html.cmx #quiz-modal.cmq-q .option-btn {
  display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 10px 16px; border-radius: 18px; text-align: left;
  background: #fff; border: 2px solid #E6E0F7; box-shadow: 0 4px 0 #E6E0F7; color: #1E1A4D; font-family: 'Nunito', 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.2rem;
}
html.cmx #quiz-modal.cmq-q .option-btn:hover:not(:disabled) { border-color: #7B52EE; background: #F6F2FF; box-shadow: 0 4px 0 #5B3BD9; transform: translateY(-2px); color: #1E1A4D; }
html.cmx #quiz-modal.cmq-q .option-btn .cmq-ltr {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: #F2EFFA; color: #6E67A0; font: 800 .88rem/1 'Unbounded', 'Nunito', sans-serif;
}
html.cmx #quiz-modal.cmq-q .option-btn.selected { border-color: #7B52EE; background: #F6F2FF; box-shadow: 0 4px 0 #5B3BD9; color: #1E1A4D; }
html.cmx #quiz-modal.cmq-q .option-btn.selected .cmq-ltr { background: #7B52EE; color: #fff; }
html.cmx #quiz-modal.cmq-q .option-btn.correct { border-color: #16B26A; background: #E8FBF2; box-shadow: 0 4px 0 #0E8A51; color: #0E8A51; }
html.cmx #quiz-modal.cmq-q .option-btn.correct .cmq-ltr { background: #16B26A; color: #fff; }
html.cmx #quiz-modal.cmq-q .option-btn.wrong { border-color: #F04461; background: #FFEFF2; box-shadow: 0 4px 0 #C42640; color: #C42640; }
html.cmx #quiz-modal.cmq-q .option-btn.wrong .cmq-ltr { background: #F04461; color: #fff; }
html.cmx #quiz-modal.cmq-q .check-btn {
  min-height: 58px; padding: 14px; border-radius: 18px; font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 1.05rem; letter-spacing: .04em;
  background: linear-gradient(180deg, #FFD84A, #FFB300); color: #3B2700; box-shadow: 0 5px 0 #C68600, 0 18px 34px -14px rgba(255, 179, 0, .75);
}
html.cmx #quiz-modal.cmq-q .check-btn:hover:not(:disabled) { box-shadow: 0 7px 0 #C68600, 0 20px 36px -14px rgba(255, 179, 0, .8); }
html.cmx #quiz-modal.cmq-q .check-btn:disabled { background: #ECE8F8; color: #A49DC6; box-shadow: 0 5px 0 #DCD5F2; }
html.cmx #quiz-modal.cmq-q .feedback-bar { border-radius: 18px; padding: 14px 16px; font-family: 'Nunito', sans-serif; font-weight: 800; }
html.cmx #quiz-modal.cmq-q .feedback-bar.correct-fb { background: linear-gradient(135deg, #17C47A, #0E9E62); color: #fff; border: 0; box-shadow: 0 18px 36px -24px rgba(14, 158, 98, .8); }
html.cmx #quiz-modal.cmq-q .feedback-bar.correct-fb .katex, html.cmx #quiz-modal.cmq-q .feedback-bar.correct-fb .katex * { color: #fff !important; }
html.cmx #quiz-modal.cmq-q .feedback-bar.wrong-fb { background: #fff; color: #1E1A4D; border: 1px solid #FFD5DC; border-top: 4px solid #F04461; box-shadow: 0 18px 36px -26px rgba(30, 26, 77, .45); }
html.cmx #quiz-modal.cmq-q .feedback-bar.wrong-fb strong { color: #C42640; }
html.cmx #quiz-modal.cmq-q .feedback-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 0; }
html.cmx #quiz-modal.cmq-q .feedback-icon svg { width: 16px; height: 16px; }
html.cmx #quiz-modal.cmq-q .correct-fb .feedback-icon { background: rgba(255, 255, 255, .25); color: #fff; }
html.cmx #quiz-modal.cmq-q .wrong-fb .feedback-icon { background: #F04461; color: #fff; }
html.cmx #quiz-modal.cmq-q .cmq-ai {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; margin-top: 4px; padding: 0 14px; border-radius: 12px; cursor: pointer; background: #fff;
  border: 1.5px solid #E1DBF4; box-shadow: 0 3px 0 #E1DBF4; color: #1E1A4D; font: 900 .86rem/1 'Nunito', sans-serif;
}
html.cmx #quiz-modal.cmq-q .cmq-ai svg { width: 17px; height: 17px; color: #7B52EE; }

/* Дүн */
html.cmx #quiz-modal.cmq-r .quiz-card { max-width: 620px; }
html.cmx #quiz-modal.cmq-r .results-card {
  padding: 28px 26px 22px; border-radius: 28px; color: #1E1A4D; background: #fff; border: 1px solid rgba(30, 26, 77, .08); box-shadow: 0 30px 60px -36px rgba(30, 26, 77, .5);
}
html.cmx #quiz-modal.cmq-r .results-title { font-family: 'Unbounded', 'Nunito', sans-serif; font-weight: 700; font-size: 1.6rem; color: #1E1A4D; }
html.cmx #quiz-modal.cmq-r .results-subtitle { color: #68628F; margin-bottom: 18px; }
html.cmx #quiz-modal.cmq-r .results-stats { gap: 12px; flex-wrap: wrap; }
html.cmx #quiz-modal.cmq-r .result-stat { min-width: 110px; padding: 12px 16px; border-radius: 18px; background: #F6F3FF; border: 1px solid #ECE6FB; }
html.cmx #quiz-modal.cmq-r .result-stat .val { font-family: 'Unbounded', 'Nunito', sans-serif; font-weight: 700; font-size: 1.3rem; color: #5B3BD9; }
html.cmx #quiz-modal.cmq-r .result-stat .lbl { color: #68628F; }
html.cmx #quiz-modal.cmq-r .check-btn { border-radius: 18px; font-family: 'Nunito', sans-serif; text-transform: none; letter-spacing: .02em; }
html.cmx #quiz-modal.cmq-r .check-btn:not([style*="background"]) { background: linear-gradient(180deg, #FFD84A, #FFB300); color: #3B2700; box-shadow: 0 5px 0 #C68600; }

/* Утас */
@media (max-width: 860px) {
  html.cmx #quiz-modal.cmq .quiz-card { padding: 12px 14px 32px; }
  html.cmx #quiz-modal.cmq .quiz-header { gap: 10px; margin-bottom: 14px; }
  html.cmx #quiz-modal.cmq .cmq-hud span { height: 34px; padding: 0 10px; font-size: .82rem; }
  html.cmx #quiz-modal.cmq .close-btn { width: 38px; height: 38px; }
  html.cmx #quiz-modal.cmq-q .cmq-cols { grid-template-columns: 1fr; gap: 14px; }
  html.cmx #quiz-modal.cmq-q .cmq-paper { padding: 16px 16px 18px; border-radius: 22px; }
  html.cmx #quiz-modal.cmq-q .cmq-paper .char-wrap { width: 52px; height: 52px; }
  html.cmx #quiz-modal.cmq-q .cmq-paper .question-text { font-size: 1.22rem; text-align: center; }
  html.cmx #quiz-modal.cmq-q .cmq-bar > button { height: 36px !important; padding: 0 11px !important; font-size: .8rem !important; }
  html.cmx #quiz-modal.cmq-q .cmq-ah small { display: none; }
  html.cmx #quiz-modal.cmq-q .options-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  html.cmx #quiz-modal.cmq-q .option-btn { min-height: 56px; padding: 8px 12px; gap: 10px; font-size: 1.05rem; border-radius: 16px; }
  html.cmx #quiz-modal.cmq-q .option-btn .cmq-ltr { width: 30px; height: 30px; border-radius: 9px; font-size: .78rem; }
}
@media (prefers-reduced-motion: reduce) {
  html.cmx #quiz-modal.cmq .cmq-me { transition: none; }
}