:root {
  --bg: #f5f6fb; --surface: #ffffff; --surface-2: #f1f3f9; --text: #0f172a; --muted: #64748b; --faint: #94a3b8;
  --border: #e6e8f0; --primary: #4f46e5; --primary-2: #06b6d4; --primary-soft: #eef2ff;
  --ok: #059669; --ok-soft: #ecfdf5; --warn: #d97706; --bad: #dc2626;
  --t-hot: #ea580c; --t-hot-bg: #fff4ed; --t-long: #dc2626; --t-long-bg: #fef2f2; --t-proven: #a16207; --t-proven-bg: #fefce8;
  --t-new: #059669; --t-new-bg: #ecfdf5; --t-growing: #2563eb; --t-growing-bg: #eff6ff;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, .18);
  --r: 16px; --r-sm: 10px;
  --font: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f1a; --surface: #121829; --surface-2: #1a2236; --text: #e8ecf6; --muted: #94a3b8; --faint: #64748b;
    --border: #232c42; --primary: #818cf8; --primary-2: #22d3ee; --primary-soft: #1e2347;
    --ok: #34d399; --ok-soft: #0f2a22;
    --t-hot: #fb923c; --t-hot-bg: #2a1a10; --t-long: #f87171; --t-long-bg: #2a1414; --t-proven: #facc15; --t-proven-bg: #2a2410;
    --t-new: #34d399; --t-new-bg: #0f2a22; --t-growing: #60a5fa; --t-growing-bg: #10203a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f1a; --surface: #121829; --surface-2: #1a2236; --text: #e8ecf6; --muted: #94a3b8; --faint: #64748b;
  --border: #232c42; --primary: #818cf8; --primary-2: #22d3ee; --primary-soft: #1e2347;
  --ok: #34d399; --ok-soft: #0f2a22;
  --t-hot: #fb923c; --t-hot-bg: #2a1a10; --t-long: #f87171; --t-long-bg: #2a1414; --t-proven: #facc15; --t-proven-bg: #2a2410;
  --t-new: #34d399; --t-new-bg: #0f2a22; --t-growing: #60a5fa; --t-growing-bg: #10203a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .3); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body.lock { overflow: hidden; }
a { color: var(--primary); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
img, video { display: block; max-width: 100%; }
.hide { display: none !important; }
img.flg { display: inline-block; width: 18px; height: 13.5px; border-radius: 2px; vertical-align: -1px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.muted { color: var(--muted); }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 16px; }

/* boot */
.boot { min-height: 100vh; display: grid; place-items: center; }
.radar { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--primary); position: relative; overflow: hidden; opacity: .8; }
.radar span { position: absolute; inset: 0; background: conic-gradient(from 0deg, transparent 0 300deg, var(--primary) 360deg); animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* header */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.2px; white-space: nowrap; }
.brand img { width: 32px; height: 32px; }
.brand small { font-weight: 600; color: var(--muted); font-size: 12px; display: block; margin-top: -2px; }
.spacer { flex: 1; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(5, 150, 105, .5); animation: pulse 2s infinite; flex: none; }
.dot.run { background: var(--warn); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, .45); } 70% { box-shadow: 0 0 0 8px rgba(5, 150, 105, 0); } 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); } }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; display: grid; place-items: center; font-weight: 700; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.iconbtn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); font-size: 17px; flex: none; }
.iconbtn:hover { border-color: var(--primary); }

/* controls */
.controls { padding: 16px 0 6px; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.sbody { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 400px) { .brand > div { display: none; } .live { padding: 6px 8px; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 4px; gap: 2px; }
.seg button { padding: 8px 14px; border-radius: 10px; font-weight: 650; font-size: 14px; color: var(--muted); white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.tabs .chip { font-size: 14px; padding: 9px 15px; }
.chip .cnt { font-size: 11.5px; font-weight: 800; opacity: .75; margin-left: 2px; }
.tabs .chip.zero:not(.on) { opacity: .5; }
.tabs .chip.on { background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, var(--primary-2))); border-color: transparent; color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 35%, transparent); }
.search { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; height: 42px; }
.search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search input { border: 0; outline: 0; background: none; flex: 1; font: inherit; color: var(--text); min-width: 0; }
select.sel { height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 10px; font: inherit; font-weight: 600; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 4px 0 6px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 14px; }
.stat b { display: block; font-size: 22px; letter-spacing: -.5px; }
.stat span { font-size: 12.5px; color: var(--muted); }
.legend { font-size: 13px; color: var(--muted); margin: 2px 0 10px; }

