/* Lessonly загвар: цагаан (үндсэн) ба харанхуй хөх. style.css-ийн дараа ачаална. */
:root, :root[data-theme="light"] {
  --bg: #fbfcff; --card: #ffffff; --card-2: #f4f7fd; --ink: #0b1020; --muted: #5d6984; --line: #e3e9f5;
  --primary: #0a47ff; --primary-2: #3d8bff; --soft: #eaf1ff; --zh: #e5483b; --en: #0a47ff; --accent: #0a47ff;
  --ok: #16a34a; --bad: #e5483b; --radius: 18px; --display: "Inter", sans-serif;
  --shadow: 0 1px 2px rgba(11, 16, 32, .04), 0 8px 24px rgba(10, 40, 120, .06); color-scheme: light;
  --top-bg: rgba(255, 255, 255, .94); --ic-y: #fff4d6; --ic-r: #fdecea; --ic-g: #e3f6ea;
}
html, body { background: var(--bg) !important; color: var(--ink); font-family: "Inter", "Noto Sans SC", sans-serif !important; }
h1, h2, h3, .page-head h1, .section-title, .logo-txt, .eyebrow { font-family: "Inter", sans-serif !important; letter-spacing: -.02em; }
.page-head h1 { text-transform: none !important; font-size: 30px !important; font-weight: 900 !important; }
.page-head h1::before, .page-head h1::after, .hamar, .section-title::before, .section-title::after, .mn-side, .mn-foot,
.card::before, .card::after, .wotd::before, .wotd::after, .lvl-strip::before, .lvl-strip::after, .wotd-cloud, .hero-art::before { display: none !important; }
.section-title { text-transform: none !important; font-weight: 800 !important; }
/* толгой */
.topbar { background: var(--top-bg) !important; border-bottom: 1px solid var(--line) !important; box-shadow: none !important; backdrop-filter: blur(10px) !important; }
.topbar::after, .footer::before { display: none !important; }
.top-nav a, .top-nav button, .ng-btn, .ng-home { font-family: "Inter", sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; font-size: 14.5px !important; font-weight: 600 !important; color: var(--muted) !important; border-radius: 10px !important; background: none !important; border: 0 !important; box-shadow: none !important; }
.top-nav .on > .ng-btn, .top-nav a.on, .ng-home.on, .ng.on > .ng-btn { color: var(--primary) !important; background: var(--soft) !important; }
.ndrop { border: 1px solid var(--line) !important; border-radius: 16px !important; box-shadow: 0 20px 40px rgba(10, 40, 120, .12) !important; background: var(--card) !important; padding: 8px !important; }
.nd-item { border-radius: 12px !important; color: var(--ink) !important; }
.nd-item.on, .nd-item:hover { background: var(--soft) !important; }
.nd-item b { font-family: "Inter", sans-serif !important; text-transform: none !important; }
.track-sw { background: var(--card-2) !important; border: 0 !important; border-radius: 12px !important; padding: 4px !important; }
.track-sw button { border-radius: 9px !important; color: var(--muted) !important; }
.track-sw button.on { background: var(--card) !important; color: var(--ink) !important; box-shadow: 0 1px 4px rgba(0, 0, 0, .08) !important; }
.track-sw .flag { background: transparent !important; color: inherit !important; }
.top-actions > button, .top-actions > a, .top-actions > .icon-btn { border: 1px solid var(--line) !important; border-radius: 50% !important; background: var(--card) !important; box-shadow: none !important; }
.top-actions .avatar, .top-actions [id="pbtn"] { border-radius: 50% !important; }
/* карт, товч */
.card, .stat, .lv-chip, .plan-cta, .lvl-strip, .wotd, .td-task, .quest, .duel-row, .dm-mode, .td-stats a, .quick-grid a, .srs-card, .quiz.card, .test-intro {
  background: var(--card) !important; border: 1px solid var(--line) !important; border-radius: 18px !important; box-shadow: var(--shadow) !important; }
.stat { border-top: 1px solid var(--line) !important; }
.stat .s-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--soft); }
.stats .stat:nth-child(1) .s-icon { background: var(--ic-y); } .stats .stat:nth-child(2) .s-icon { background: var(--ic-r); } .stats .stat:nth-child(3) .s-icon { background: var(--ic-g); }
.btn, .td-go, .td-fab { border-radius: 12px !important; background: var(--primary) !important; color: #fff !important; border: 0 !important; box-shadow: 0 8px 18px rgba(10, 71, 255, .22) !important;
  font-family: "Inter", sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; font-weight: 700 !important; }
