/* Noto Sans — латин + кирилл (монгол Ө, Ү), хувьсах жин 300–900, өөрийн серверээс (SIL OFL 1.1) */
@font-face {
    font-family: "Noto Sans";
    src: url("../fonts/NotoSans-VF.woff2") format("woff2-variations"), url("../fonts/NotoSans-VF.woff2") format("woff2");
    font-weight: 300 900;
    font-style: normal;
    font-display: swap;
}
/* =====================================================================
   ONOODOR.SITE — загварын өнгө, хэмжээ (бараан / гэрэл)
   ===================================================================== */
:root, [data-theme="dark"] {
  --bg: #08162b; --surface: #0e203d; --alt: #152b4f; --text: #f1f5f9; --muted: #94a3b8; --sub: #cbd5e1;
  --border: rgba(255,255,255,.09); --border2: rgba(255,255,255,.18);
  --primary: #0d6efd; --accent: #00c8ff; --accent-text: #00c8ff; --bar2: #3b6db3; --track: #0b1a33;
  --good-bg: rgba(16,185,129,.18); --good: #34d399; --bad-bg: rgba(239,68,68,.18); --bad: #f87171;
  --warn-bg: rgba(245,158,11,.18); --warn: #fbbf24; --rose: #fb7185; --rose-bg: rgba(244,63,94,.18);
  --soft-bg: rgba(0,200,255,.16); --soft-text: #7fe3ff; --mine-fill: rgba(0,200,255,.28); --other-fill: rgba(13,110,253,.22);
  --shadow: rgba(0,0,0,.35); --switch-off: #334155; --byl: #894cea; --teal: #0c6971;
}
[data-theme="light"] {
  --bg: #f4f6fa; --surface: #ffffff; --alt: #eef2f8; --text: #0f172a; --muted: #526072; --sub: #334155;
  --border: #e2e8f0; --border2: #cbd5e1;
  --accent: #0284c7; --accent-text: #0369a1; --bar2: #93b4e0; --track: #dbe3ee;
  --good-bg: rgba(16,185,129,.14); --good: #047857; --bad-bg: rgba(239,68,68,.12); --bad: #b91c1c;
  --warn-bg: rgba(245,158,11,.16); --warn: #92400e; --rose: #be123c; --rose-bg: rgba(225,29,72,.10);
  --soft-bg: rgba(2,132,199,.12); --soft-text: #075985; --mine-fill: rgba(2,132,199,.22); --other-fill: rgba(13,110,253,.12);
  --shadow: rgba(15,23,42,.08); --switch-off: #cbd5e1;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); }
h1, h2, h3 { margin: 0; line-height: 1.3; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); } .sub { color: var(--sub); } .small { font-size: 12px; } .grow { flex: 1; min-width: 0; }
.center { text-align: center; align-items: center; } .row { display: flex; align-items: center; gap: 10px; } .between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; } .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; } .grid4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* утсан дэлгэц */
.phone { max-width: 540px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding: 16px 16px 0; display: flex; flex-direction: column; gap: 14px; }
.phone > :last-child:not(.tabbar) { margin-bottom: 16px; }
.page-loading { padding: 40px; text-align: center; color: var(--muted); }

/* толгой */
.app-header, .page-header { display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0; z-index: 20; padding: 4px 2px;
  background: var(--bg); border-bottom: 1px solid transparent; transition: border-color .15s, box-shadow .15s; }
.phone > .app-header, .phone > .page-header { margin: -16px -16px 0; padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 10px; }
.app-header.stuck, .page-header.stuck { border-bottom-color: var(--border); box-shadow: 0 6px 16px var(--shadow); }
.app-header { justify-content: space-between; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: .5px; color: var(--accent-text); text-decoration: none; white-space: nowrap; }
.brand .tld { opacity: .7; font-weight: 700; }
/* утасны толгой: лого, хотын сонголт, 2 товч нарийн дэлгэцэд багтана */
.app-header .brand { flex: 0 1 auto; min-width: 0; font-size: clamp(15px, 4.6vw, 20px); letter-spacing: .2px; }
.app-header > .row { flex-shrink: 0; }
.app-header .select { max-width: 132px; }
@media (max-width: 360px) { .app-header .select { max-width: 108px; } }
.page-title { font-weight: 700; font-size: 16px; }
.icon-btn { width: 44px; height: 42px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; color: var(--text); cursor: pointer; text-decoration: none; flex-shrink: 0; }
.select { height: 42px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 0 8px; max-width: 124px; }

