:root {
  color-scheme: light dark;
  --bg: #FAF5F0;
  --bg-deco-1: #F4E8DE;
  --bg-deco-2: #F2E2D5;
  --card: #FFFFFF;
  --card-line: #F4ECE5;
  --ink: #12141C;
  --ink-2: #3A3E4D;
  --muted: #5F6473;
  --accent: #B9532E;
  --accent-deep: #8A3B1F;
  --accent-soft: #FBEADF;
  --accent-ink: #9A3412;
  --coral: #FF7A59;
  --cream: #FFF4EB;
  --line: #EFD6C4;
  --seg: #EFDACB;
  --track: #F0DCCD;
  --letter-bg: #F6DFCF;
  --letter-ink: #7A3A1E;
  --sel-bg: #FCE7DA;
  --inverse: #12141C;
  --inverse-ink: #FFFFFF;
  --shadow: 120, 60, 30;
  --ok: #12B76A;
  --ok-ink: #067647;
  --ok-bg: #ECFDF3;
  --bad: #D92D20;
  --bad-ink: #B42318;
  --bad-bg: #FEF3F2;
  --warn: #F79009;
  --warn-ink: #B54708;
  --warn-bg: #FFF6E8;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Golos Text', 'Inter', system-ui, sans-serif;
  --num: 'Unbounded', 'Golos Text', 'Inter', system-ui, sans-serif;
  --r-card: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --nav-h: 76px;
}

/* Харанхуй горим: утасны тохиргоог дагана */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15110F;
    --bg-deco-1: #1E1714;
    --bg-deco-2: #241A15;
    --card: #1F1916;
    --card-line: #2E2521;
    --ink: #F4ECE6;
    --ink-2: #D9CFC8;
    --muted: #A99D95;
    --accent: #E07A52;
    --accent-deep: #B9532E;
    --accent-soft: #3A2419;
    --accent-ink: #F2A684;
    --cream: #241D19;
    --line: #3A2E28;
    --seg: #2A211C;
    --track: #332923;
    --letter-bg: #3A2A22;
    --letter-ink: #F0C7B0;
    --sel-bg: #3A2419;
    --inverse: #F4ECE6;
    --inverse-ink: #15110F;
    --shadow: 0, 0, 0;
    --ok: #2FCB7F;
    --ok-ink: #6EE2A6;
    --ok-bg: #11291E;
    --bad: #F0564A;
    --bad-ink: #FF9B92;
    --bad-bg: #331714;
    --warn: #F7A33A;
    --warn-ink: #F9BE6C;
    --warn-bg: #30210F;
  }
}