.btn.ghost, .btn.light { background: var(--card) !important; color: var(--ink) !important; border: 1.5px solid var(--line) !important; box-shadow: none !important; }
.hero-card { background: linear-gradient(135deg, #0a47ff, #4f3bff) !important; background-image: linear-gradient(135deg, #0a47ff, #4f3bff) !important; border: 0 !important; border-radius: 22px !important; color: #fff !important; padding-bottom: 26px !important; }
.hero-card h2, .hero-card p, .hero-card .eyebrow, .hero-card .goal-ring span { color: #fff !important; }
.hero-card .btn, .hero-card .btn.light { background: #fff !important; color: #0a47ff !important; }
.eyebrow { color: var(--primary-2) !important; letter-spacing: .12em !important; }
.quick-grid a { background: var(--card-2) !important; box-shadow: none !important; text-transform: none !important; font-family: "Inter", sans-serif !important; }
.mini-bar { border: 0 !important; background: var(--card-2) !important; border-radius: 99px !important; }
.mini-bar i { background: var(--primary) !important; border-radius: 99px; }
.lvl-badge { background: var(--primary) !important; color: #fff !important; border-radius: 14px !important; }
.w-read { color: var(--primary-2) !important; }
.wotd-term { color: var(--ink) !important; }
/* түвшин сонгогч, хүснэгт */
.lvl-side .lv-tabs button, .lvl-tabs button, .picker button { font-family: "Inter", sans-serif !important; text-transform: none !important; }
.lv-item.on, .lvl-side .on { background: var(--soft) !important; color: var(--primary) !important; border-color: var(--primary) !important; }
.table thead th, table th { background: var(--card-2) !important; color: var(--muted) !important; font-family: "Inter", sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; border-bottom: 1px solid var(--line) !important; }
.table, table { border-radius: 16px; overflow: hidden; border: 1px solid var(--line) !important; }
.opt { border-radius: 14px !important; border: 1.5px solid var(--line) !important; background: var(--card) !important; box-shadow: none !important; }
.tamga { color: var(--primary) !important; border-color: var(--primary) !important; box-shadow: inset 0 0 0 3px var(--card), inset 0 0 0 5px var(--primary) !important; }
/* утас */
.tabbar { background: var(--card) !important; border-top: 1px solid var(--line) !important; box-shadow: 0 -6px 20px rgba(10, 40, 120, .05) !important; }
.tabbar a, .tabbar button { font-family: "Inter", sans-serif !important; text-transform: none !important; color: #97a3bd !important; }
.tabbar .on { color: var(--primary) !important; }
.tb-sheet { border-radius: 22px 22px 0 0 !important; border: 1px solid var(--line) !important; }
.td-fab { box-shadow: 0 10px 24px rgba(10, 71, 255, .3) !important; }
.footer { border-top: 1px solid var(--line) !important; }
#cdock .cd-head { background: var(--primary) !important; }

/* ---- Харанхуй горим ---- */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0a1020; --card: #121b33; --card-2: #17223d; --ink: #eef2fb; --muted: #93a0bf; --line: #22305a;
  --primary: #2f6bff; --primary-2: #5aa2ff; --soft: #182a5c; --en: #5aa2ff; --accent: #5aa2ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 28px rgba(0, 0, 0, .25); color-scheme: dark;
  --top-bg: rgba(10, 16, 32, .92); --ic-y: #3a2f0f; --ic-r: #3b1916; --ic-g: #12331f;
} }
:root[data-theme="dark"] {
  --bg: #0a1020; --card: #121b33; --card-2: #17223d; --ink: #eef2fb; --muted: #93a0bf; --line: #22305a;
  --primary: #2f6bff; --primary-2: #5aa2ff; --soft: #182a5c; --en: #5aa2ff; --accent: #5aa2ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 28px rgba(0, 0, 0, .25); color-scheme: dark;
  --top-bg: rgba(10, 16, 32, .92); --ic-y: #3a2f0f; --ic-r: #3b1916; --ic-g: #12331f;
}
:root[data-theme="dark"] .track-sw button.on { background: var(--primary) !important; color: #fff !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .track-sw button.on { background: var(--primary) !important; color: #fff !important; } }
:root[data-theme="dark"] .input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: var(--card-2) !important; color: var(--ink) !important; border-color: var(--line) !important; }
/* Утас: «Үргэлжлүүлэх» товчны ард контент харагдахгүй байх, сүүлийн карт товчны дээр гарч ирэх */
@media (max-width: 800px) {
  body.pg-dashboard #view { padding-bottom: 24px; }
  .td-fab { box-shadow: 0 10px 24px rgba(10, 71, 255, .3), 0 0 0 10px var(--bg) !important; }
}

/* Сонгогдсон товч, таб, өөрийн зурвас: хар/цагааны оронд Lessonly цэнхэр */
.seg button.on, .seg a.on, .tab.on, .pk-tabs button.on, .side-src button.on, .croom.on, .react.on, .icon-btn.on,
.msg.mine .bubble-msg, .flashcard .back, .g-n, .pm-lv, .av-letter, .flag.en, .lv-badge.en, .bubble.en, .dlg-sp {
  background: var(--primary) !important; color: #fff !important; border-color: var(--primary) !important; }
.seg, .pk-tabs { border-radius: 12px; }
.seg button, .seg a, .tab, .pk-tabs button { border-radius: 10px !important; }
.btn.ghost:hover, .btn.audio:hover, .ibtn:hover { background: var(--soft) !important; color: var(--primary) !important; border-color: var(--primary) !important; }
.toast { background: #0b1020 !important; color: #fff !important; border-radius: 14px !important; }
.msg.for-me .bubble-msg { border-color: var(--primary) !important; }
/* Системийн баяр хүргэлтийн зурвас */
.bubble-msg.sys-b { border: 1px solid var(--line) !important; border-left: 4px solid #f5b301 !important; box-shadow: var(--shadow) !important; border-radius: 14px !important; }
.mention-sug { border: 1px solid var(--line) !important; box-shadow: 0 12px 30px rgba(10, 40, 120, .12) !important; border-radius: 14px !important; background: var(--card) !important; }
.bubble-msg { border-radius: 16px !important; }

/* ---- Толгойн дугуй товчнууд (сошиал, найз, чат, мэдэгдэл) ---- */
.icon-bar { display: flex; align-items: center; gap: 10px; }
.icon-bar .ibtn, .top-actions .icon-bar .ibtn { position: relative; width: 44px; height: 44px; border-radius: 50% !important; display: grid; place-items: center;
  background: var(--card-2) !important; border: 1px solid var(--line) !important; color: var(--muted) !important; padding: 0; font-size: 0; text-decoration: none; transition: color .15s, border-color .15s, transform .15s; }
.icon-bar .ibtn:hover { color: var(--ink) !important; border-color: var(--primary) !important; transform: translateY(-1px); }
.icon-bar .ibtn.on { color: var(--primary) !important; border-color: var(--primary) !important; background: var(--soft) !important; }
.icon-bar .ibtn svg { width: 21px; height: 21px; }
.ibadge { position: absolute !important; top: -7px; right: -9px; min-width: 22px; height: 22px; padding: 0 5px !important; border-radius: 99px !important;
  background: #f0625b !important; color: #fff !important; font: 800 12px/18px "Inter", sans-serif !important; text-align: center; border: 2px solid var(--bg); box-sizing: border-box; }
.ibadge[hidden] { display: none !important; }
.avatar-btn { position: relative; border: 0 !important; background: none !important; padding: 0 !important; border-radius: 50% !important; }
.avatar-btn .avatar, .avatar-btn img { width: 44px !important; height: 44px !important; border-radius: 50% !important; box-shadow: 0 0 0 1px var(--line); }
.av-caret { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); color: var(--muted); border: 1px solid var(--line); font-style: normal; }
.top-actions { gap: 12px !important; }
.pm-foot { display: flex; gap: 8px; }
.pm-foot button { flex: 1; }
@media (max-width: 700px) {
  .icon-bar .hb-soc { display: none !important; }
  .icon-bar { gap: 8px; }
  .icon-bar .ibtn, .top-actions .icon-bar .ibtn { width: 38px; height: 38px; }
  .avatar-btn .avatar, .avatar-btn img { width: 38px !important; height: 38px !important; }
  .ibadge { min-width: 18px; height: 18px; font-size: 10.5px !important; line-height: 14px !important; top: -6px; right: -7px; }
}
.avatar-btn { overflow: visible !important; width: auto !important; height: auto !important; }
.avatar-btn .av { width: 44px !important; height: 44px !important; border-radius: 50% !important; overflow: hidden; }
@media (max-width: 700px) { .avatar-btn .av { width: 38px !important; height: 38px !important; } }
@media (max-width: 560px) { .topbar-in { flex-wrap: nowrap !important; } .top-actions { gap: 8px !important; } }
.pmenu { border-radius: 18px !important; border: 1px solid var(--line) !important; box-shadow: 0 20px 40px rgba(10, 40, 120, .14) !important; }
.pm-tile, .pm-level, .pm-plan, .pm-stats > span, .pm-foot button, .pm-admin { border-radius: 12px !important; }
.pm-head .av, .pm-head .avatar { border-radius: 50% !important; }

/* ---- Том дэлгэцийн засвар: дугуй зураг, хэлний сонгогч, гарчиг ---- */
.av, .avatar, .av-letter, .profile-hero .av, .pf-av, .post-head .av, .composer .av { border-radius: 50% !important; }
.av-letter { background: linear-gradient(135deg, #0a47ff, #3d8bff) !important; color: #fff !important; }
.av-sys { background: #fff !important; padding: 3px; object-fit: contain !important; box-shadow: 0 0 0 1px var(--line); }
.profile-hero .av, .profile-hero img.av { border: 3px solid var(--card) !important; box-shadow: 0 0 0 1px var(--line), var(--shadow) !important; }
.profile-hero label, .profile-hero .av-edit, .profile-hero [class*="cam"] { border-radius: 50% !important; }
h1, h2, h3, .profile-hero h1 { text-transform: none !important; }
.track-sw button, .track-sw .tw { font: 600 13px "Inter", sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; }
.track-sw .flag, .track-sw button.on .flag { background: transparent !important; color: inherit !important; border: 0 !important; font-weight: 800; padding: 0 2px; }
.track-sw button { padding: 7px 12px !important; gap: 6px; }
.flag.en { background: var(--ink) !important; color: var(--bg) !important; border-color: transparent !important; }
.react { border-radius: 99px !important; padding: 6px 12px !important; }
.react.on { background: var(--soft) !important; color: var(--primary) !important; border: 1px solid var(--primary) !important; }
.toast, .toast * { font-family: "Inter", sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; font-weight: 700; }
.toast.ok { background: #16a34a !important; } .toast.warn { background: #d97706 !important; }
.btn.small, .btn.sm { text-transform: none !important; letter-spacing: 0 !important; }
.chat-head { font-family: "Inter", sans-serif !important; text-transform: none !important; font-size: 15px !important; font-weight: 800 !important; }
.chat-promo { border: 1px solid var(--line) !important; border-left: 4px solid #f5b301 !important; border-radius: 14px !important; background: var(--card-2) !important; }
.av-sys { box-shadow: 0 0 0 1px var(--line) !important; border: 0 !important; }
.chat-form .ibtn, .chat-form label, .chat-in label, .chat-in .icon-btn, .chat-input .icon-btn { border-radius: 12px !important; border: 1px solid var(--line) !important; }
.track-sw .flag.en { background: transparent !important; color: inherit !important; }
.croom { border-radius: 12px !important; }

/* Толгойн товчнуудыг жижигрүүлэх (36px) */
.icon-bar { gap: 8px !important; }
.icon-bar .ibtn, .top-actions .icon-bar .ibtn { width: 36px !important; height: 36px !important; }
.icon-bar .ibtn svg { width: 17px !important; height: 17px !important; }
.ibadge { min-width: 18px !important; height: 18px !important; font-size: 10.5px !important; line-height: 14px !important; padding: 0 4px !important; top: -6px !important; right: -7px !important; }
.avatar-btn .av, .avatar-btn .avatar, .avatar-btn img { width: 36px !important; height: 36px !important; }
.av-caret { width: 16px !important; height: 16px !important; right: -3px !important; bottom: -3px !important; }
.av-caret svg { width: 10px; height: 10px; }
.top-actions { gap: 10px !important; }
@media (max-width: 700px) {
  .icon-bar .ibtn, .top-actions .icon-bar .ibtn { width: 34px !important; height: 34px !important; }
  .avatar-btn .av, .avatar-btn .avatar, .avatar-btn img { width: 34px !important; height: 34px !important; }
}

/* ---- Зураасан дүрсүүд (emoji-н оронд) ---- */
svg.ic { display: block; flex: none; }
.ng-ic, .nd-ic, .ph-ic { display: grid; place-items: center; flex: none; border-radius: 50%; background: var(--card-2); color: var(--muted); border: 1px solid var(--line); }
.ng-ic { width: 30px; height: 30px; }
.top-nav .ng-btn, .top-nav .ng-home { display: inline-flex !important; align-items: center; gap: 8px; padding: 5px 12px 5px 5px !important; border-radius: 99px !important; }
.top-nav .ng-btn .caret { margin-left: -2px; }
.top-nav .ng.on .ng-ic, .top-nav .ng-home.on .ng-ic, .top-nav .ng-btn:hover .ng-ic, .top-nav .ng-home:hover .ng-ic { background: var(--primary); color: #fff; border-color: var(--primary); }
.top-nav .ng.on > .ng-btn, .top-nav .ng-home.on { background: var(--soft) !important; color: var(--ink) !important; font-weight: 700 !important; }
.nd-ic { width: 38px !important; height: 38px !important; font-size: 0 !important; }
.nd-item.on .nd-ic, .nd-item:hover .nd-ic { background: var(--primary); color: #fff; border-color: var(--primary); }
.ph-ic { width: 44px; height: 44px; color: var(--primary); background: var(--soft); border-color: transparent; margin-right: 4px; }
.page-head h1 { display: flex !important; align-items: center; gap: 12px; }
.pm-tile > span, .pm-plan > span:first-child { display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto 4px; border-radius: 50%; background: var(--card-2); color: var(--primary); font-size: 0; }
.pm-plan > span:first-child { margin: 0; }
.pm-foot button, .pm-admin { display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; }
.tabbar .tb-row > a > span, .tabbar .tb-row > button > span { display: grid; place-items: center; font-size: 0; height: 26px; }
.tb-grid > a > span, .tb-grid > button > span { display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto 4px; border-radius: 50%; background: var(--card-2); color: var(--primary); font-size: 0; }
.tb-sheet h6 { font-family: "Inter", sans-serif !important; letter-spacing: .1em; color: var(--muted); }
@media (max-width: 1400px) { .top-nav .ng-btn, .top-nav .ng-home { padding: 4px 10px 4px 4px !important; gap: 6px; } .ng-ic { width: 28px; height: 28px; } }
.pm-stats b { display: inline-flex !important; align-items: center; gap: 5px; justify-content: center; }
.pm-stats b svg { color: var(--primary); }
.btn svg.ic { display: inline-block; vertical-align: -3px; }
label.btn { display: inline-flex !important; align-items: center; gap: 6px; }
/* Унждаг цэс: гарчиг тод, тайлбар бүдэг */
.ndrop .nd-item .nd-tx b { color: var(--ink) !important; font-weight: 700 !important; font-size: 14.5px !important; }
.ndrop .nd-item .nd-tx small { color: var(--muted) !important; font-size: 12.5px !important; }
.ndrop .nd-item .nd-ic { color: var(--ink) !important; }
.ndrop .nd-item.on .nd-ic, .ndrop .nd-item:hover .nd-ic { color: #fff !important; }
.ndrop .nd-item.on .nd-tx b, .ndrop .nd-item:hover .nd-tx b { color: var(--primary-2) !important; }
/* Дүрсүүдийг тодруулах: зураас зузаан, өнгө тод */
svg.ic { stroke-width: 2 !important; }
.ng-ic, .nd-ic, .pm-tile > span, .pm-plan > span:first-child, .tb-grid > a > span, .tb-grid > button > span { color: var(--ink) !important; background: var(--soft) !important; border-color: transparent !important; }
.ndrop .nd-item .nd-ic { color: var(--primary-2) !important; }
.ndrop .nd-item.on .nd-ic, .ndrop .nd-item:hover .nd-ic, .top-nav .ng.on .ng-ic, .top-nav .ng-home.on .ng-ic { background: var(--primary) !important; color: #fff !important; }
.tabbar .tb-row > a, .tabbar .tb-row > button { color: var(--muted) !important; }
.icon-bar .ibtn { color: var(--ink) !important; }
/* Дүрсийг дугуйныхаа яг голд байрлуулах */
.top-nav .ndrop .nd-ic, .top-nav .ng-ic, .ph-ic, .pm-tile > span, .pm-plan > span:first-child, .tb-grid > a > span, .tb-grid > button > span {
  display: flex !important; align-items: center !important; justify-content: center !important; line-height: 0 !important; padding: 0 !important; text-align: center; }
.top-nav .ndrop .nd-ic { width: 38px !important; height: 38px !important; font-size: 0 !important; }
.ng-ic svg, .nd-ic svg, .ph-ic svg, .pm-tile svg, .pm-plan svg, .tb-grid svg { display: block; margin: 0 !important; }

/* ===== Товч, бичиг: цэвэр минимал (2-р хувилбар) ===== */
.btn, .td-go, .ld-btn { border-radius: 10px !important; box-shadow: none !important; font-weight: 600 !important; font-size: 14px !important; padding: 10px 18px !important; }
.btn.ghost, .btn.light, .btn.sec { background: transparent !important; border: 1px solid var(--line) !important; color: var(--ink) !important; }
.btn:hover { filter: brightness(1.08); }
.btn.small { padding: 6px 12px !important; font-size: 13px !important; border-radius: 8px !important; }
.btn.big { padding: 12px 22px !important; font-size: 15px !important; }
.page-head h1 { font-size: 24px !important; font-weight: 700 !important; letter-spacing: -.015em; }
.page-head .ph-ic { width: 36px !important; height: 36px !important; border-radius: 10px !important; }
.page-head p { font-size: 14px; }
h2, h3, .section-title { font-weight: 600 !important; }
.card h3 { font-size: 15px !important; }
.eyebrow { font-weight: 600 !important; letter-spacing: .06em !important; text-transform: none !important; font-size: 12px !important; }
.card, .stat { box-shadow: none !important; }
/* Хэт жижиг бичигтэй товч, табуудыг уншигдахуйц болгох */
.btn, .btn.small { font-size: max(13px, 1em) !important; }
.lvl-side .btn, .lock-note .btn, .paywall .btn, .side-src button, .pk-tabs button, .seg button, .seg a { font-size: 13px !important; }
.pk-tabs button { font-weight: 600 !important; }
.btn.ghost:hover, .btn.light:hover { background: var(--card-2) !important; filter: none; }

/* ---- Профайлын зураг / emoji сонгох ---- */
.av-emo { display: inline-grid !important; place-items: center; border-radius: 50%; line-height: 1; flex: none; vertical-align: middle; }
.av-pick-ov { position: fixed; inset: 0; z-index: 2000; background: rgba(8, 14, 30, .55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; }
.av-pick { position: relative; width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 26px 24px !important; text-align: center; }
.av-pick h2 { margin: 0 0 6px; font-size: 22px; }
.av-pick > p { margin: 0 0 16px; font-size: 14px; }
.av-x { position: absolute; top: 12px; right: 12px; }
.av-prev { display: flex; justify-content: center; margin-bottom: 14px; }
.av-prev .av { box-shadow: 0 0 0 4px var(--soft); }
.av-up { width: 100%; justify-content: center; }
.av-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin: 14px 0 10px; }
.av-or::before, .av-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.av-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 16px; }
.av-grid button { aspect-ratio: 1; border: 1px solid var(--line); background: var(--card-2); border-radius: 12px; font-size: 24px; cursor: pointer; transition: transform .1s; }
.av-grid button:hover { transform: scale(1.08); }
.av-grid button.on { border: 2px solid var(--primary); background: var(--soft); }
.av-pick .btn.full { width: 100%; justify-content: center; }
.av-pick .btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---- Тэргүүлэгчид (минимал) ---- */
.lb-seg { display: inline-flex !important; background: var(--card-2) !important; border: 0 !important; border-radius: 12px !important; padding: 4px !important; gap: 2px; margin-bottom: 22px; box-shadow: none !important; }
.lb-seg a { padding: 7px 18px !important; border-radius: 9px !important; color: var(--muted) !important; font-weight: 600 !important; font-size: 13.5px !important; text-transform: none !important; background: none !important; }
.lb-seg a.on { background: var(--card) !important; color: var(--ink) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, .08) !important; }
.lb-top { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 14px; align-items: end; margin-bottom: 16px; }
.lb-pod { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 12px 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); text-decoration: none; overflow: hidden; transition: border-color .15s; }
.lb-pod:hover { border-color: var(--primary); text-decoration: none; }
.lb-pod.me { border-color: var(--primary); }
.lb-av { position: relative; margin-bottom: 6px; }
.lb-badge { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 800 12px "Inter", sans-serif; font-style: normal; color: #fff; border: 2px solid var(--card); }
.r1 .lb-badge { background: #e6a817; } .r2 .lb-badge { background: #94a3b8; } .r3 .lb-badge { background: #c2783e; }
.lb-n { font-size: 15px; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.lb-n small, .lb-nm small { color: var(--muted); font-weight: 500; }
.lb-xp { font-size: 20px; font-weight: 800; color: var(--primary); }
.lb-xp small, .lb-x small { font-size: 12px; font-weight: 600; color: var(--muted); }
.lb-meta { display: inline-flex; gap: 12px; color: var(--muted); font-size: 13px; }
.lb-meta span { display: inline-flex; align-items: center; gap: 4px; }
.lb-meta svg { width: 14px; height: 14px; }
.lb-bar { display: block; width: 100%; margin-top: 16px; background: var(--card-2); border-top: 1px solid var(--line); }
.r1 .lb-bar { height: 34px; background: linear-gradient(180deg, #fff6d9, transparent); }
.r2 .lb-bar { height: 20px; } .r3 .lb-bar { height: 12px; }
:root[data-theme="dark"] .r1 .lb-bar { background: linear-gradient(180deg, #3a2f0f, transparent); }
.lb-tbl { border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.lb-r { display: flex; align-items: center; gap: 12px; padding: 11px 18px; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); }
.lb-r:first-child { border-top: 0; }
.lb-r:hover { background: var(--card-2); text-decoration: none; }
.lb-r.me { background: var(--soft); }
.lb-rk { width: 26px; color: var(--muted); font-weight: 700; font-size: 14px; text-align: center; }
.lb-nm { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-x { min-width: 86px; text-align: right; font-size: 15px; }
@media (max-width: 640px) {
  .lb-top { gap: 8px; } .lb-pod { padding-top: 16px; } .lb-xp { font-size: 16px; } .lb-n { font-size: 13px; }
  .lb-pod .lb-meta { display: none; } .lb-r { padding: 10px 12px; gap: 10px; } .lb-r .lb-meta span:last-child { display: none; }
}
.lb-pod { border: 1px solid var(--line) !important; box-shadow: none !important; }
.lb-pod.me, .lb-pod:hover { border-color: var(--primary) !important; }
.lb-bar { width: calc(100% + 24px) !important; margin: 16px -12px 0; }
/* Профайлын цэсний доод мөр: 3 товч багтах, хажуу тийш гүйлгэхгүй */
.pmenu { overflow-x: hidden !important; }
.pm-foot { display: grid !important; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px !important; }
.pm-foot > * { min-width: 0; padding: 9px 6px !important; font-size: 13px !important; white-space: nowrap; justify-content: center; }

/* ---- Профайлын хүрээ (дэлгүүр) ---- */
.av.fr { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--frc), 0 0 0 5px var(--card) !important; }
.av.f-silver { --frc: #a8b3c7; }
.av.f-gold { --frc: #e6a817; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px #e6a817, 0 0 10px 3px #f5c54266 !important; }
.av.f-jade { --frc: #16a34a; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px #16a34a, 0 0 0 6px #86efac !important; }
.av.f-fire { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px #f97316, 0 0 0 6px #ef4444, 0 0 12px 4px #f9731655 !important; }
.av.f-ice { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px #38bdf8, 0 0 0 6px #bae6fd, 0 0 12px 4px #38bdf855 !important; }
.av.f-royal { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px #7c3aed, 0 0 0 6px #e6a817, 0 0 14px 4px #7c3aed55 !important; }
.av.f-rainbow { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px #ef4444, 0 0 0 6px #f59e0b, 0 0 0 8px #22c55e, 0 0 0 10px #3b82f6 !important; animation: frGlow 3s linear infinite; }
@keyframes frGlow { 50% { filter: hue-rotate(60deg); } }
/* ---- Нэрийн өнгө ---- */
.uname.nc { font-weight: 800; }
.c-blue { color: #2f6bff !important; } .c-green { color: #16a34a !important; } .c-red { color: #e5483b !important; }
.c-purple { color: #7c3aed !important; } .c-gold { color: #d4a017 !important; text-shadow: 0 0 8px #f5c54255; }
.c-rainbow { background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e, #3b82f6, #a855f7); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
/* ---- Тэмдэг (медаль) ---- */
.bdg2 { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: var(--card-2); color: #a3adc2; border: 2px solid var(--line); }
.bdg2.got.t1 { color: #b45309; background: #fdf0e3; border-color: #e5b38a; }
.bdg2.got.t2 { color: #475569; background: #eef2f7; border-color: #b8c2d1; }
.bdg2.got.t3 { color: #a16207; background: #fff6d9; border-color: #e6a817; box-shadow: 0 0 0 3px #f5c54233; }
:root[data-theme="dark"] .bdg2.got.t1 { background: #3a2412; } :root[data-theme="dark"] .bdg2.got.t2 { background: #263043; color: #cbd5e1; } :root[data-theme="dark"] .bdg2.got.t3 { background: #3a2f0f; color: #f5c542; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge-grid .bdg { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.badge-grid .bdg:not(.got) { opacity: .55; }
.badge-grid .bdg b { font-size: 13.5px; } .badge-grid .bdg small { color: var(--muted); font-size: 12px; }
.pb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.pb-row .bdg2 { width: 38px; height: 38px; } .pb-row .bdg2 svg { width: 18px; height: 18px; }
.pb-n { color: var(--muted); font-size: 12.5px; margin-left: 4px; }
.pb-more { font-weight: 700; color: var(--muted); font-size: 13px; }
.pb-none { margin: 12px 0 0; }
/* ---- Дэлгүүр ---- */
.sh-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 8px; }
.sh-me { display: flex; align-items: center; gap: 18px; padding: 6px; }
.sh-me .uname { display: block; font-size: 20px; font-weight: 800; }
.sh-bal { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.sh-bal b { display: inline-flex; align-items: center; gap: 6px; font-size: 24px; color: var(--primary); }
.sh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 10px; }
.sh-item { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-align: center; }
.sh-item.on { border: 2px solid var(--primary); background: var(--soft); }
.sh-demo { height: 76px; display: grid; place-items: center; }
.sh-demo .uname { font-size: 20px; font-weight: 800; }
.sh-item b { font-size: 14px; }
.sh-item .btn:disabled { opacity: .5; cursor: not-allowed; }

/* Админы зургийн доорх Lessonly лого */
.av-staff-wrap { position: relative; display: inline-block; flex: none; vertical-align: middle; }
.av-staff-wrap > .av { width: 100% !important; height: 100% !important; }
.av-staff { position: absolute; left: 50%; bottom: -6%; transform: translateX(-50%); width: 112%; display: flex; justify-content: center; pointer-events: none; }
.av-staff img { width: 100%; height: auto; display: block; filter: drop-shadow(0 0 1.5px var(--card)) drop-shadow(0 0 1.5px var(--card)) drop-shadow(0 0 1px var(--card)); }
.av-staff .lg-d { display: none; }
:root[data-theme="dark"] .av-staff .lg-l { display: none; } :root[data-theme="dark"] .av-staff .lg-d { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av-staff .lg-l { display: none; } :root:not([data-theme="light"]) .av-staff .lg-d { display: block; } }

/* ---- Хэвлэх хуудас: Lessonly загвар (хээ, улаан өнгөгүй) ---- */
.print-area, .print-area * { font-family: "Inter", "Noto Sans SC", sans-serif; }
.pr-brand { display: flex; align-items: center; gap: 14px; }
.pr-brand .pr-logo { width: auto !important; height: 34px !important; }
.pr-brand.small .pr-logo { height: 24px !important; }
.pr-bn { flex: 1; } .pr-bn span { color: #5d6984 !important; font-size: .78rem !important; }
.pr-meta b { font: 700 .95rem "Inter", sans-serif !important; color: #0b1020 !important; }
.pr-meta span { color: #5d6984 !important; }
.pr-rule { border-top: 0 !important; height: 3px !important; margin: 12px 0 14px !important; background: linear-gradient(90deg, #0a47ff, #3d8bff 60%, #e3e9f5) !important; border-radius: 3px; }
.pr-table { border-collapse: separate !important; border-spacing: 0; border: 1px solid #d5ddeb; border-radius: 8px; overflow: hidden; }
.pr-table th { background: #eaf1ff !important; color: #0a47ff !important; font: 700 .72rem "Inter", sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; border: 0 !important; border-bottom: 1px solid #d5ddeb !important; }
.pr-table td { border: 0 !important; border-bottom: 1px solid #e8edf6 !important; }
.pr-table tr:nth-child(even) td { background: #f8faff; }
.pr-table td.pr-term + td { color: #0a47ff !important; }
.pr-table td:first-child { color: #97a3bd !important; }
.pc { border-color: #c9d3e6 !important; border-radius: 6px; }
.pc-r { color: #0a47ff !important; }
.pr-foot { color: #97a3bd !important; border-top-color: #e3e9f5 !important; }
.pr-wm { opacity: .05 !important; }
@media print { .print-area, .print-area * { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
@media print { .pr-table tfoot td { height: 9mm; border: 0 !important; background: none !important; padding: 0 !important; } }
.pr-table tfoot { display: none; } @media print { .pr-table tfoot { display: table-footer-group; } }

/* ---- Шалгалтын засвар: хуучин том үсэгтэй таб, сегмент ---- */
.tab, .tabs .tab, .seg button, .seg a, .pk-tabs button, .chat-side .nav-label, .table th, .lvl-badge span {
  font-family: "Inter", sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; background: var(--card-2) !important; border: 0 !important; border-radius: 12px !important; padding: 4px !important; box-shadow: none !important; }
.seg button, .seg a { border: 0 !important; background: none !important; color: var(--muted) !important; font-weight: 600 !important; padding: 7px 14px !important; border-radius: 9px !important; box-shadow: none !important; }
.seg button.on, .seg a.on { background: var(--card) !important; color: var(--ink) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, .08) !important; }
.tabs { gap: 4px; border-bottom: 1px solid var(--line); }
.tab { border: 0 !important; border-radius: 10px 10px 0 0 !important; background: none !important; color: var(--muted) !important; font-weight: 600 !important; font-size: 14px !important; box-shadow: none !important; }
.tab.on { color: var(--primary) !important; box-shadow: inset 0 -2px 0 var(--primary) !important; }
/* Админы лого: зураг солих товчтой давхцахгүй, сторид гаргахгүй */
.ph-avatar .ph-upload { top: 0; bottom: auto !important; right: 0; z-index: 3; }
.story-add .av-staff, .story-av .av-staff { display: none; }
.ph-upload { border-radius: 50% !important; background: var(--primary) !important; color: #fff !important; border: 3px solid var(--card) !important; width: 36px !important; height: 36px !important; display: grid !important; place-items: center; }
.tab.on, .tabs .tab.on, a.tab.on, button.tab.on { background: none !important; color: var(--primary) !important; border-color: transparent !important; }

/* ===== Самбар: «Өнөөдрийн хичээл» ===== */
.dh-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dh-head .page-head { margin: 0 !important; }
.dh-head .page-head p { margin-top: 4px; }
.dh-lv { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--card); border-radius: 10px; padding: 9px 14px; color: var(--ink); text-decoration: none; font-size: 14px; white-space: nowrap; }
.dh-lv:hover { border-color: var(--primary); }
.dh-chips { display: flex !important; gap: 8px; flex-wrap: wrap; margin: -6px 0 14px; }
.dh-chips span { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--card); border-radius: 10px; padding: 6px 10px; font-weight: 700; font-size: 13px; }
@media (min-width: 761px) { .dh-chips { display: none !important; } }
.dh-top { display: grid; grid-template-columns: 1.75fr 1fr; gap: 18px; align-items: start; }
.dh-lesson { padding: 24px 26px !important; }
.dh-lh { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 6px; }
.dh-lh .eyebrow { color: var(--primary); opacity: 1; }
.dh-lh h2 { font-size: 21px; margin: 4px 0 0; }
.dh-bar { width: 150px; height: 8px; border-radius: 9px; background: var(--card-2); overflow: hidden; flex: none; }
.dh-bar i { display: block; height: 100%; background: var(--primary); border-radius: 9px; transition: width .4s; }
.dh-step { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.dh-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; background: var(--card-2); color: var(--muted); }
.dh-step.now .dh-n { background: var(--primary); color: #fff; }
.dh-step.done .dh-n { background: var(--ok); color: #fff; }
.dh-st { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dh-st b { font-size: 15px; }
.dh-st small { color: var(--muted); font-size: 13px; }
.dh-step.done .dh-st b { text-decoration: line-through; color: var(--muted); }
.dh-ok { color: var(--ok); font-weight: 700; font-size: 13px; }
.dh-step .btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dh-fin { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: var(--ic-g); font-weight: 600; }
.dh-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dh-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; text-align: center; }
.dh-nums a { color: var(--ink); text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dh-nums b { font-size: 20px; margin-top: 4px; }
.dh-nums small { color: var(--muted); font-size: 12px; }
.dh-ic { width: 40px; height: 40px; border-radius: 11px; display: grid !important; place-items: center; flex: none; }
.dh-ic.b { background: var(--soft); color: var(--primary); }
.dh-ic.g { background: var(--ic-g); color: var(--ok); }
.dh-ic.o { background: var(--ic-y); color: #ea7a0c; }
.dh-ic.p { background: #f1eaff; color: #7c3aed; }
.dh-ic.r { background: var(--ic-r); color: #e11d48; }
.dh-ic.t { background: #e2f7f5; color: #0d9488; }
.dh-ic svg { stroke-width: 2; }
.dh-lvbar { margin-top: 18px; }
.dh-lvbar > div:first-child { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.dh-lvbar .mini-bar i { background: var(--ok) !important; }
.dh-wotd { display: flex !important; align-items: center; gap: 16px; }
.dh-wotd .wotd-term { font-size: 38px !important; margin: 0 !important; line-height: 1.1; }
.dh-wotd > div:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dh-wotd .w-read { color: var(--primary); font-weight: 600; }
.dh-wb { display: flex; gap: 4px; }
#plan-mount:not(:empty) { margin-top: 18px; }
.dh-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dh-tile { display: flex !important; align-items: center; gap: 14px; padding: 18px !important; color: var(--ink) !important; text-decoration: none !important; transition: border-color .15s, transform .15s; }
.dh-tile:hover { border-color: var(--primary) !important; transform: translateY(-1px); }
.dh-tile > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dh-tile b { font-size: 15px; }
.dh-tile small { color: var(--muted); font-size: 12.5px; }
:root[data-theme="dark"] .dh-ic.p { background: rgba(124, 58, 237, .18); color: #b794ff; }
:root[data-theme="dark"] .dh-ic.t { background: rgba(13, 148, 136, .18); color: #4fd1c5; }
:root[data-theme="dark"] .dh-ic.o { color: #ffb050; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dh-ic.p { background: rgba(124, 58, 237, .18); color: #b794ff; } :root:not([data-theme="light"]) .dh-ic.t { background: rgba(13, 148, 136, .18); color: #4fd1c5; } :root:not([data-theme="light"]) .dh-ic.o { color: #ffb050; } }
@media (max-width: 1000px) { .dh-top { grid-template-columns: 1fr; } .dh-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .dh-head { margin-bottom: 12px; }
  .dh-lv { padding: 7px 11px; font-size: 13px; }
  .dh-lesson { padding: 18px !important; }
  .dh-lh h2 { font-size: 18px; }
  .dh-bar { width: 80px; }
  .dh-step { gap: 11px; }
  .dh-step .btn.ghost { display: none; }
  .dh-prog { display: none; }
  .dh-tiles { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .dh-tile { flex-direction: column; text-align: center; gap: 8px; padding: 14px 8px !important; }
  .dh-tile small { display: none; }
  .dh-tile b { font-size: 13px; }
}

/* ===== Цэс: том «Сурах» цэс 2 багана, утасны цэс жагсаалтаар ===== */
.ndrop.wide { width: 580px !important; grid-template-columns: 1fr 1fr; gap: 2px; }
.ng.open .ndrop.wide { display: grid; }
@media (hover: hover) { .ng:hover .ndrop.wide { display: grid; } }
.tb-search { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; margin: 4px 0 6px; color: var(--muted); }
.tb-search input { flex: 1; border: 0; outline: 0; background: none; color: var(--ink); font: 500 15px "Inter", sans-serif; padding: 11px 0; min-width: 0; }
.tb-sheet h6 { margin: 14px 4px 8px !important; font-size: 11px !important; }
.tb-list { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 2px 12px; }
.tb-list > a, .tb-list > button { display: flex; align-items: center; gap: 12px; padding: 9px 0; width: 100%; border: 0; background: none; text-align: left; color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; position: relative; }
.tb-list > a + a, .tb-list > a + button, .tb-list > :not([hidden]) ~ :not([hidden]) { border-top: 1px solid var(--line); }
.tb-list > a[hidden] { display: none; }
.tb-list > a.on b { color: var(--primary); }
.tb-ic { width: 34px; height: 34px; border-radius: 10px; display: grid !important; place-items: center; background: var(--soft); color: var(--primary); flex: none; }
.tb-ic svg { display: block; }
.tb-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tb-tx b { font-size: 14.5px; font-weight: 700; }
.tb-tx small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-chev { color: var(--muted); font-style: normal; font-size: 18px; }
.tb-list .nbadge { position: static !important; font-style: normal; }
.tb-none { text-align: center; padding: 16px; }
.tabbar .tb-list > a, .tabbar .tb-list > button { color: var(--ink) !important; font-size: inherit !important; }
.tabbar .tb-list > a.on .tb-tx b { color: var(--primary) !important; }
