/* MonSub Pro — дэлгүүр. Гар утас нэгдүгээрт.
   Фонт: системийн стек — Ө Ү ₮ бүх төхөөрөмж дээр гарна (Google фонт татахгүй). */
:root {
  --bg: #0b1020; --bg2: #121a33; --card: #ffffff; --ink: #0f172a; --muted: #64748b;
  --line: #e2e8f0; --brand: #4f46e5; --brand2: #6366f1; --ok: #059669; --warn: #b45309; --err: #dc2626;
  --r: 14px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: #f6f7fb; -webkit-text-size-adjust: 100%;
}
a { color: var(--brand); }
img { max-width: 100%; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* ── толгой ── */
header.top { background: linear-gradient(160deg, var(--bg), var(--bg2)); color: #fff; padding: 18px 0 46px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .3px; font-size: 19px; }
.brand .dot { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #818cf8, #22d3ee); display: grid; place-items: center; font-size: 14px; }
.topbar a { color: #c7d2fe; text-decoration: none; font-size: 14px; }
.topbar a:hover { color: #fff; }
.hero { margin-top: 26px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(24px, 5vw, 36px); line-height: 1.2; }
.hero p { margin: 0; color: #b9c2e0; font-size: clamp(14px, 2.4vw, 17px); max-width: 62ch; }
.hero .badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: #e5e9f7;
  padding: 6px 11px; border-radius: 999px; font-size: 13px; }

/* ── бараа ── */
main { padding-bottom: 56px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: -28px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform .14s ease, box-shadow .14s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(15,23,42,.14); }
/* 🖼 G2A маягийн зургийн талбай — брэндийн өнгөөр зөөлөн дэвсгэр */
.card .shot { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center;
  background: var(--tint, #eef2ff); }
.card .shot img { width: 46%; max-width: 96px; height: auto; object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(15,23,42,.18)); }
/* Багц — гурван лого зэрэгцээ */
.card .shot .trio { display: flex; align-items: center; justify-content: center; }
.card .shot .trio img { width: 62px; max-width: none; margin-left: -14px; background: #fff;
  border-radius: 50%; padding: 7px; box-sizing: border-box;
  box-shadow: 0 0 0 3px #fff, 0 3px 10px rgba(15,23,42,.20); }
.card .shot .trio img:first-child { margin-left: 0; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 11px; }
.card h3 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; line-height: 1.25; }
.tile { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: #fff; border: 1px solid var(--line); overflow: hidden; }
.tile img { width: 27px; height: 27px; object-fit: contain; display: block; }
/* Лого олдоогүй бараанд — брэндийн өнгөт үсэгт хавтан (нөөц) */
.tile.letters { color: #fff; font-weight: 800; font-size: 15px; border: 0; }
.card .tag { color: var(--muted); font-size: 14px; margin: 0; }
.badge { background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; letter-spacing: .3px; }
.plans { display: flex; flex-direction: column; gap: 8px; }
.plan { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1.5px solid var(--line); border-radius: 11px; padding: 11px 13px; background: #fff;
  cursor: pointer; font: inherit; text-align: left; width: 100%; transition: border-color .12s, background .12s; }
.plan:hover { border-color: #c7d2fe; background: #f8faff; }
.plan .lbl { font-weight: 600; }
.plan .price { font-weight: 800; font-size: 17px; white-space: nowrap; }
.steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 34px; }
.step { background: #fff; border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.step b { display: block; font-size: 15px; margin-bottom: 4px; }
.step span { color: var(--muted); font-size: 14px; }
.step .n { width: 26px; height: 26px; border-radius: 8px; background: #eef2ff; color: var(--brand);
  display: grid; place-items: center; font-weight: 800; font-size: 14px; margin-bottom: 8px; }
h2.sec { font-size: 20px; margin: 34px 0 4px; }
p.secsub { color: var(--muted); margin: 0 0 12px; font-size: 14px; }

/* ── модал ── */
dialog.modal { border: 0; border-radius: 16px; padding: 0; width: min(430px, calc(100% - 24px)); box-shadow: 0 24px 64px rgba(15,23,42,.28); }
dialog.modal::backdrop { background: rgba(15,23,42,.55); }
.modal .head { padding: 18px 18px 0; display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.modal .head h3 { margin: 0; font-size: 18px; }
.modal .head h3 { display: flex; align-items: center; gap: 9px; }
.modal .head .tile { width: 30px; height: 30px; border-radius: 8px; }
.modal .head .tile img { width: 20px; height: 20px; }
.modal .body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 13px; }
.x { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
label .opt { font-weight: 400; color: var(--muted); }
input[type=email], input[type=tel], input[type=text], input[type=password], textarea, select {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid #c7d2fe; outline-offset: 1px; border-color: var(--brand2); }
.hint { color: var(--muted); font-size: 13px; margin-top: 5px; }
.qty { display: flex; align-items: center; gap: 10px; }
.qty button { width: 42px; height: 42px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-size: 20px; cursor: pointer; }
.qty input { width: 74px; text-align: center; font-weight: 700; font-size: 17px; }
.total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--line); padding-top: 12px; }
.total .sum { font-size: 22px; font-weight: 800; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: var(--brand); color: #fff; border: 0; border-radius: 11px; padding: 14px 16px;
  font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
.btn:hover { background: #4338ca; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.msg { border-radius: 10px; padding: 11px 12px; font-size: 14px; }
.msg.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.msg.ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.msg.info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── захиалгын хуудас ── */
.panel { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; margin-top: 22px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f1f5f9; font-size: 15px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 600; text-align: right; }
.state { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; padding: 6px 12px; border-radius: 999px; font-size: 14px; }
.state.pending { background: #fff7ed; color: #9a3412; }
.state.paid { background: #eff6ff; color: #1e40af; }
.state.fulfilled { background: #ecfdf5; color: #065f46; }
.state.cancelled, .state.expired { background: #f1f5f9; color: #475569; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #f1f5f9;
  padding: 10px 12px; border-radius: 9px; font-size: 16px; word-break: break-all; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.code button { border: 0; background: var(--brand); color: #fff; border-radius: 7px; padding: 6px 10px; cursor: pointer; font: inherit; font-size: 13px; }
pre.instr { white-space: pre-wrap; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 0; font: inherit; font-size: 15px; }

/* ── хөл ── */
footer { border-top: 1px solid var(--line); padding: 22px 0 34px; color: var(--muted); font-size: 13px; background: #fff; }
footer .row { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; }
.skeleton { background: linear-gradient(90deg, #eef1f6 25%, #f6f8fb 37%, #eef1f6 63%); background-size: 400% 100%;
  animation: sk 1.3s ease infinite; border-radius: var(--r); height: 190px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* ── 💬 Messenger товч (m.me — Chat Plugin 2024-05-09-нд хаагдсан) ── */
.msgr {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  display: inline-flex; align-items: center; gap: 9px;
  background: #0866ff; color: #fff; text-decoration: none;
  border-radius: 999px; padding: 12px 18px 12px 14px;
  box-shadow: 0 6px 20px rgba(8,102,255,.38), 0 2px 6px rgba(15,23,42,.18);
  font-weight: 700; font-size: 15px; line-height: 1;
  transition: transform .12s ease, box-shadow .12s ease;
}
.msgr:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(8,102,255,.46); }
.msgr:active { transform: translateY(0); }
.msgr:focus-visible { outline: 3px solid #bfdbfe; outline-offset: 2px; }
.msgr svg { width: 24px; height: 24px; flex: none; }
/* Гар утсанд зөвхөн дүрс — контентыг халхлахгүй */
@media (max-width: 560px) {
  .msgr { padding: 13px; right: 14px; bottom: 14px; }
  .msgr .t { display: none; }
}
/* Худалдан авах цонх нээлттэй үед товч халхлахгүй */
body:has(dialog[open]) .msgr { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .msgr { transition: none; } }

/* 💸 Хэмнэлт — багц дээр хуучин үнийг зурааслаж, хэмнэсэн дүнг тодруулна */
.save { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.save .was { color: var(--muted); text-decoration: line-through; }
.save .off { background: #dcfce7; color: #166534; font-weight: 800; border-radius: 999px;
  padding: 2px 9px; font-size: 12px; letter-spacing: .2px; }
.grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
@media (max-width: 560px) { .card .shot { aspect-ratio: 16 / 9; } }