/* Сэдвийн өнгө: --tc (гол), --tc-ink (бичвэр), --tc-soft (дэвсгэр) */
.t-nii { --tc: #B9532E; --tc-ink: #8A3B1F; --tc-soft: #FBEADF; }
.t-soy { --tc: #B5397C; --tc-ink: #8C2A5E; --tc-soft: #FBE4F0; }
.t-erh { --tc: #2F5FB3; --tc-ink: #244A8C; --tc-soft: #E4ECFA; }
.t-edz { --tc: #1F8A5B; --tc-ink: #176B46; --tc-soft: #E0F5EA; }
.t-uls { --tc: #6B46C1; --tc-ink: #533596; --tc-soft: #EDE6FA; }
.t-ouh { --tc: #0E7C9A; --tc-ink: #0A5F77; --tc-soft: #DFF2F7; }
.t-son { --tc: #B07A12; --tc-ink: #7F560A; --tc-soft: #FBF0D6; }
@media (prefers-color-scheme: dark) {
  .t-son { --tc: #E0A83C; --tc-ink: #F2C97A; --tc-soft: #3A2C10; }
  .t-nii { --tc: #E07A52; --tc-ink: #F2A684; --tc-soft: #3A2419; }
  .t-soy { --tc: #E06AAE; --tc-ink: #F2A3CF; --tc-soft: #3A1D2E; }
  .t-erh { --tc: #6C95E6; --tc-ink: #A4BFF2; --tc-soft: #1C2740; }
  .t-edz { --tc: #3FBF86; --tc-ink: #8ADDB4; --tc-soft: #15301F; }
  .t-uls { --tc: #A182E8; --tc-ink: #C7B3F4; --tc-soft: #28203F; }
  .t-ouh { --tc: #3FB4D6; --tc-ink: #8AD6EA; --tc-soft: #122D36; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.015em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 12px; }

/* Background decoration */
.deco { position: fixed; border-radius: 50%; pointer-events: none; z-index: 0; }
.deco-1 { width: 300px; height: 300px; top: -110px; right: -110px; background: var(--bg-deco-2); }
.deco-2 { width: 260px; height: 260px; bottom: 120px; left: -140px; background: var(--bg-deco-1); }

.shell {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top) + 28px) 20px calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px);
}
.shell.focus { padding-bottom: calc(env(safe-area-inset-bottom) + 24px); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

/* Картууд (нэр нь хуучнаараа .glass, гэхдээ одоо цэвэр цагаан карт) */
.glass {
  background: var(--card);
  border: 1px solid var(--card-line);
  box-shadow: 0 1px 2px rgba(var(--shadow), .03), 0 8px 24px rgba(var(--shadow), .05);
  border-radius: var(--r-card);
}
.glass-accent {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 60%),
    var(--tc, var(--accent));
  color: #fff;
  border: 0;
  box-shadow: 0 14px 30px rgba(var(--shadow), .16);
  border-radius: var(--r-card);
}
.glass-coral {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.3) 0%, rgba(255,255,255,0) 60%),
    var(--coral);
  color: #1F0D07;
  border: 0;
  box-shadow: 0 12px 26px rgba(201,80,50,.2);
  border-radius: var(--r-card);
}
.card { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.card-lg { padding: 22px; }

/* Самбарын тоон картууд (нүүр хуудас) */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 6px 0; }
.stat { padding: 12px 6px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0; color: var(--ink); }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-label { font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.2; }
.stat-num { font-family: var(--num); font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; color: var(--ink); white-space: nowrap; }
.stat-num small { font-family: var(--display); font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: 0; margin-left: 1px; }
.stat-num.hot { color: var(--accent); }
.num { font-family: var(--num); letter-spacing: -.02em; }
a.card, button.card { color: var(--ink); text-align: left; cursor: pointer; }
.glass-accent.card, a.glass-accent { color: #fff; }

/* Interaction */
.tap { transition: transform .3s var(--ease), box-shadow .3s ease, background-color .3s ease, border-color .3s ease, opacity .3s ease; }
.tap:hover { transform: translateY(-2px); }
.tap:active { transform: scale(.97); }

/* Header */
.top { display: flex; align-items: center; gap: 12px; }
.title-xl { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.title-lg { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.title-md { font-size: 18px; font-weight: 700; }
.icon-btn {
  width: 44px; height: 44px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer;
}
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-family: var(--display); font-weight: 800; font-size: 17px;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
  font-size: 13px; font-weight: 600;
}
.pill-warm { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.pill-topic { background: var(--tc-soft, var(--accent-soft)); border-color: var(--tc-soft, var(--accent-soft)); color: var(--tc-ink, var(--accent-ink)); font-weight: 700; }
.badge { font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.4); letter-spacing: .02em; }

/* Topic tiles */
.tile-icon {
  width: 42px; height: 42px; border-radius: 14px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tc-soft, var(--accent-soft)); color: var(--tc, var(--accent));
}
.glass-accent .tile-icon { background: rgba(255,255,255,.22); color: #fff; }
.bar-track { flex: 1; height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--tc, var(--accent)); transform-origin: left center; animation: grow 1.1s var(--ease) both; }
.bar-fill.warn { background: var(--warn); }
.glass-accent .bar-track { background: rgba(255,255,255,.28); }
.glass-accent .bar-fill { background: #fff; }
.pct { color: var(--tc-ink, var(--muted)); }

/* Segmented control */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--seg); border-radius: 16px; }
.seg button {
  min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted);
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background-color .35s var(--ease), color .35s ease, box-shadow .35s ease;
}
.seg button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 4px 12px rgba(var(--shadow), .10); }

/* Chips row */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--cream); color: var(--ink);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center;
  transition: background-color .3s ease, border-color .3s ease, color .3s ease, transform .25s var(--ease);
}
.chip:active { transform: scale(.95); }
.chip[aria-pressed="true"] { background: var(--tc, var(--accent)); border-color: var(--tc, var(--accent)); color: #fff; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 56px; padding: 0 20px;
  border-radius: 18px; border: 0; cursor: pointer;
  font-weight: 700; font-size: 16px;
  transition: transform .25s var(--ease), box-shadow .3s ease, background-color .3s ease, opacity .3s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--tc, var(--accent)); color: #fff; box-shadow: 0 10px 24px rgba(var(--shadow), .18); }
.btn-primary:hover { color: #fff; }
.btn-dark { background: var(--inverse); color: var(--inverse-ink); }
.btn-dark:hover { color: var(--inverse-ink); }
.btn-soft { background: var(--cream); color: var(--accent-ink); border: 1.5px solid var(--line); }
.btn[disabled] { background: var(--seg); color: var(--muted); box-shadow: none; cursor: default; }

/* Quiz */
.progress-top { flex: 1; height: 10px; border-radius: 999px; background: var(--track); overflow: hidden; }
.progress-top > div { height: 100%; border-radius: 999px; background: var(--tc, var(--accent)); transition: width .7s var(--ease); }
.q-text { font-size: 22px; line-height: 1.35; font-weight: 800; }
.q-text.long { font-size: 17px; line-height: 1.55; font-weight: 700; }
.opt {
  width: 100%; min-height: 64px; display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 20px; cursor: pointer; text-align: left;
  border: 2px solid var(--line); background: var(--card); color: var(--ink);
  transition: background-color .3s ease, border-color .3s ease, transform .25s var(--ease), box-shadow .3s ease, opacity .3s ease;
}
.opt:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(var(--shadow), .10); }
.opt:active { transform: scale(.98); }
.opt .letter {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; background: var(--letter-bg); color: var(--letter-ink);
  transition: background-color .3s ease, color .3s ease;
}
.opt .label { flex: 1; font-size: 16px; font-weight: 500; line-height: 1.4; }
.opt.selected { border-color: var(--tc, var(--accent)); background: var(--sel-bg); }
.opt.selected .letter { background: var(--tc, var(--accent)); color: #fff; }
.opt.ok { border-color: var(--ok); background: var(--ok-bg); }
.opt.ok .letter { background: var(--ok); color: #fff; }
.opt.bad { border-color: var(--bad); background: var(--bad-bg); animation: shake .45s ease both; }
.opt.bad .letter { background: var(--bad); color: #fff; }
.opt.dim { opacity: .55; }
.opt[disabled] { cursor: default; }
.opt[disabled]:hover { transform: none; box-shadow: none; }
.mark { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; animation: pop .4s var(--ease) both; }
.mark.ok { background: var(--ok); }
.mark.bad { background: var(--bad); }
.verdict { font-family: var(--display); font-size: 17px; font-weight: 800; }
.verdict.ok { color: var(--ok-ink); }
.verdict.bad { color: var(--bad-ink); }
.sticky-bottom {
  position: sticky; bottom: 0; margin: 0 -20px; padding: 14px 20px calc(env(safe-area-inset-bottom) + 16px);
  background: linear-gradient(to top, var(--bg) 65%, transparent);
}
/* Тайлбар карт: доод товчны доор нуугдахгүйн тулд гүйлгэхэд дээрээ зай үлдээнэ */
.feedback { scroll-margin-bottom: 120px; }
.feedback .note-body { font-size: 16px; }

/* Flashcard */
.flip-wrap { perspective: 1400px; height: 360px; border: 0; padding: 0; background: transparent; cursor: pointer; width: 100%; text-align: left; }
.flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .7s var(--ease); }
.flip.on { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; padding: 26px; border-radius: 30px;
  display: flex; flex-direction: column; justify-content: space-between;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.face.back { transform: rotateY(180deg); }
.face.glass { background: var(--card); }
.face.glass-accent { background: linear-gradient(150deg, rgba(255,255,255,.14), rgba(255,255,255,0) 60%), var(--tc, var(--accent)); }
.face .big { font-family: var(--display); font-size: 25px; line-height: 1.25; font-weight: 800; }
.face.back .big { font-family: var(--font); font-size: 20px; font-weight: 600; line-height: 1.45; }
.dots { display: flex; gap: 6px; }
.dots span { height: 6px; flex: 1; border-radius: 999px; background: var(--track); transition: all .4s var(--ease); }
.dots span.done { background: var(--tc-soft, var(--accent-soft)); border: 1px solid var(--tc, var(--accent)); height: 6px; box-sizing: border-box; }
.dots span.on { flex: 3; background: var(--tc, var(--accent)); }

/* Notes */
.note-tag { font-size: 12px; font-weight: 700; color: var(--tc-ink, var(--accent-ink)); letter-spacing: .03em; text-transform: uppercase; }
.note-body { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); white-space: pre-line; }
.note.hl { box-shadow: 0 0 0 3px var(--tc, var(--accent)), 0 10px 24px rgba(var(--shadow), .08); }

/* Exam grid */
.vgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.vchip {
  min-height: 64px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1.5px solid var(--line); background: var(--cream); color: var(--ink); cursor: pointer;
  transition: transform .25s var(--ease), border-color .3s ease;
}
.vchip:hover { transform: translateY(-2px); }
.vchip .l { font-family: var(--display); font-size: 18px; font-weight: 800; }
.vchip .s { font-size: 11px; font-weight: 600; color: var(--muted); }
.vchip.done { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.vchip.done .s { color: var(--accent-ink); }
.vchip[disabled] { opacity: .5; cursor: default; }
.vchip[disabled]:hover { transform: none; }

/* Ring */
.ring-wrap { position: relative; flex-shrink: 0; }
.ring-wrap .num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--num); font-weight: 700; letter-spacing: -.02em; }
.ring-arc { animation: ring 1.4s var(--ease) both; }
.ring-mini .num { font-size: 10px !important; font-weight: 700; color: var(--tc-ink, var(--muted)); }

/* Явцын гол карт */
.hero {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.2) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(135deg, var(--accent-deep) 0%, var(--accent) 100%);
  color: #fff; border-radius: var(--r-card);
  box-shadow: 0 14px 30px rgba(var(--shadow), .16);
}
.hero .dim { color: rgba(255,255,255,.75); }

/* Bottom nav */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center;
  padding: 6px 10px calc(env(safe-area-inset-bottom) + 10px);
  background: var(--card);
  border-top: 1px solid var(--card-line);
  box-shadow: 0 -6px 20px rgba(var(--shadow), .06);
}
.nav-inner { display: flex; width: 100%; max-width: 480px; }
.nav a {
  flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--muted); border-radius: 14px;
}
.nav a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.nav a[aria-current="page"] svg { background: var(--accent-soft); border-radius: 12px; padding: 4px; width: 34px; height: 30px; margin: -4px 0; }
.nav.hidden { display: none; }

/* Sheet + toast */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.45); display: flex; flex-direction: column; justify-content: flex-end; animation: fade .3s ease both; }
.overlay .scrim { flex: 1; border: 0; background: transparent; cursor: pointer; }
.sheet {
  width: 100%; max-width: 480px; margin: 0 auto;
  background: var(--card); border-radius: 30px 30px 0 0;
  padding: 12px 22px calc(env(safe-area-inset-bottom) + 28px);
  display: flex; flex-direction: column; gap: 16px;
  animation: sheet .5s cubic-bezier(.2,.9,.2,1) both;
}
.grabber { align-self: center; width: 40px; height: 5px; border-radius: 999px; background: var(--line); }
.toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 16px); z-index: 60;
  transform: translateX(-50%);
  max-width: calc(100% - 40px); width: 440px;
  padding: 14px 16px; border-radius: 18px; background: var(--inverse); color: var(--inverse-ink);
  font-size: 14px; font-weight: 600; box-shadow: 0 16px 34px rgba(0,0,0,.3);
  animation: toast 2.6s var(--ease) both;
}