/* карт */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card-label { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.box { background: var(--alt); border-radius: 12px; padding: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--alt); }
.chip.good { background: var(--good-bg); color: var(--good); } .chip.bad { background: var(--bad-bg); color: var(--bad); } .chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.soft { background: var(--soft-bg); color: var(--soft-text); } .chip.rose { background: #be123c; color: #fff; }
.date-main { font-size: 19px; font-weight: 700; }
.big-num { font-size: 36px; font-weight: 800; color: var(--accent-text); line-height: 1; }

/* товч */
.btn { min-height: 46px; border-radius: 12px; border: none; padding: 0 16px; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; } .btn-teal { background: var(--teal); color: #fff; } .btn-byl { background: var(--byl); color: #fff; } .btn-rose { background: #be123c; color: #fff; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border2); }
.btn-soft { background: var(--alt); color: var(--text); border: 1px solid var(--border); }
.btn[disabled], .btn.disabled { background: var(--alt); color: var(--muted); cursor: not-allowed; border: none; }
.btn-block { width: 100%; }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 0 12px; border-radius: 12px; background: var(--alt); color: var(--text); text-decoration: none; }

/* маягт */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.input, .field input, .field textarea, .field select { min-height: 46px; background: var(--alt); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; font-size: 15px; font-weight: 400; width: 100%; }
.field textarea { padding: 10px 12px; resize: none; }
.field .hint { font-size: 12px; font-weight: 400; color: var(--muted); }
.phone-input { display: flex; gap: 8px; } .phone-input .cc { height: 46px; padding: 0 12px; display: flex; align-items: center; border-radius: 10px; background: var(--alt); border: 1px solid var(--border); font-weight: 600; }
.code-input { height: 56px !important; font-size: 26px !important; font-weight: 700 !important; letter-spacing: 12px; text-align: center; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; font-size: 13px; } .check input { width: 20px; height: 20px; accent-color: var(--primary); flex-shrink: 0; }
.error { background: var(--bad-bg); color: var(--bad); border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.success { background: var(--good-bg); color: var(--good); border-radius: 12px; padding: 12px; }

/* сонголт (асуулт) */
.option { position: relative; overflow: hidden; min-height: 46px; padding: 10px 12px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; text-align: left; cursor: pointer; background: var(--alt); border: 1px solid var(--border); width: 100%; }
.option.mine { border: 2px solid var(--accent); }
.option:disabled { cursor: default; color: var(--text); }
/* өдрийн асуултын алхам (1..5) */
.qsteps { display: flex; gap: 8px; }
.qstep { flex: 1; min-height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--alt); color: var(--sub); font-weight: 700; cursor: pointer; position: relative; }
.qstep.done { background: var(--good-bg); color: var(--good); border-color: transparent; }
.qstep.on { border: 2px solid var(--accent); color: var(--text); }
.qstep.done.on { color: var(--good); }
/* «Асуулт» цэс */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 6px 2px -4px; }
.section-head h2 { font-size: 15px; }
.pill-count { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--alt); color: var(--sub); }
.option .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--other-fill); transition: width .4s ease; }
.option.mine .fill { background: var(--mine-fill); }
.option .txt { position: relative; display: flex; align-items: center; gap: 10px; }
.option .pct { position: relative; font-weight: 700; }
.radio-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); flex-shrink: 0; }
.option.mine .radio-dot { border: 5px solid var(--accent); background: var(--surface); }