/* grid + cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; padding: 8px 0 24px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.media { position: relative; aspect-ratio: 4 / 5; background: linear-gradient(135deg, var(--surface-2), var(--border)); overflow: hidden; }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.media .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 42px; opacity: .35; z-index: 0; }
.media > img { position: relative; z-index: 1; }
.media .tl, .media .tr, .media .bl, .media .play { z-index: 3; }
.media .play { position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; background: rgba(15, 23, 42, .62); color: #fff; display: grid; place-items: center; font-size: 15px; backdrop-filter: blur(4px); }
.media .tl { position: absolute; left: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 60px); }
.media .tr { position: absolute; right: 10px; top: 10px; font-size: 18px; display: flex; gap: 2px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4)); }
.media .bl { position: absolute; left: 10px; bottom: 10px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.media .pill { background: rgba(255, 255, 255, .94); color: #111827; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.pill.dark { background: rgba(15, 23, 42, .72) !important; color: #fff !important; backdrop-filter: blur(4px); }
.tag-hot { color: var(--t-hot) !important; } .tag-long { color: var(--t-long) !important; } .tag-proven { color: var(--t-proven) !important; }
.tag-new { color: var(--t-new) !important; } .tag-growing { color: var(--t-growing) !important; }
.tagb { display: inline-flex; gap: 4px; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.tagb.hot { background: var(--t-hot-bg); color: var(--t-hot); } .tagb.long { background: var(--t-long-bg); color: var(--t-long); }
.tagb.proven { background: var(--t-proven-bg); color: var(--t-proven); } .tagb.new { background: var(--t-new-bg); color: var(--t-new); }
.tagb.growing { background: var(--t-growing-bg); color: var(--t-growing); }
.cbody { padding: 12px 14px 14px; display: grid; gap: 8px; flex: 1; }
.cname { font-weight: 750; font-size: 15.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.csub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metrics { display: flex; gap: 12px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.metrics b { color: var(--text); }
.prices { display: flex; align-items: stretch; gap: 6px; margin-top: auto; }
.pbox { flex: 1; background: var(--surface-2); border-radius: 10px; padding: 7px 9px; min-width: 0; }
.pbox span { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.pbox b { font-size: 14px; white-space: nowrap; }
.ratio { display: grid; place-items: center; padding: 0 9px; border-radius: 10px; font-weight: 800; font-size: 14px; background: var(--ok-soft); color: var(--ok); }
.ratio.low { background: var(--surface-2); color: var(--muted); }
.adtext { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.pagehd { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pagehd img { width: 26px; height: 26px; border-radius: 50%; flex: none; background: var(--surface-2); }
.pagehd div { min-width: 0; }
.pagehd b { font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pagehd span { font-size: 12px; color: var(--muted); }
.more { display: flex; justify-content: center; padding: 6px 0 40px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; font-weight: 700; background: var(--surface); border: 1px solid var(--border); color: var(--text); white-space: nowrap; }
.btn:hover { border-color: var(--primary); }
.btn.primary { background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--primary-2))); color: #fff; border: 0; box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 35%, transparent); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.empty { text-align: center; padding: 60px 16px; color: var(--muted); }
.empty .big { font-size: 46px; margin-bottom: 8px; }
.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: var(--r); }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* modal / drawer */
.ov { position: fixed; inset: 0; background: rgba(2, 6, 23, .55); z-index: 50; display: flex; justify-content: center; align-items: flex-start; overflow-y: auto; padding: 24px 16px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--bg); width: 100%; max-width: 1080px; border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; animation: up .2s ease; }
@keyframes up { from { transform: translateY(14px); opacity: .6; } }
.sheet.narrow { max-width: 760px; }
.shd { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; background: var(--surface); border-bottom: 1px solid var(--border); }
.shd h2 { margin: 0; font-size: 20px; letter-spacing: -.3px; line-height: 1.25; }
.shd .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.sbody { padding: 18px; display: grid; gap: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 18px; align-items: start; }
.player { background: #000; border-radius: var(--r); overflow: hidden; aspect-ratio: 9 / 14; position: relative; display: grid; place-items: center; }
.player video, .player img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player .err { color: #cbd5e1; text-align: center; padding: 20px; font-size: 14px; }
.strip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 2px; scrollbar-width: thin; }
.strip button { flex: none; width: 64px; height: 80px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; position: relative; background: var(--surface-2); }
.strip button.on { border-color: var(--primary); }
.strip img { width: 100%; height: 100%; object-fit: cover; }
.strip .v { position: absolute; right: 3px; bottom: 3px; font-size: 10px; background: rgba(0, 0, 0, .6); color: #fff; border-radius: 6px; padding: 1px 4px; }
.box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; }
.box h3 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.box h3 .muted { font-weight: 500; font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.kpi { background: var(--surface-2); border-radius: 12px; padding: 10px; text-align: center; }
.kpi b { display: block; font-size: 20px; letter-spacing: -.4px; }
.kpi span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.fulltext { white-space: pre-line; font-size: 14px; background: var(--surface-2); border-radius: 12px; padding: 12px; max-height: 240px; overflow: auto; }
.links { display: flex; gap: 8px; flex-wrap: wrap; }
.cmp { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 10px; align-items: center; background: var(--surface-2); border-radius: 14px; padding: 14px; text-align: center; }
.cmp b { display: block; font-size: 20px; letter-spacing: -.4px; }
.cmp span { font-size: 12px; color: var(--muted); font-weight: 600; }
.cmp .x { font-size: 22px; color: var(--faint); }
.cmp .rb { background: var(--ok-soft); color: var(--ok); border-radius: 12px; padding: 8px 12px; }
.offers { display: grid; gap: 10px; margin-top: 12px; }
.offer { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--border); color: var(--text); }
.offer:hover { border-color: var(--primary); }
.offer img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.offer .t { font-size: 13.5px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.offer .s { font-size: 12px; color: var(--muted); }
.offer .p { text-align: right; font-weight: 800; white-space: nowrap; }
.offer .p small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; }
.note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.scard { border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; text-align: left; padding: 0; display: flex; flex-direction: column; }
.scard .sm { position: relative; aspect-ratio: 9 / 14; background: #111; }
.scard .sm img { width: 100%; height: 100%; object-fit: cover; }
.scard .sm .pl { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 8px; background: rgba(0, 0, 0, .65); color: #fff; }
.scard .sm .vw { position: absolute; left: 8px; bottom: 8px; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.scard .st { padding: 8px 9px; font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scard .sa { padding: 0 9px 9px; font-size: 11.5px; color: var(--muted); }
.spark { width: 100%; height: 54px; }
.embed { position: relative; width: 100%; max-width: 380px; margin: 0 auto; aspect-ratio: 9 / 16; background: #000; border-radius: 16px; overflow: hidden; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* login / paywall */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(900px 500px at 10% -10%, color-mix(in srgb, var(--primary) 18%, transparent), transparent),
  radial-gradient(700px 500px at 110% 110%, color-mix(in srgb, var(--primary-2) 16%, transparent), transparent), var(--bg); }
.acard { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 28px 24px; text-align: center; }
.acard .logo { width: 64px; height: 64px; margin: 0 auto 12px; }
.acard h1 { margin: 0; font-size: 26px; letter-spacing: -.5px; }
.acard p { color: var(--muted); margin: 6px 0 18px; font-size: 14.5px; }
.pins { display: flex; justify-content: center; gap: 12px; margin: 6px 0 16px; }
.pins i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--faint); display: block; transition: .15s; }
.pins i.f { background: var(--primary); border-color: var(--primary); transform: scale(1.1); }
.pins.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 290px; margin: 0 auto; }
.pad button { height: 58px; border-radius: 16px; background: var(--surface-2); font-size: 22px; font-weight: 700; border: 1px solid var(--border); }
.pad button:active { transform: scale(.96); background: var(--primary-soft); }
.or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12.5px; margin: 20px 0 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.gbtn { width: 100%; height: 56px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); font-weight: 800; font-size: 16.5px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--text); box-shadow: 0 6px 20px rgba(15, 23, 42, .10); margin-top: 6px; }
.gbtn svg { width: 24px; height: 24px; }
.pinbox { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 12px; }
.pinbox summary { cursor: pointer; font-size: 12.5px; color: var(--faint); list-style: none; }
.pinbox summary::-webkit-details-marker { display: none; }
.pinbox .pins { margin: 12px 0 10px; gap: 9px; } .pinbox .pins i { width: 10px; height: 10px; }
.pinbox .pad { max-width: 200px; gap: 6px; } .pinbox .pad button { height: 38px; font-size: 15px; border-radius: 10px; }
.gbtn:hover { border-color: var(--primary); }
.feat { text-align: left; display: grid; gap: 8px; margin: 16px 0; font-size: 14px; }
.price { font-size: 38px; font-weight: 850; letter-spacing: -1px; margin: 8px 0 0; }
.price small { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.err-msg { color: var(--bad); font-size: 13.5px; min-height: 20px; margin-top: 8px; }

/* ⭐ хадгалах */
.bm { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #64748b; font-size: 18px; line-height: 1; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); flex: none; }
.bm.on { color: #f59e0b; }
.media .bm, .scard .sm .bm { position: absolute; right: 8px; top: 8px; z-index: 4; }
.media .tr { right: 50px; }
.bm.wide { width: auto; height: 30px; border-radius: 999px; padding: 0 12px; font-size: 13px; font-weight: 700; background: var(--surface-2); box-shadow: none; display: inline-flex; vertical-align: middle; }
.bm.wide.on { background: #fef3c7; color: #b45309; }
.svrow { cursor: pointer; }
.svrow .bm { position: static; }
.svico { width: 64px; height: 64px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 26px; }
.svnote { margin-top: 6px; width: 100%; max-width: 420px; height: 32px; border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }

/* үндсэн цэс */
.mainnav { position: sticky; top: 60px; z-index: 29; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.mainnav .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.mainnav .wrap::-webkit-scrollbar { display: none; }
.mainnav button { flex: none; padding: 12px 14px; font-weight: 700; font-size: 14.5px; color: var(--muted); border-bottom: 2.5px solid transparent; white-space: nowrap; }
.mainnav button.on { color: var(--text); border-bottom-color: var(--primary); }
.sgrid2 { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.sgrid2 .scard { box-shadow: var(--shadow); background: var(--surface); }
.mkcats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mkcat { cursor: pointer; padding: 14px; }
.mkcat.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.mkcat h3 { font-size: 15px; margin-bottom: 8px; justify-content: space-between; }
.mkr { display: grid; grid-template-columns: 1fr auto 46px; gap: 8px; font-size: 13px; padding: 4px 0; border-bottom: 1px dashed var(--border); align-items: center; }
.mkr a { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkr span { font-size: 12px; text-align: right; font-weight: 700; }
.mkgrid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
@media (max-width: 640px) { .mainnav { top: 60px; } .mainnav button { padding: 10px 11px; font-size: 13.5px; } .sgrid2, .mkgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* login LIVE урсгал */
.authgrid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 420px); gap: 28px; width: 100%; max-width: 1100px; align-items: center; }
.feed { background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 100%); color: #e2e8f0; border-radius: 24px; padding: 24px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; min-width: 0; }
.feed::before { content: ""; position: absolute; width: 420px; height: 420px; right: -160px; top: -180px; background: radial-gradient(circle, rgba(99, 102, 241, .35), transparent 65%); pointer-events: none; }
.feed > * { position: relative; }
.livebadge { display: inline-flex; gap: 8px; align-items: center; background: rgba(239, 68, 68, .16); color: #fca5a5; font-weight: 800; font-size: 12px; letter-spacing: .1em; padding: 5px 11px; border-radius: 999px; }
.livebadge i { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: pr 1.4s infinite; }
@keyframes pr { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); } 70% { box-shadow: 0 0 0 9px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
.feed h2 { margin: 12px 0 4px; font-size: 26px; letter-spacing: -.5px; color: #fff; }
.feed .fsub { color: #94a3b8; font-size: 13.5px; }
.fcounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.fc { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; padding: 12px; min-width: 0; }
.fc b { font-size: 24px; color: #fff; display: block; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.fc span { font-size: 12px; color: #94a3b8; line-height: 1.25; display: block; }
.fc.hl b { background: linear-gradient(90deg, #fde047, #fb923c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fc.bump { animation: bump .6s ease; }
@keyframes bump { 30% { transform: scale(1.06); border-color: rgba(253, 224, 71, .6); } }
.fcols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ftitle { font-size: 12px; font-weight: 800; color: #cbd5e1; letter-spacing: .06em; margin: 0 0 10px; text-transform: uppercase; }
.trend { display: grid; gap: 8px; }
.tr-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: center; background: rgba(255, 255, 255, .05); border-radius: 12px; padding: 7px; }
.tr-item .ti { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, .08); display: grid; place-items: center; font-size: 20px; }
.tr-item .ti img { width: 100%; height: 100%; object-fit: cover; filter: blur(2.5px) saturate(1.2); transform: scale(1.12); }
.tr-item b { color: #fff; font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-item small { color: #94a3b8; font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-item .gr { color: #4ade80; font-weight: 800; }
.events { display: grid; gap: 2px; max-height: 300px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.ev { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; font-size: 13px; padding: 7px 8px; border-radius: 10px; transition: background .4s; }
.ev time { color: #64748b; font-size: 11.5px; white-space: nowrap; padding-top: 1px; }
.ev b { color: #fff; }
.ev.hl { background: rgba(99, 102, 241, .2); }
.ev.in { animation: evin .6s ease; }
@keyframes evin { from { opacity: 0; transform: translateY(-10px); background: rgba(253, 224, 71, .25); } }
.fempty { color: #94a3b8; font-size: 13.5px; padding: 8px 0; }
.mtick { display: none; align-items: center; gap: 8px; justify-content: center; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 6px 12px; margin: -6px auto 14px; width: fit-content; max-width: 100%; }
.mtick i { width: 7px; height: 7px; border-radius: 50%; background: #ef4444; animation: pr 1.4s infinite; flex: none; }
@media (max-width: 960px) {
  .authgrid { grid-template-columns: 1fr; max-width: 520px; gap: 18px; }
  .feed { order: 2; padding: 18px; }
  .mtick { display: flex; }
  .fcounts { grid-template-columns: repeat(2, 1fr); }
  .fcols { grid-template-columns: 1fr; }
}

/* admin */
.atabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; }
.tblwrap { overflow-x: auto; }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.form label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.form input, .form textarea { height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 10px; font: inherit; }
.form textarea { height: 70px; padding: 8px 10px; resize: vertical; }
.log { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--surface-2); border-radius: 10px; padding: 10px; max-height: 280px; overflow: auto; white-space: pre-wrap; }
.flags { display: flex; gap: 8px; flex-wrap: wrap; }
.flag { font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); }
.flag.off { background: var(--t-long-bg); color: var(--t-long); }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; background: var(--text); color: var(--surface); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100vw - 32px); }
#toast.on { opacity: 1; }
.menu { position: absolute; right: 16px; top: 58px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 220px; z-index: 40; }
.menu button, .menu a { display: flex; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; font-size: 14px; gap: 10px; color: var(--text); }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu .mi { padding: 10px 12px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--border); margin-bottom: 4px; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .player { aspect-ratio: 9 / 13; max-height: 72vh; margin: 0 auto; width: 100%; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  html, body { font-size: 14.5px; }
  .live .lt { display: none; }
  .brand small { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cbody { padding: 10px; gap: 6px; }
  .cname { font-size: 14px; }
  .metrics { gap: 8px; font-size: 12px; }
  .prices { flex-wrap: wrap; }
  .pbox b { font-size: 13px; }
  .ov { padding: 0; }
  .sheet { border-radius: 0; min-height: 100vh; }
  .sbody { padding: 14px; }
  .cmp { grid-template-columns: 1fr 1fr; }
  .cmp .x { display: none; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .seg button { padding: 7px 9px; font-size: 13px; }
  .controls { gap: 10px; padding-top: 12px; }
  .search { min-width: 0; height: 40px; }
  select.sel { height: 40px; max-width: 130px; font-size: 13px; }
  .controls > .row:nth-child(3) { flex-wrap: nowrap; }
  .stat { padding: 10px 12px; }
  .stat b { font-size: 19px; }
  .media .tl .pill { font-size: 11px; padding: 3px 7px; }
  .media .tl { gap: 4px; left: 6px; top: 6px; }
  .media .bl { left: 6px; bottom: 6px; }
  .media .play { width: 32px; height: 32px; right: 6px; bottom: 6px; font-size: 12px; }
}
@media (max-width: 330px) { .grid { grid-template-columns: 1fr; } }