/* Inputs */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; }
.input {
  min-height: 54px; padding: 0 16px; border-radius: 16px; border: 1.5px solid var(--line);
  background: var(--card); font: 600 17px var(--font); color: var(--ink);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* Багийн тэмцээн (#/team): багийн карт, гишүүний мөр, байрын дугаар. Багийн өнгө нь .t-* классаар ирнэ */
a.glass-coral { color: #1F0D07; }
.team-card { border-left: 5px solid var(--tc, var(--accent)); }
.team-row { display: flex; align-items: center; gap: 10px; }
.team-row .input { flex: 1; min-width: 0; min-height: 48px; font-size: 16px; }
.mini-btn {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--cream); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.mini-btn:hover { color: var(--bad-ink); border-color: var(--bad); }
.add-btn {
  width: 100%; min-height: 44px; border-radius: 14px; cursor: pointer;
  border: 1.5px dashed var(--line); background: transparent; color: var(--tc-ink, var(--accent-ink));
  font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.add-btn:hover { background: var(--tc-soft, var(--accent-soft)); }
.rank {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--num); font-weight: 700; font-size: 13px;
  background: var(--tc-soft, var(--accent-soft)); color: var(--tc-ink, var(--accent-ink));
}
.rank.gold { background: #F5C842; color: #5C4300; }
.member-line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 4px 0; border-top: 1px solid var(--card-line); }
/* Онлайн өрөө (#/room): код, кодын талбар, хүлээх анивчилт */
.code-big { font-family: var(--num); font-size: 44px; font-weight: 700; letter-spacing: .12em; line-height: 1.1; }
.code-input { font-family: var(--num); font-size: 28px; letter-spacing: .2em; text-align: center; min-height: 64px; }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* Багш / Сурагч / Эцэг эх сонголт (анх орох үед ба тохиргоонд) */
.role-card { display: flex; flex-direction: row; align-items: center; gap: 14px; text-align: left; width: 100%; cursor: pointer; border: 2px solid var(--card-line); }
.role-card[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.role-card[aria-pressed="true"] .tile-icon { background: var(--accent); color: #fff; }
/* Ангийн самбар (багш): сурагчийн мөр, жижиг тоонууд */
.srow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--card-line); cursor: pointer; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; }
.srow:first-of-type { border-top: 0; }
.srow .nm { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow .k { font-family: var(--num); font-size: 13px; font-weight: 700; min-width: 44px; text-align: right; white-space: nowrap; }
.srow .k small { font-family: var(--font); font-weight: 600; color: var(--muted); font-size: 11px; }
.sdetail { padding: 6px 0 12px; display: flex; flex-direction: column; gap: 8px; }
.textarea { min-height: 140px; padding: 14px 16px; resize: vertical; line-height: 1.5; font-weight: 500; font-size: 16px; }
.fb-item { border-top: 1px solid var(--card-line); padding: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.fb-item:first-child { border-top: 0; }
.fb-item .txt { white-space: pre-line; line-height: 1.5; }
.fb-item.unread .txt { font-weight: 600; }

/* Socionomic лого, нэр, холбоо барих */
.logo-box { width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--card-line); color: var(--ink); box-shadow: 0 6px 16px rgba(var(--shadow), .08); }
.logo-box .logo-mark { width: 32px; height: 32px; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.contact { display: inline-flex; align-items: center; justify-content: center; gap: 8px; align-self: center; padding: 8px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); background: transparent; border: 1px solid var(--line); }
.contact b { color: var(--ink); }
.contact.big { font-size: 14px; padding: 12px 18px; background: var(--card); color: var(--ink); box-shadow: 0 6px 16px rgba(var(--shadow), .06); }
.contact:hover { color: var(--accent-ink); }
/* Эрхгүй хэсэг: цоож ба бүдэг карт */
.lock { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 9px; background: var(--seg); color: var(--muted); flex-shrink: 0; }
.card.locked { opacity: .78; }
.card.locked .tile-icon { filter: saturate(.3); }
.access-card { border: 1.5px dashed var(--accent); background: var(--cream); }
/* Сегмент дотор холбоос (хаалттай анги, картын жагсаалт) */
.seg a.seg-link { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 44px; border-radius: 12px; color: var(--muted); font-weight: 600; font-size: 14px; text-align: center; }
.seg a.seg-link[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 4px 12px rgba(var(--shadow), .10); }
/* Флаш карт: мэдэхгүй байсан товч */
.btn.know-no { color: var(--bad-ink); border-color: var(--bad-bg); background: var(--bad-bg); }
/* Хураангуйн доорх бататгал тестийн карт */
.review-card { border: 2px solid var(--tc-soft, var(--accent-soft)); }
/* ЭЕШ: 70%-иас доош дүнтэй хувилбар */
.vchip.done.low { background: var(--warn-bg); border-color: var(--warn); color: var(--warn-ink); }
.vchip.done.low .s { color: var(--warn-ink); }
.nav-foot { display: none; }

.empty { padding: 28px 20px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty .tile-icon { width: 56px; height: 56px; border-radius: 18px; }

/* Асуултын зураг, график */
.media { margin: 0; padding: 10px; border-radius: 22px; background: var(--card); border: 1px solid var(--card-line); display: flex; flex-direction: column; gap: 8px; }
.media svg { display: block; width: 100%; height: auto; }
.media img { display: block; width: 100%; height: auto; max-height: 52vh; object-fit: contain; border-radius: 14px; background: #fff; }
.media.small { padding: 6px; border-radius: 16px; }
.media.small img { max-height: 180px; }
.media.small svg { max-height: 180px; }
.media figcaption { font-size: 13px; line-height: 1.4; color: var(--muted); text-align: center; padding: 0 6px 2px; }
.media-zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 14px; }
.media-zoom:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.media-missing { padding: 18px 14px; border-radius: 14px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; font-weight: 600; text-align: center; }
.lightbox { position: fixed; inset: 0; z-index: 50; padding: 16px; background: rgba(0,0,0,.9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; cursor: zoom-out; animation: fade .25s ease both; }
.lightbox img { max-width: 100%; max-height: 84vh; object-fit: contain; border-radius: 12px; background: #fff; }
.lightbox-hint { color: rgba(255,255,255,.8); font-size: 13px; }

/* Animations */
.rise { animation: rise .65s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ring { from { stroke-dashoffset: var(--c); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -16px); } 12% { opacity: 1; transform: translate(-50%, 0); } 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -8px); } }
@keyframes drift { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-14px, 12px); } }
.drift { animation: drift 10s ease-in-out infinite; }

/* ---------- Компьютерийн дэлгэц (900px-ээс өргөн) ---------- */
.nav-brand { display: none; }
@media (min-width: 900px) {
  :root { --side-w: 236px; }
  .deco-1 { width: 520px; height: 520px; top: -200px; right: -160px; }
  .deco-2 { width: 460px; height: 460px; bottom: -160px; left: 60px; }

  /* Зүүн талын бараан цэс */
  .nav {
    top: 0; bottom: 0; left: 0; right: auto; width: var(--side-w);
    flex-direction: column; justify-content: flex-start; align-items: stretch;
    padding: 28px 14px 24px;
    background: #1B1512; color: #fff;
    border-top: 0; border-right: 0; box-shadow: none;
  }
  .nav-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 8px 28px; gap: 12px; font-family: var(--display); font-weight: 800; font-size: 23px; letter-spacing: -.01em; color: #fff;
  }
  .nav-brand .logo {
    width: 52px; height: 52px; border-radius: 15px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: #1B1512;
  }
  .nav-inner { flex-direction: column; gap: 4px; max-width: none; }
  .nav-foot { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding: 16px 12px 0; border-top: 1px solid rgba(255,255,255,.1); }
  .nav-foot a, .nav-foot span { color: rgba(255,255,255,.62); font-weight: 600; }
  .nav-foot a:hover { color: #fff; }
  .nav a {
    flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: 12px;
    min-height: 48px; padding: 0 14px; font-size: 15px; border-radius: 14px;
    color: rgba(255,255,255,.62);
    transition: background-color .25s ease, color .25s ease;
  }
  .nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
  .nav a[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; }
  .nav a[aria-current="page"] svg { background: none; padding: 0; width: 22px; height: 22px; margin: 0; }
  .stats { padding: 10px 0; }
  .stat { padding: 16px 12px; }
  .stat-num { font-size: 34px; }
  .stat-label { font-size: 13px; }

  /* Агуулга: цэсний баруун талд, дунд нь төвлөрсөн */
  .shell {
    max-width: none; margin: 0 0 0 var(--side-w);
    padding: 44px 48px 56px;
  }
  .shell > * { max-width: 960px; margin-left: auto; margin-right: auto; }
  .shell.focus { margin-left: 0; padding: 40px 32px 48px; }
  .shell.focus > * { max-width: 720px; }

  .title-xl { font-size: 34px; }
  .title-lg { font-size: 28px; }
  .chips { margin: 0; padding-left: 2px; padding-right: 2px; }
  .sticky-bottom { margin: 0; padding-left: 0; padding-right: 0; }

  /* 3 ба түүнээс олон карттай хоёр баганат торыг 3 багана болгоно (сэдвийн картууд) */
  .grid2:has(> :nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .grid2 { gap: 16px; }
  .stack { gap: 18px; }
  .card { padding: 20px; }
  .card-lg { padding: 26px; }

  /* Флаш карт, тайлбар картын уншихад тохиромжтой өргөн */
  .flip-wrap { max-width: 640px; margin: 0 auto; height: 380px; }
  .dots { max-width: 640px; margin: 0 auto; width: 100%; }

  /* Доороос гардаг цонх компьютер дээр дунд нь гарна */
  .overlay { justify-content: center; align-items: center; padding: 24px; }
  .sheet { border-radius: 28px; max-width: 520px; padding: 20px 26px 28px; animation: pop-in .35s var(--ease) both; }
  .grabber { display: none; }
  @keyframes pop-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
}

/* Дунд хэмжээ (таблет): утасны бүтэц, гэхдээ арай өргөн */
@media (min-width: 600px) and (max-width: 899px) {
  .shell { max-width: 600px; }
  .nav-inner { max-width: 600px; }
  .sheet { max-width: 600px; }
}

/* ---------- Нүүр хуудасны аура (2026-11-17) ----------
   Зөвхөн нүүр хуудсанд body.aura класс тавигдана (app.js render).
   Хар хөх суурь дээр хөх, нил, ногоовтор гэрэл аажим хөвнө. Картууд тунгалаг шил болно.
   Өнгийг энд хувьсагчаар сольдог тул нүүрний бүх карт автоматаар тохирно. */
body { transition: background-color .45s ease; }
.aura-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; }
body.aura .aura-bg { opacity: 1; visibility: visible; transition: opacity .6s ease; }
body.aura .deco { opacity: 0; }
body.aura-instant, body.aura-instant .aura-bg { transition: none !important; }
.aura-bg::before { /* дээрээс тусах гэрэл + нарийн тор */
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(90% 55% at 50% -8%, rgba(92,112,255,.30) 0%, rgba(92,112,255,0) 70%),
    linear-gradient(rgba(170,190,255,.045) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(170,190,255,.045) 1px, transparent 1px) 0 0 / 44px 44px;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 85%);
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 85%);
}
.aura-bg::after { /* захын бараан хүрээ */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(130% 100% at 50% 40%, transparent 55%, rgba(3,5,16,.65) 100%);
}
.ab { position: absolute; border-radius: 50%; will-change: transform; }
.ab1 { width: 70vmax; height: 70vmax; top: -30vmax; left: -22vmax; background: radial-gradient(closest-side, rgba(70,90,255,.42), rgba(70,90,255,0)); animation: aura-a 22s ease-in-out infinite; }
.ab2 { width: 55vmax; height: 55vmax; top: 18vh; right: -24vmax; background: radial-gradient(closest-side, rgba(28,200,190,.26), rgba(28,200,190,0)); animation: aura-b 26s ease-in-out infinite; }
.ab3 { width: 60vmax; height: 60vmax; bottom: -30vmax; left: -10vmax; background: radial-gradient(closest-side, rgba(130,80,255,.30), rgba(130,80,255,0)); animation: aura-c 30s ease-in-out infinite; }
.ab4 { width: 40vmax; height: 40vmax; top: -14vmax; right: -6vmax; background: radial-gradient(closest-side, rgba(110,170,255,.22), rgba(110,170,255,0)); animation: aura-b 34s ease-in-out infinite reverse; }
.spark { position: absolute; width: 22px; height: 22px; top: 13%; right: 9%; background: #6FE3D2; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); filter: drop-shadow(0 0 8px rgba(111,227,210,.8)); animation: twinkle 4s ease-in-out infinite; }
.spark.s2 { width: 12px; height: 12px; top: 58%; right: auto; left: 6%; background: #9AA8FF; filter: drop-shadow(0 0 6px rgba(154,168,255,.8)); animation-delay: -2s; }
@keyframes aura-a { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(6vmax, 5vmax) scale(1.08); } }
@keyframes aura-b { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-5vmax, 6vmax) scale(.94); } }
@keyframes aura-c { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(7vmax, -5vmax) scale(1.06); } }
@keyframes twinkle { 0%,100% { opacity: .9; transform: scale(1) rotate(0deg); } 50% { opacity: .45; transform: scale(.75) rotate(20deg); } }