/* график */
.bar-track { border-radius: 999px; background: var(--track); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--bar2); }
.bar-fill.hi { background: var(--accent); }
.vbars { display: flex; align-items: flex-end; gap: 10px; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.vbar .col { width: 100%; max-width: 56px; border-radius: 8px 8px 2px 2px; background: var(--accent); }
.vbar .col.dim { background: var(--bar2); }
.tabs { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; background: var(--alt); border-radius: 10px; padding: 4px; gap: 4px; }
.tabs button { min-height: 38px; border: none; border-radius: 8px; background: transparent; color: var(--sub); font-weight: 600; cursor: pointer; }
.tabs button.on { background: var(--primary); color: #fff; }
.dots { display: flex; gap: 4px; } .dots span { flex: 1; height: 10px; border-radius: 999px; background: var(--track); } .dots span.on { background: var(--rose); }
.score { display: flex; flex-direction: column; gap: 3px; }

/* баннер */
.banner { position: relative; display: block; border-radius: 14px; overflow: hidden; }
.banner img { display: block; width: 100%; height: 100px; object-fit: cover; }
.banner-tag { position: absolute; top: 6px; right: 8px; font-size: 10px; font-weight: 700; background: rgba(0,0,0,.55); color: #fff; padding: 2px 6px; border-radius: 6px; }
.banner-placeholder { border: 1.5px dashed var(--muted); border-radius: 14px; height: 100px; background: var(--alt); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.banner-placeholder .label { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }

/* switch */
.switch { flex-shrink: 0; width: 56px; height: 32px; border-radius: 999px; border: none; padding: 3px; cursor: pointer; display: flex; justify-content: flex-start; background: var(--switch-off); transition: background .2s; }
.switch.on { background: var(--primary); justify-content: flex-end; }
.switch span { width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch[disabled] { opacity: .5; cursor: not-allowed; }

/* алхам */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
.steps li { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.steps li::before { content: ""; height: 4px; border-radius: 999px; background: var(--track); }
.steps li.done { color: var(--text); } .steps li.done::before { background: var(--accent); } .steps li.cur { font-weight: 700; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent-text); animation: spin .9s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.circle-icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* жагсаалт */
.list-item { padding: 10px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.list-item:first-of-type { border-top: none; }
.kv { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 6px 12px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; }

/* push жишээ */
.push-preview { background: #1e293b; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.push-card { background: rgba(255,255,255,.92); color: #0f172a; border-radius: 14px; padding: 10px 12px; display: flex; gap: 10px; }

/* доод цэс — байнга харагдана */
.tabbar { position: sticky; bottom: 0; margin: auto -16px 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -6px 18px var(--shadow);
  padding: 6px 6px calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); }
.tab { position: relative; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; font-size: 11px; font-weight: 500; color: var(--muted); }
.tab.on { color: var(--accent-text); font-weight: 700; }
.tab.on::before { content: ""; position: absolute; top: -6px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent-text); }
.tab-icon { position: relative; display: flex; }
.badge { position: absolute; top: -4px; right: -10px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #e11d48; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* админ (компьютер) */
.admin { min-height: 100vh; background: #f4f6fa; color: #0f172a; --surface: #fff; --alt: #eef2f8; --text: #0f172a; --muted: #526072; --sub: #334155; --primary: #0d6efd; --border: #e2e8f0; --accent-text: #0369a1; }
.admin-top { background: #08162b; color: #f1f5f9; }
.admin-top-inner { max-width: 1360px; margin: 0 auto; padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.admin-top .brand { color: #00c8ff; } .admin-top .muted { color: #94a3b8; font-weight: 400; } .admin-user a { color: #cbd5e1; margin-left: 12px; }
.admin-body { max-width: 1360px; margin: 0 auto; padding: 24px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.admin-nav { flex: 1 1 200px; max-width: 240px; display: flex; flex-direction: column; gap: 4px; }
.admin-nav a { min-height: 44px; display: flex; align-items: center; padding: 0 12px; border-radius: 10px; text-decoration: none; font-weight: 600; color: #0f172a; }
.admin-nav a.active { background: #0d6efd; color: #fff; }
.admin-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.admin .card { border-radius: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 14px 16px; } .stat .v { font-size: 26px; font-weight: 800; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; min-width: 760px; }
table.data th { background: #f8fafc; text-align: left; font-size: 12px; color: #526072; padding: 10px 12px; }
table.data td { padding: 12px; border-top: 1px solid #e2e8f0; vertical-align: top; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill.ok { background: #d1fae5; color: #065f46; } .pill.wait { background: #fef3c7; color: #92400e; } .pill.no { background: #fee2e2; color: #991b1b; } .pill.off { background: #e2e8f0; color: #334155; } .pill.plan { background: #dbeafe; color: #1e40af; }
.admin .input, .admin .field input, .admin .field select, .admin .field textarea { background: #fff; border: 1px solid #cbd5e1; min-height: 40px; }
.notice { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 16px; border-radius: 12px; }
.notice.warn { background: #fef3c7; color: #78350f; } .notice.ok { background: #ccfbf1; color: #134e4a; }

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 10px 16px; background: #fef3c7; color: #78350f; z-index: 100; }
#blazor-error-ui .reload { margin-left: 8px; }

/* +18 байрлалын зураг: анхдагчаар бүдэг, дарж харна */
.pos-figure { position: relative; margin: 0; border-radius: 14px; overflow: hidden; background: var(--alt); aspect-ratio: 4 / 3; }
.pos-figure img { width: 100%; height: 100%; object-fit: contain; display: block; filter: blur(22px) saturate(.6); transform: scale(1.08); transition: filter .25s ease, transform .25s ease; user-select: none; -webkit-user-drag: none; }
.pos-figure.shown img { filter: none; transform: none; }
.pos-reveal { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: none; background: rgba(8,22,43,.35); color: #fff; font-weight: 700; cursor: pointer; }
.pos-reveal:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) { .pos-figure img { transition: none; } }

/* админ: зураг оруулах */
.adult-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; background: var(--alt); border: 1px dashed var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb-busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.8); font-weight: 700; font-size: 13px; }
.file-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 0 14px; white-space: nowrap; }
/* хөтчийн «Choose File» товчийг нууж, бүх талбайг дарах боломжтой болгоно */
.file-btn input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.file-btn input[type=file]::file-selector-button { cursor: pointer; }
.file-btn:has(input:disabled) { opacity: .6; cursor: progress; }
.file-btn:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.banner-preview { width: 100%; max-width: 358px; aspect-ratio: 358 / 100; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

/* админ: SMS жишээ */
.sms-sample { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; font-weight: 700; letter-spacing: .5px; padding: 3px 8px; border-radius: 6px; background: #fff; border: 1px solid var(--border); }

/* админ: утга хаанаас ирсэн */
.src-chip { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #e2e8f0; color: #475569; }
.src-chip.admin { background: #dbeafe; color: #1d4ed8; }

/* ===================== Өдрийн зурхайн карт ===================== */
.zc { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 14px;
      background-image: radial-gradient(120% 60% at 100% 0%, rgba(251,191,36,.10), transparent 60%); }
.zc-top { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 14px; align-items: center; }
.zc-hero { width: 92px; height: 92px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative;
           box-shadow: 0 0 0 3px rgba(251,191,36,.55), 0 0 0 7px rgba(251,191,36,.14), 0 8px 22px rgba(0,0,0,.18); }
.zc-emoji { font-size: 50px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.18)); }
.zc-hero.el-wood  { background: radial-gradient(circle at 35% 30%, #bbf7d0, #22c55e); }
.zc-hero.el-fire  { background: radial-gradient(circle at 35% 30%, #fecaca, #ef4444); }
.zc-hero.el-earth { background: radial-gradient(circle at 35% 30%, #fef3c7, #f59e0b); }
.zc-hero.el-metal { background: radial-gradient(circle at 35% 30%, #ffffff, #cbd5e1); }
.zc-hero.el-water { background: radial-gradient(circle at 35% 30%, #bfdbfe, #1e3a8a); }
.zc-dates { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.zc-line { display: flex; gap: 10px; align-items: flex-start; }
.zc-k { font-size: 12px; color: var(--muted); font-weight: 600; }
.zc-v { font-weight: 700; color: var(--text); line-height: 1.3; }
.zc-v.big { font-size: 19px; letter-spacing: .3px; color: var(--rose); }
.zc-sub { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.zc-special { padding: 8px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-weight: 700; font-size: 13px; text-align: center; }

.zi { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.zi-rose { background: rgba(244,63,94,.15); color: #f43f5e; }   .zi-amber { background: rgba(245,158,11,.16); color: #d97706; }
.zi-orange { background: rgba(249,115,22,.16); color: #ea580c; } .zi-teal { background: rgba(20,184,166,.16); color: #0d9488; }
.zi-violet { background: rgba(139,92,246,.16); color: #7c3aed; } .zi-indigo { background: rgba(99,102,241,.16); color: #4f46e5; }
.zi-green { background: rgba(16,185,129,.16); color: #059669; } .zi-red { background: rgba(239,68,68,.15); color: #dc2626; }
.zi-blue { background: rgba(59,130,246,.15); color: #2563eb; }
[data-theme="dark"] .zi svg { filter: brightness(1.35); }
.mewa { display: grid; grid-template-columns: repeat(3, 6px); gap: 2px; }
.mewa i { width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }

.zc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.zc-tile { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: var(--alt); min-width: 0; }
.zc-tile dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.zc-tile dd { margin: 0; font-weight: 800; color: var(--text); line-height: 1.25; }
.zc-tile dd.good { color: var(--good); } .zc-tile dd.bad { color: var(--bad); }

.zc-day { border-radius: 14px; border: 1px solid var(--border); padding: 22px 12px 10px; position: relative; display: flex; flex-direction: column; gap: 8px; }
.zc-ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 3px 18px; border-radius: 999px; font-weight: 800; font-size: 14px;
             background: linear-gradient(180deg, #2563eb, #1e40af); color: #fde68a; box-shadow: 0 2px 6px rgba(30,64,175,.35); white-space: nowrap; }
.zc-deed { display: flex; gap: 10px; align-items: flex-start; }
.zc-deed p { margin: 6px 0 0; font-weight: 600; line-height: 1.45; color: var(--text); }
.zc-deed .bad, .zc-list .bad { color: var(--bad); }

.zc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.zc-list li { display: grid; grid-template-columns: 34px 118px minmax(0,1fr); gap: 10px; align-items: center; padding: 6px 0; border-top: 1px dashed var(--border); }
.zc-list li:first-child { border-top: none; }
.zc-list .zc-v { font-weight: 700; }
@media (max-width: 380px) {
  .zc { padding: 14px 12px; }
  .zc-top { grid-template-columns: 76px minmax(0,1fr); gap: 10px; }
  .zc-hero { width: 76px; height: 76px; } .zc-emoji { font-size: 42px; }
  .zc-list li { grid-template-columns: 34px minmax(0,1fr); }
  .zc-list li .zc-v { grid-column: 2; }
}

/* ---------- /zurhai: тууз, 7 хоног, сар ---------- */
.chip-btn { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 700; cursor: pointer; }
.chip-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.date-strip { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: thin; }
.ds-day { flex: 0 0 54px; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 0 6px;
          border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.ds-day.today { border-color: var(--accent); }
.ds-day.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.ds-wd { font-size: 11px; font-weight: 700; opacity: .8; } .ds-n { font-size: 18px; font-weight: 800; line-height: 1.1; } .ds-l { font-size: 11px; opacity: .75; }
.ds-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--track); }
.ds-dot.good { background: #10b981; } .ds-dot.bad { background: #ef4444; }

.week-row { display: grid; grid-template-columns: 48px minmax(0,1fr) 16px; gap: 12px; align-items: center; text-align: left; width: 100%; cursor: pointer; color: var(--text); font: inherit; }
.week-row.today { border-color: var(--accent); }
.wr-date { display: flex; flex-direction: column; align-items: center; } .wr-n { font-size: 22px; font-weight: 800; line-height: 1; }
.wr-title { font-weight: 800; } .wr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.wr-chips .chip { padding: 3px 10px; font-size: 12px; }
.wr-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wr-go { color: var(--muted); font-size: 22px; }

.month { gap: 10px; }
.mg { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 4px; }
.mg-head span { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.mg-day { aspect-ratio: 1 / 1.15; border-radius: 10px; border: 1px solid var(--border); background: var(--alt); color: var(--text); cursor: pointer;
          display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 2px; font: inherit; }
.mg-day.today { border: 2px solid var(--accent); }
.mg-n { font-weight: 800; font-size: 15px; line-height: 1.1; } .mg-l { font-size: 10px; color: var(--muted); }
.mg-icons { display: flex; gap: 3px; align-items: center; height: 12px; } .mg-hair { font-size: 10px; color: #10b981; }

/* ======================= Мэргэ булан ======================= */
.merge-promo, .merge-tile { flex-direction: row !important; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
.merge-promo { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface)); }
.mp-bones { font-size: 22px; letter-spacing: -2px; white-space: nowrap; }
.mp-go { margin-left: auto; font-size: 26px; color: var(--muted); }
.mt-icon { font-size: 34px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--alt); flex: none; }
.mt-faces { font-size: 13px; color: var(--muted); }
.merge-tile.soon { opacity: .55; }

.shagai-card { gap: 14px; }
.bones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 8px 0; }
.bone {
    --i: 0; aspect-ratio: 3 / 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    border-radius: 42% 42% 38% 38% / 34% 34% 30% 30%;
    background: radial-gradient(circle at 35% 28%, #fff8ea 0%, #f1dfbf 45%, #d8b98a 100%);
    box-shadow: inset 0 -6px 10px rgba(120, 80, 30, .25), 0 6px 14px rgba(0, 0, 0, .25);
    color: #3b2a14;
}
.b-emoji { font-size: clamp(26px, 8vw, 40px); line-height: 1; }
.b-name { font-size: 12px; font-weight: 700; text-transform: capitalize; }
.bones.idle .bone { opacity: .85; }
.bones.throwing .bone { animation: sh-tumble .55s cubic-bezier(.3,.7,.4,1) infinite alternate; animation-delay: calc(var(--i) * 90ms); }
.bones.landed .bone { animation: sh-land .5s cubic-bezier(.2,1.4,.4,1) both; animation-delay: calc(var(--i) * 110ms); }
@keyframes sh-tumble {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-26px) rotate(200deg) scale(.92); }
    100% { transform: translateY(4px) rotate(380deg); }
}
@keyframes sh-land { from { transform: translateY(-30px) rotate(-30deg) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bones.throwing .bone, .bones.landed .bone { animation: none; } }

.sh-result { display: flex; flex-direction: column; gap: 6px; text-align: center; padding: 14px; border-radius: 16px; border: 1px solid var(--border); }
.sh-title { font-size: 20px; font-weight: 800; }
.sh-level { font-weight: 700; }
.sh-stars { letter-spacing: 2px; }
.sh-meaning { margin: 4px 0 0; font-size: 15px; }
.sh-advice { margin: 0; font-size: 14px; color: var(--muted); }
.sh-result.lvl-4 { background: color-mix(in srgb, #f5b301 14%, transparent); border-color: color-mix(in srgb, #f5b301 45%, transparent); }
.sh-result.lvl-4 .sh-level { color: #d89a00; }
.sh-result.lvl-3 { background: color-mix(in srgb, #22a06b 12%, transparent); }
.sh-result.lvl-3 .sh-level { color: #22a06b; }
.sh-result.lvl-2 .sh-level { color: var(--accent-text); }
.sh-result.lvl-1 { background: color-mix(in srgb, #8a8f98 12%, transparent); }
.sh-result.lvl-1 .sh-level { color: var(--muted); }

.share-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.btn-fb { background: #1877f2; color: #fff; border: 0; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn-fb:hover { background: #166fe0; color: #fff; }

/* ---- зоосон мэргэ ---- */
.coins { display: flex; justify-content: center; gap: 16px; padding: 6px 0; }
.coin {
    --i: 0; width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; flex: none;
    background: radial-gradient(circle at 35% 30%, #fff3c4 0%, #f1c95b 45%, #b8861d 100%);
    box-shadow: inset 0 0 0 4px rgba(255,255,255,.35), inset 0 -6px 10px rgba(110,70,0,.35), 0 6px 14px rgba(0,0,0,.3);
    color: #5a3b00; font-weight: 800; font-size: 15px;
}
.coin.idle .coin-in, .coin.spin .coin-in { font-size: 36px; }
.coin.tails { background: radial-gradient(circle at 35% 30%, #ffffff 0%, #d7dde5 45%, #8e99a8 100%); color: #2b3440; }
.coin.spin { animation: coin-spin .35s linear infinite; animation-delay: calc(var(--i) * 60ms); }
.coin.landed { animation: coin-land .45s cubic-bezier(.2,1.4,.4,1) both; animation-delay: calc(var(--i) * 90ms); }
@keyframes coin-spin { from { transform: rotateY(0) translateY(0); } 50% { transform: rotateY(180deg) translateY(-14px); } to { transform: rotateY(360deg) translateY(0); } }
@keyframes coin-land { from { transform: rotateY(90deg) scale(.8); opacity: .3; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .coin.spin, .coin.landed { animation: none; } }
.quick-answer { font-size: 30px; }

.hex { display: flex; flex-direction: column; gap: 9px; width: 190px; margin: 4px auto; }
.hx-line { position: relative; display: flex; gap: 14%; height: 14px; }
.hx-bar { flex: 1; border-radius: 4px; background: var(--text); }
.hx-line.yang { gap: 0; }
.hx-line.yang .hx-bar:last-child { display: none; }
.hx-line.changing .hx-bar { background: #f5b301; }
.hx-line.empty .hx-bar { background: transparent; border: 2px dashed var(--border); }
.hx-line:not(.empty) .hx-bar { animation: hx-grow .35s ease-out both; transform-origin: left; }
@keyframes hx-grow { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hx-line .hx-bar { animation: none !important; } }
.hx-mark { position: absolute; right: -24px; top: 50%; transform: translateY(-50%); font-size: 14px; color: #f5b301; font-weight: 800; }
.hex-sm { width: 70px; gap: 4px; margin: 0; flex: none; } .hex-sm .hx-line { height: 6px; }
.hex-future { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; border: 1px dashed var(--border); }

/* ======================= Мэргэ булан — нэмэлтүүд ======================= */
.premium-chip { align-self: center; font-size: 13px; font-weight: 700; color: #d89a00; background: color-mix(in srgb, #f5b301 14%, transparent); border-radius: 999px; padding: 4px 12px; }
.premium-cta { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; text-decoration: none; color: var(--text);
    background: color-mix(in srgb, #f5b301 10%, var(--surface)); border: 1px solid color-mix(in srgb, #f5b301 40%, transparent); }
.premium-cta.small { font-size: 13px; }

.compare-box { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.cmp-side { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 10px; border-radius: 14px; border: 1px solid var(--border); }
.cmp-side.win { border-color: #f5b301; background: color-mix(in srgb, #f5b301 12%, transparent); }
.cmp-vs { font-weight: 900; color: var(--muted); }

.love-card { gap: 16px; }
.love-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.lp-person { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.lp-emoji { font-size: 48px; line-height: 1; }
.lp-name { font-weight: 700; font-size: 14px; }
.love-ring { --p: 50; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center;
    background: conic-gradient(#ff5d8f calc(var(--p) * 1%), var(--alt) 0); }
.love-ring span { width: 90px; height: 90px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; gap: 1px; font-size: 30px; font-weight: 900; }
.love-ring small { font-size: 14px; }
.love-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.love-person { border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.love-person legend { font-weight: 800; padding: 0 6px; }
.lp-preview { font-weight: 700; color: var(--accent-text); font-size: 14px; }
@media (max-width: 420px) { .love-form { grid-template-columns: 1fr; } }

.num-big { font-size: 88px; font-weight: 900; line-height: 1; text-align: center;
    background: linear-gradient(135deg, #7cc4ff, #f5b301); -webkit-background-clip: text; background-clip: text; color: transparent; }
.num-facts { display: grid; gap: 8px; margin: 0; }
.num-facts dt { font-weight: 800; }
.num-facts dd { margin: 0 0 6px; color: var(--sub); }

.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.mbadge { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 12px 8px; border-radius: 14px; border: 1px solid var(--border); }
.mbadge.earned { background: color-mix(in srgb, #f5b301 10%, transparent); border-color: color-mix(in srgb, #f5b301 45%, transparent); }
.mbadge.locked { opacity: .6; }
.mbadge.locked .bd-emoji { filter: grayscale(1); }
.bd-emoji { font-size: 34px; line-height: 1.1; }
.bd-bar { width: 100%; height: 6px; border-radius: 6px; background: var(--alt); overflow: hidden; }
.bd-bar span { display: block; height: 100%; background: #f5b301; }
.horse-board { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.horse-board li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.hist-list, .dream-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hist-list a, .dream-list a { display: flex; align-items: center; gap: 12px; padding: 10px 2px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border); }
.hist-list li:last-child a, .dream-list li:last-child a { border-bottom: 0; }
.hist-icon { font-size: 26px; width: 40px; text-align: center; }
.dream-list a span:nth-child(2) { flex: 1; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
.dot.good { background: #22a06b; } .dot.bad { background: #e5484d; } .dot.neutral { background: #7cc4ff; }
.dream-card { gap: 10px; }
.dream-title { font-size: 24px; margin: 0; }
.dream-text { font-size: 16px; line-height: 1.6; margin: 0; }
.dream-card .chip.good { background: color-mix(in srgb, #22a06b 18%, transparent); color: #22a06b; }
.dream-card .chip.bad { background: color-mix(in srgb, #e5484d 18%, transparent); color: #e5484d; }
.dream-card .chip.neutral { background: color-mix(in srgb, #7cc4ff 18%, transparent); color: var(--accent-text); }

.hex-lines-detail { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid color-mix(in srgb, #f5b301 45%, transparent); }
.hld-row { display: flex; gap: 10px; font-size: 14px; }
.hld-pos { flex: none; font-weight: 800; color: #d89a00; min-width: 92px; }

/* админ: баганан график */
.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding: 8px 0; }
.bc-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 6px; }
.bc-bar { width: 100%; background: #0369a1; border-radius: 4px 4px 0 0; min-height: 2px; }
.bc-lbl { font-size: 10px; color: #526072; }

/* шагайн мэргэ: уламжлалт | орчин үеийн тайлбар */
.sh-part { display: flex; flex-direction: column; gap: 4px; text-align: left; padding-top: 10px; margin-top: 4px; border-top: 1px dashed var(--border); }
.sh-part-label { font-size: 12px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); }
.sh-part .sh-meaning { margin: 0; }
.sh-part.modern .sh-meaning { font-size: 14px; }

/* ======================= Түүхэнд энэ өдөр ======================= */
.hist-events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hist-events li { display: grid; grid-template-columns: 4.9em 1fr; gap: 10px; align-items: baseline; }
.he-year { white-space: nowrap; font-weight: 800; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.he-text { line-height: 1.5; }
.he-mn { margin-right: 4px; }
.date-nav { display: flex; align-items: center; gap: 10px; }
.month-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.month-chips .chip-btn { flex: none; display: inline-flex; align-items: center; text-decoration: none; }

/* ======================= Админ: хандалтын лог ======================= */
.log-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(60px, 38%) 4.2em; gap: 10px; align-items: center; width: 100%; padding: 6px 4px;
  background: none; border: 0; border-radius: 8px; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.log-row strong { text-align: right; }
.log-row:hover { background: #f1f5f9; } .log-row.static { cursor: default; } .log-row.static:hover { background: none; }
.log-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-meter { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; } .log-meter span { display: block; height: 100%; background: #0369a1; border-radius: 999px; }
.log-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.log-table td { padding: 8px 10px; font-size: 14px; }
.log-method { display: inline-block; min-width: 38px; font-size: 11px; font-weight: 800; color: #526072; background: #eef2f8; border-radius: 6px; padding: 1px 6px; margin-right: 6px; text-align: center; }
.log-method.nav { color: #0369a1; background: #e0f2fe; }
.log-path { word-break: break-all; }
.log-details { max-width: 360px; word-break: break-word; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: #0369a1; cursor: pointer; text-align: left; } .link-btn:hover { text-decoration: underline; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }

/* ======================= YouTube (хөнгөн embed) ======================= */
.yt-lite { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.yt-lite iframe, .yt-cover { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-cover { padding: 0; cursor: pointer; background: #000; }
.yt-cover img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; transition: opacity .2s; }
.yt-cover:hover img { opacity: 1; }
.yt-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 44px; border-radius: 12px; background: #e11d48;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.yt-cover:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.syslog { padding: 10px 4px 10px 12px; border-bottom: 1px solid #e2e8f0; border-left: 3px solid transparent; }
.syslog.no { border-left-color: #dc2626; background: #fef2f2; } .syslog.wait { border-left-color: #d97706; }
.syslog-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.syslog-msg { margin-top: 4px; font-size: 14px; word-break: break-word; }
.syslog-pre { margin: 6px 0 0; padding: 10px; background: #0f172a; color: #e2e8f0; border-radius: 8px; font-size: 12px; line-height: 1.45; overflow-x: auto; white-space: pre; max-height: 360px; }
