/* Толгой бөхий · сайтын хуудсуудын нийтлэг загвар (дэвтэр дизайн систем, тоглоомтой ижил токен) */
:root { --paper: #f3f2ee; --paper-raised: #ffffff; --grid: #e2e6ee; --ink: #17171c; --ink-muted: #5f5f69; --marker: #f7cb3d; --on-marker: #17171c; --highlight: var(--marker); --sticky: #fff1a8; --tape: rgba(214,196,150,0.75); --phone: #3d6fe6; --notice: #e06a00; --notice-soft: #ffe2c2; --notice-ink: #a3410a; --up: #d92d47; --up-soft: #ffe1e5; --up-ink: #b4152b; --citizen-noticed: #fff0ad; --citizen-awake: #ffe234; --citizen-angry: #ff7a6e; --gain: #147a3a; --gain-soft: #d6f5e1; --zone: #6d4fe0; --zone-soft: #e6defc; --tint-calm: #c8f2dc; --tint-rage: #ffd3cc; --focus: #3d6fe6; --shadow-lift: 4px 5px 0 #17171c; --shadow-press: 6px 8px 0 #17171c; --shadow-small: 3px 4px 0 #17171c; --shadow-marker: 5px 6px 0 #f7cb3d; color-scheme: only light;
  --grid-cell: 28px; --font-display: Manrope, "Segoe UI", system-ui, sans-serif; --font-voice: Nunito, "Segoe UI", system-ui, sans-serif; --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background-color: var(--paper); color: var(--ink); font-family: var(--font-display); -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { touch-action: manipulation; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.tb-grid { background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: var(--grid-cell) var(--grid-cell); }
.tb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.meta { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--ink-muted); text-transform: uppercase; }
.mark { position: relative; display: inline-block; }
.mark > i { position: absolute; left: -.08em; right: -.12em; bottom: .06em; height: .38em; background: var(--highlight); border-radius: 4px; transform: skewX(-8deg); }
.mark > span { position: relative; }
.muted { color: var(--ink-muted); }

/* Товч */
.tb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 56px; padding: 0 28px; white-space: nowrap; border-radius: 999px; border: 4px solid var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 17px; cursor: pointer; text-decoration: none; transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s, background .18s; }
.tb-btn--primary { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-marker); }
.tb-btn--secondary { background: var(--paper-raised); color: var(--ink); box-shadow: var(--shadow-lift); }
.tb-btn--danger { background: var(--up-soft); color: var(--up-ink); box-shadow: var(--shadow-lift); }
.tb-btn--small { height: 44px; padding: 0 16px; font-size: 15px; border-width: 3px; }
.tb-btn--tiny { height: 36px; padding: 0 12px; font-size: 13px; border-width: 2.5px; box-shadow: 2px 3px 0 var(--ink); }
.tb-btn--full { width: 100%; }
.tb-btn:active { transform: translate(3px, 3px); }
.tb-btn--primary:active { box-shadow: 1px 1px 0 var(--marker); }
.tb-btn--secondary:active, .tb-btn--danger:active { box-shadow: 1px 1px 0 var(--ink); }
.tb-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
@media (hover: hover) {
  .tb-btn--primary:hover { transform: translate(-2px, -2px); box-shadow: 7px 8px 0 var(--marker); }
  .tb-btn--secondary:hover, .tb-btn--danger:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-press); }
  .tb-btn[disabled]:hover { transform: none; }
}
.round { width: 46px; height: 46px; flex-shrink: 0; padding: 0; border-radius: 50%; border: 3px solid var(--ink); background: var(--paper-raised); color: var(--ink); box-shadow: var(--shadow-small); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }
.round:active { transform: translate(2px, 3px); box-shadow: 0 0 0 var(--ink); }
.link { min-height: 44px; padding: 0 6px; border: 0; background: none; display: inline-flex; align-items: center; font-size: 15px; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; color: var(--ink); }
.chip { display: inline-block; padding: 5px 12px; border: 3px solid var(--ink); border-radius: 999px; background: var(--paper-raised); font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; box-shadow: var(--shadow-small); transform: rotate(-2deg); white-space: nowrap; }
.chip--marker { background: var(--marker); color: var(--on-marker); }
.chip--up { background: var(--up-soft); color: var(--up-ink); }
.chip--gain { background: var(--gain-soft); color: var(--gain); }
.sticky { display: block; padding: 10px 14px; background: var(--sticky); color: var(--ink); border: 3px solid var(--ink); border-radius: 8px; font-family: var(--font-voice); font-size: 15px; font-weight: 700; line-height: 1.35; transform: rotate(-.6deg); }
.sticky--up { background: var(--up-soft); color: var(--up-ink); }
.card { position: relative; background: var(--paper-raised); border: 3px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow-small); }
.tape { position: absolute; left: 50%; top: -11px; width: 84px; height: 21px; margin-left: -42px; background: var(--tape); transform: rotate(2deg); pointer-events: none; }
.bubble { position: absolute; display: inline-block; padding: 5px 12px 6px; border-radius: 14px; border: 3px solid var(--ink); box-shadow: var(--shadow-small); background: var(--paper-raised); color: var(--ink); font-family: var(--font-voice); font-weight: 800; font-size: 15px; line-height: 1.25; white-space: nowrap; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 13px; height: 13px; margin-left: -7px; background: inherit; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg); }
.bubble--notice { background: var(--citizen-noticed); }
.bubble--up { background: var(--citizen-awake); }
.coin { width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--marker); color: var(--on-marker); display: flex; align-items: center; justify-content: center; }
.tb-person, .tb-noyon { display: block; overflow: visible; }