body.aura {
  color-scheme: dark;
  --bg: #070B1F;
  --card: rgba(255,255,255,.055);
  --card-line: rgba(160,180,255,.14);
  --ink: #F2F4FF;
  --ink-2: #C9CFEA;
  --muted: #9AA3C7;
  --accent: #8C9EFF;
  --accent-deep: #5B6CF0;
  --accent-soft: rgba(140,158,255,.16);
  --accent-ink: #B8C4FF;
  --cream: rgba(255,255,255,.05);
  --line: rgba(160,180,255,.16);
  --seg: rgba(255,255,255,.06);
  --track: rgba(255,255,255,.10);
  --letter-bg: rgba(140,158,255,.18);
  --letter-ink: #DDE2FF;
  --sel-bg: rgba(140,158,255,.14);
  --inverse: #F2F4FF;
  --inverse-ink: #070B1F;
  --shadow: 0, 0, 0;
  --warn: #F7A33A; --warn-ink: #F9BE6C; --warn-bg: rgba(247,163,58,.14);
  --bad-ink: #FF9B92; --bad-bg: rgba(240,86,74,.14);
  --ok-bg: rgba(47,203,127,.14);
  background: var(--bg);
}
/* Сэдвийн өнгө хар хөх дээр (харанхуй горимынхтой ижил) */
body.aura .t-nii { --tc: #E07A52; --tc-ink: #F2A684; --tc-soft: rgba(224,122,82,.18); }
body.aura .t-soy { --tc: #E06AAE; --tc-ink: #F2A3CF; --tc-soft: rgba(224,106,174,.18); }
body.aura .t-erh { --tc: #6C95E6; --tc-ink: #A4BFF2; --tc-soft: rgba(108,149,230,.20); }
body.aura .t-edz { --tc: #3FBF86; --tc-ink: #8ADDB4; --tc-soft: rgba(63,191,134,.18); }
body.aura .t-uls { --tc: #A182E8; --tc-ink: #C7B3F4; --tc-soft: rgba(161,130,232,.20); }
body.aura .t-ouh { --tc: #3FB4D6; --tc-ink: #8AD6EA; --tc-soft: rgba(63,180,214,.18); }
body.aura .t-son { --tc: #E0A83C; --tc-ink: #F2C97A; --tc-soft: rgba(224,168,60,.18); }

/* Шилэн картууд */
body.aura .glass {
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.03));
  border: 1px solid var(--card-line);
  box-shadow: 0 12px 32px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
body.aura a.glass.tap:hover { border-color: rgba(160,180,255,.32); }
body.aura .glass-accent {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 60%),
    var(--tc, linear-gradient(135deg, #4F5DF0 0%, #6F7CFF 55%, #2BB8C9 100%));
  box-shadow: 0 16px 40px rgba(60,80,255,.28);
}
body.aura .glass-coral { box-shadow: 0 14px 36px rgba(255,122,89,.28); }
body.aura .logo-box { background: rgba(255,255,255,.92); color: #1B1512; border-color: transparent; box-shadow: 0 0 0 1px rgba(160,180,255,.2), 0 8px 24px rgba(70,90,255,.3); }
body.aura .avatar { background: linear-gradient(135deg, #5B6CF0, #2BB8C9); box-shadow: 0 6px 18px rgba(70,90,255,.35); }
body.aura .aura-name {
  background: linear-gradient(90deg, #FFFFFF 0%, #C9D1FF 45%, #7FE3D8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
body.aura .access-card { border: 1.5px dashed rgba(140,158,255,.55); }
/* Бүртгэл / нэвтрэх хуудас */
body.aura .aura-name { -webkit-box-decoration-break: clone; box-decoration-break: clone; }
body.aura .role-card { border-width: 2px; }
body.aura .role-card[aria-pressed="true"] { border-color: var(--accent); background: linear-gradient(180deg, rgba(140,158,255,.20), rgba(140,158,255,.08)); }
body.aura .role-card[aria-pressed="true"] .tile-icon { background: linear-gradient(135deg, #5B6CF0, #2BB8C9); }
body.aura .input { background: rgba(255,255,255,.05); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
body.aura .seg button[aria-selected="true"], body.aura .seg a.seg-link[aria-selected="true"] { background: rgba(255,255,255,.14); }
body.aura .btn-primary:not([disabled]) { background: linear-gradient(135deg, #5B6CF0 0%, #6F7CFF 55%, #2BB8C9 100%); box-shadow: 0 12px 30px rgba(70,90,255,.35); }
body.aura .contact { border-color: var(--line); }

/* Доод цэс: тунгалаг хар хөх */
body.aura .nav {
  background: rgba(8,12,34,.72);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-top-color: rgba(160,180,255,.12); box-shadow: none;
}
@media (min-width: 900px) {
  body.aura .nav { background: rgba(6,9,26,.62); border-right: 1px solid rgba(160,180,255,.10); }
  body.aura .nav a[aria-current="page"] { background: rgba(140,158,255,.16); }
}

/* ---------- Арын бүдэг зургууд (2026-11-17) ----------
   images/bg-*.svg: хуулийн ба эдийн засгийн номын тавиур, шударга ёсны жин, баганатай байшин,
   эрэлт-нийлүүлэлтийн график. Өөрсдөө зурсан шугаман зураг. Хол байгаа нь (cols, market) илүү бүдэг, бүрсгэр. */
.ill { position: absolute; background: center / contain no-repeat; pointer-events: none; will-change: transform; }
.ill-cols {
  background-image: url(images/bg-columns.svg); aspect-ratio: 900 / 620;
  width: 150vw; left: -25vw; top: 2vh; opacity: .07; filter: blur(2.5px);
  -webkit-mask-image: linear-gradient(#000 40%, transparent 92%); mask-image: linear-gradient(#000 40%, transparent 92%);
  animation: ill-far 40s ease-in-out infinite;
}
.ill-market { background-image: url(images/bg-market.svg); aspect-ratio: 640 / 520; width: 70vw; right: -16vw; top: 46vh; opacity: .08; filter: blur(1.6px); animation: ill-far 34s ease-in-out infinite reverse; }
.ill-books {
  background-image: url(images/bg-books.svg); aspect-ratio: 900 / 620;
  width: 118vw; left: -14vw; bottom: -2vh; opacity: .15; filter: blur(.5px);
  -webkit-mask-image: linear-gradient(to top, #000 45%, transparent 100%); mask-image: linear-gradient(to top, #000 45%, transparent 100%);
  animation: ill-near 28s ease-in-out infinite;
}
.ill-law { background-image: url(images/bg-law.svg); aspect-ratio: 600 / 660; width: 54vw; right: -10vw; top: 8vh; opacity: .12; filter: blur(.7px); animation: ill-near 32s ease-in-out infinite reverse; }
@keyframes ill-far { 0%,100% { transform: translate(0,0); } 50% { transform: translate(1.5vmax, -1vmax); } }
@keyframes ill-near { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(-1vmax, -1.2vmax) rotate(-.6deg); } }
@media (min-width: 900px) {
  .ill-cols { width: min(70vw, 1100px); left: 50%; margin-left: max(-35vw, -550px); top: -2vh; opacity: .075; }
  .ill-market { width: min(30vw, 460px); right: 3vw; top: auto; bottom: 6vh; opacity: .10; }
  .ill-books { width: min(52vw, 820px); left: 2vw; bottom: -1vh; opacity: .17; }
  .ill-law { width: min(25vw, 360px); right: 4vw; top: 10vh; opacity: .14; }
}

/* ---------- Бүртгэл / нэвтрэх: том лого, компьютер дээр 2 багана ---------- */
.logo-box.logo-lg { width: 60px; height: 60px; border-radius: 18px; }
.logo-box.logo-lg .logo-mark { width: 46px; height: 46px; }
.brand-row { gap: 14px; }
.brand-name.brand-lg { font-size: 27px; line-height: 1.1; }
.w-title { font-size: 32px; line-height: 1.1; font-weight: 800; }
.w-lead { margin: 0; font-size: 15px; max-width: 380px; }
.w-feats { display: none; }
.home-name { font-size: 30px; }
.home-top, .h-side { display: flex; flex-direction: column; gap: 18px; }

@media (min-width: 900px) {
  /* Бүртгэлийн хуудас: зүүн талд гарчиг, баруун талд самбар */
  .shell.focus > .welcome { max-width: 1160px; }
  .shell.focus:has(> .welcome) { padding-top: 56px; }
  .welcome {
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); column-gap: 72px; row-gap: 20px;
    grid-template-areas: "head panel" "free panel" "contact panel"; grid-template-rows: auto auto 1fr; align-items: start;
  }
  .welcome > .w-head { grid-area: head; padding-top: 28px; gap: 22px; }
  .welcome > .w-panel { grid-area: panel; }
  .welcome > .glass { grid-area: free; }
  .welcome > .contact { grid-area: contact; justify-self: start; }
  .w-panel { padding: 28px; border-radius: var(--r-card); background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025)); border: 1px solid var(--card-line); box-shadow: 0 24px 60px rgba(0,0,0,.35); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
  .logo-box.logo-lg { width: 84px; height: 84px; border-radius: 24px; }
  .logo-box.logo-lg .logo-mark { width: 64px; height: 64px; }
  .brand-row { gap: 18px; }
  .brand-name.brand-lg { font-size: 40px; }
  .brand-sub { font-size: 15px; }
  .w-title { font-size: 56px; line-height: 1.05; letter-spacing: -.02em; }
  .w-lead { font-size: 18px; line-height: 1.55; max-width: 500px; }
  .w-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 520px; }
  .w-feat { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.045); border: 1px solid var(--card-line); font-weight: 600; font-size: 14px; }
  .w-feat .tile-icon { width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0; }

  /* Нүүр хуудас: том лого, нэр */
  .home-head .logo-box.logo-lg { width: 72px; height: 72px; border-radius: 21px; }
  .home-head .logo-box.logo-lg .logo-mark { width: 56px; height: 56px; }
  .home-name { font-size: 40px; line-height: 1.15; }
  .h-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
}
@media (min-width: 1100px) {
  /* Нүүр хуудас: «Үргэлжлүүлэх» том карт зүүн талд, тоо ба зорилго/өрсөлдөх баруун талд */
  .shell > .home { max-width: 1120px; }
  .home-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "cont stats" "cont duo"; gap: 16px; }
  .home-top > .h-stats { grid-area: stats; }
  .home-top > .h-cont { grid-area: cont; justify-content: space-between; padding: 30px; min-height: 300px; }
  .home-top .h-cont-title { font-size: 34px !important; line-height: 1.1; margin-bottom: 6px; }
  .home-top > .h-duo { grid-area: duo; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