/* Хоёр сонголттой товч, таб */
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; height: 50px; padding: 3px; border: 3px solid var(--ink); border-radius: 999px; background: var(--paper-raised); box-shadow: var(--shadow-small); }
.seg > button { min-width: 0; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 800; font-size: 15px; white-space: nowrap; cursor: pointer; }
.seg > button[aria-checked="true"], .seg > button[aria-selected="true"] { background: var(--marker); color: var(--on-marker); box-shadow: inset 0 0 0 2.5px var(--ink); }
.seg--ink > button[aria-selected="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }

/* Хуудасны бүтэц */
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 max(16px, var(--safe-r)) 0 max(16px, var(--safe-l)); }
.nav { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 3px solid var(--ink); padding-top: var(--safe-t); }
.nav .wrap { display: flex; align-items: center; gap: 12px; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; letter-spacing: -.03em; text-decoration: none; white-space: nowrap; }
.brand__dot { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--ink); background: var(--marker); display: flex; align-items: center; justify-content: center; }
.nav__links { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav__links a:not(.tb-btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-weight: 800; font-size: 15px; text-decoration: none; border-radius: 999px; }
.nav__links a[aria-current="page"]:not(.tb-btn) { background: var(--marker); }
.foot { margin-top: 56px; border-top: 3px solid var(--ink); background: var(--paper-raised); padding: 22px 0 calc(22px + var(--safe-b)); font-size: 14px; line-height: 1.5; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }
.section { margin-top: 48px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section__head h2 { font-size: 30px; line-height: 1.05; font-weight: 800; letter-spacing: -.04em; }
@media (max-width: 520px) { .nav__links .hide-sm { display: none !important; } .section__head h2 { font-size: 26px; } }

/* Самбарын мөр */
.lb { overflow: hidden; }
.lb__row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 4px; min-height: 48px; padding: 0 14px; border-bottom: 2px dashed var(--grid); font-weight: 700; }
.lb__row:last-child { border-bottom: 0; }
.lb__row > span:first-child { font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted); }
.lb__row > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb__row > span:last-child { font-variant-numeric: tabular-nums; font-weight: 800; }
.lb__row--top > span:first-child { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--marker); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.lb__row--me { background: var(--sticky); }
.lb__empty, .lb__load { padding: 18px 16px; font-weight: 600; color: var(--ink-muted); line-height: 1.45; }
.lb__load { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; }
.you { flex-shrink: 0; margin-right: 6px; padding: 1px 7px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--paper-raised); font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; font-style: normal; }

/* Хөдөлгөөн */
.tb-anim-bob { animation: tb-bob 2.2s ease-in-out infinite; }
.tb-anim-sway { animation: tb-sway 4.4s ease-in-out infinite; transform-origin: 50% 100%; transform-box: fill-box; }
.tb-anim-flick { animation: tb-flick 3s ease-in-out infinite; }
.tb-anim-wave { animation: tb-wave .8s ease-in-out infinite; transform-box: fill-box; transform-origin: 0% 100%; }
.tb-anim-spin { animation: tb-spin 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.rise { animation: tg-rise 2.6s ease-out infinite; opacity: 0; }
@keyframes tb-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
@keyframes tb-sway { 0%, 100% { transform: rotate(-1.8deg); } 50% { transform: rotate(1.8deg); } }
@keyframes tb-flick { 0%, 100% { opacity: .55; } 45% { opacity: 1; } 50% { opacity: .35; } 55% { opacity: 1; } }
@keyframes tb-spin { 0%, 62%, 100% { transform: scaleX(1); } 71% { transform: scaleX(.12); } 80% { transform: scaleX(1); } }
@keyframes tb-wave { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
@keyframes tg-rise { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; transform: translateY(-8px) scale(1); } 80% { opacity: 1; } 100% { transform: translateY(-80px) scale(.9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .rise { opacity: 1; } }
