[hidden] { display: none !important; }
:root {
  --bg: #0F0E17; --surface: #1E1B2E; --surface2: #252236; --line: #2E2A42;
  --ink: #F4F2FA; --muted: #A7A3BD; --accent: #E0294F; --link: #FF6B85;
  --gold: #F5B841; --ok-bg: #123A2E; --ok: #6FE0B4;
  --display: 'Montserrat', 'Segoe UI', system-ui, sans-serif; --body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); }
body { min-height: 100vh; padding-bottom: 88px; }
a { color: var(--link); text-decoration: none; }
a:hover { color: #FF8FA3; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(15,14,23,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.logo { font-family: var(--display); font-weight: 900; font-size: 22px; letter-spacing: .04em; color: #fff; display: inline-flex; align-items: center; gap: 10px; }
.logo img { width: 44px; height: 44px; flex: 0 0 44px; filter: drop-shadow(0 0 8px rgba(229,9,20,.45)); }
@media (max-width: 420px) { .logo { font-size: 18px; gap: 8px; } .logo img { width: 36px; height: 36px; flex-basis: 36px; } }
.footer { align-items: center; } .footer-logo { width: 64px; height: 64px; }
.auth-logo { width: 96px; height: 96px; align-self: center; filter: drop-shadow(0 0 14px rgba(229,9,20,.4)); }
.logo .logo-text { color: #fff; } .logo .logo-text span { color: var(--accent); }
.nav { display: flex; gap: 16px; font-weight: 700; font-size: 14px; flex-wrap: wrap; }
.nav a { color: var(--muted); } .nav a.on, .nav a:hover { color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 12px; border: 0; font: 800 15px var(--body); cursor: pointer; background: var(--accent); color: #fff; }
.btn:hover { color: #fff; filter: brightness(1.08); }
.btn.white { background: #fff; color: var(--bg); } .btn.white:hover { color: var(--bg); }
.btn.gold { background: var(--gold); color: #1A1406; } .btn.gold:hover { color: #1A1406; }
.btn.ghost { background: transparent; border: 2px solid var(--ink); color: var(--ink); }
.btn.block { width: 100%; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.hero { position: relative; min-height: 460px; display: flex; align-items: flex-end; overflow: hidden; }
.hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(15,14,23,0) 20%, rgba(15,14,23,.8) 65%, var(--bg) 100%); }
.hero .wrap { position: relative; width: 100%; padding-block: 32px; display: flex; flex-direction: column; gap: 12px; }
.hero h1 { font-weight: 900; font-size: clamp(32px, 6vw, 56px); line-height: 1.05; }
.hero p { margin: 0; color: #D8D5E6; max-width: 520px; line-height: 1.5; }
.tag { display: inline-block; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 5px 9px; border-radius: 6px; }
.dots { display: flex; gap: 6px; }
.dots button { height: 6px; width: 6px; border-radius: 3px; border: 0; padding: 0; background: rgba(255,255,255,.4); cursor: pointer; transition: width .3s; }
.dots button.on { width: 24px; background: #fff; }
.slide { display: none; } .slide.on { display: flex; }
.section { padding-top: 32px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.section-head h2 { font-size: 18px; font-weight: 700; }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: 140px; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.card { display: flex; flex-direction: column; gap: 8px; color: var(--ink); min-width: 0; }
.card:hover { color: #fff; }
.poster { aspect-ratio: 2 / 3; border-radius: 12px; background-size: cover; background-position: center; position: relative; max-width: 100%; }
.poster .badge { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 6px; }
.card b { font-size: 14px; line-height: 1.3; }
.card small { color: var(--muted); font-size: 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.member { margin-top: 32px; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--gold); }
.muted { color: var(--muted); }
.series-head { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; padding-block: 28px 8px; }
.series-head .poster { width: 150px; flex: 0 0 150px; }
.series-head > div { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.ep { min-height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 4px; font-weight: 800; background: var(--surface2); color: var(--ink); border: 1px solid var(--line); }
.ep.locked { background: #17151F; color: #8C88A3; }
.ep.owned { border-color: var(--ok); }
.chapters { display: flex; flex-direction: column; }
.chapter { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.pill { font-size: 12px; font-weight: 800; padding: 6px 10px; border-radius: 10px; white-space: nowrap; background: var(--surface2); }
.pill.free { background: var(--ok-bg); color: var(--ok); }
.pill.owned { background: var(--ok-bg); color: var(--ok); }
.player { position: relative; background: #000; border-radius: 14px; overflow: hidden; max-width: 480px; margin: 0 auto; }
.player video { width: 100%; max-height: 80vh; display: block; background: #000; }
.wm { position: absolute; pointer-events: none; color: rgba(255,255,255,.28); font-weight: 800; font-size: 13px; letter-spacing: .05em; transition: top 1.5s, left 1.5s; text-shadow: 0 0 2px rgba(0,0,0,.6); }
.reader { max-width: 720px; margin: 0 auto; position: relative; user-select: none; }
.reader img { width: 100%; -webkit-user-drag: none; }
.form { max-width: 420px; margin: 40px auto; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.form input, .form select, .form textarea, .admin input, .admin select, .admin textarea { min-height: 46px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); color: var(--ink); padding: 0 12px; font: 600 15px var(--body); }
.form textarea, .admin textarea { padding: 10px 12px; min-height: 90px; }
.error { background: #3A1420; color: #FFB3C1; padding: 12px 14px; border-radius: 10px; font-weight: 700; }
.ok { background: var(--ok-bg); color: var(--ok); padding: 12px 14px; border-radius: 10px; font-weight: 700; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.plan, .panel.plan { display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; text-align: left; }
@media (max-width: 759px) { .topbar .nav.cats { display: none; } }
.price { font-family: var(--display); font-weight: 700; font-size: 18px; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(20,19,31,.97); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: env(safe-area-inset-bottom, 0px); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; font-size: 11px; font-weight: 700; color: var(--muted); }
.bottomnav a.on { color: #fff; }
.admin table { width: 100%; border-collapse: collapse; }
.admin td, .admin th { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.admin label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.tablebox { overflow-x: auto; }
progress { width: 100%; height: 10px; }
@media (min-width: 760px) { .bottomnav { display: none; } body { padding-bottom: 0; } .row { grid-auto-columns: 170px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* Цувралын хуудас: постер + трейлер + худалдан авах */
.show-hero { position: relative; min-height: 480px; display: flex; align-items: flex-end; overflow: hidden; }
.show-hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center top; }
.show-hero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(15,14,23,0) 35%, rgba(15,14,23,.85) 75%, var(--bg) 100%); }
.show-hero .wrap { position: relative; width: 100%; padding-block: 24px 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.show-hero h1 { font-weight: 900; font-size: clamp(30px, 6vw, 52px); line-height: 1.05; }
.muted-light { color: #D8D5E6; font-weight: 700; font-size: 14px; }
.show-body { max-width: 560px; display: flex; flex-direction: column; gap: 14px; padding-bottom: 32px; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.actions form { display: contents; }
.desc { margin: 0; line-height: 1.6; }
.trailer { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.trailer video { width: 100%; max-height: 75vh; border-radius: 14px; background: #000; }
.altplan button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid #3A3550; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; text-align: left; }
.altplan button:hover { border-color: var(--gold); }
.altplan small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.gold-price { font-family: var(--display); font-weight: 700; color: var(--gold); white-space: nowrap; }
/* Нүүрний cover: утсан дээр постер бүтнээрээ, том дэлгэц дээр хажуудаа текст */
.hero { min-height: 0; align-items: stretch; }
.hero .bg { filter: blur(28px) brightness(.45); transform: scale(1.15); }
.hero .bg::after { background: linear-gradient(to bottom, rgba(15,14,23,.2), var(--bg)); }
.hero .hero-inner { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding-block: 16px 24px; }
.hero-poster { width: 100%; max-width: 420px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.55); align-self: center; }
.hero-text { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hero-text h1 { font-weight: 900; font-size: clamp(26px, 5vw, 48px); line-height: 1.08; }
.hero-text p { margin: 0; color: #D8D5E6; max-width: 520px; line-height: 1.55; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-actions .btn { flex: 1 1 160px; }
@media (min-width: 760px) {
  .hero .hero-inner { flex-direction: row; align-items: center; gap: 48px; padding-block: 40px; }
  .hero-poster { width: 300px; flex: 0 0 300px; }
  .hero-actions .btn { flex: 0 0 auto; }
}
/* Хайлт, төрөл, торон жагсаалт */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search { display: flex; gap: 8px; margin-bottom: 12px; }
.search input { flex: 1; min-width: 0; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 14px; font: 600 15px var(--body); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 8px; }
.chip { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 13px; }
.chip.on { background: #fff; color: var(--bg); border-color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 16px 10px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px 14px; } }
.card b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.poster .badge.new { background: var(--accent); }
.poster .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.25); border-radius: 0 0 12px 12px; overflow: hidden; }
.poster .progress span { display: block; height: 100%; background: var(--accent); }
.card .rank { position: absolute; left: 8px; top: 8px; z-index: 1; min-width: 34px; height: 34px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(12,11,20,.82); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(4px); font-family: var(--display); font-weight: 900; font-size: 18px; line-height: 1; color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.card .rank.gold { background: var(--gold); border-color: var(--gold); color: #1A1406; }
/* Онцлох хэсгийн баруун талын жагсаалт */
.hero-list { display: none; }
@media (min-width: 1100px) {
  .hero-text { flex: 1 1 auto; }
  .hero-list { display: flex; flex-direction: column; gap: 8px; flex: 0 0 290px; align-self: center; background: rgba(15,14,23,.45); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 14px; backdrop-filter: blur(6px); }
  .hero-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 12px; padding: 6px; color: var(--ink); cursor: pointer; font: inherit; }
  .hero-item:hover { background: rgba(255,255,255,.06); }
  .hero-item.on { background: rgba(255,255,255,.1); box-shadow: inset 3px 0 0 var(--accent); }
  .hero-item .thumb { flex: 0 0 46px; height: 68px; border-radius: 8px; background-size: cover; background-position: center; }
  .hero-item .hi-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .hero-item b { font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-item small { color: var(--muted); font-size: 12px; }
}
/* Доод хэсэг, текст хуудсууд */
.footer { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-block: 32px 24px; font-size: 13px; border-top: 1px solid var(--line); margin-top: 40px; }
.footer a { color: var(--muted); } .footer a:hover { color: #fff; }
.prose { line-height: 1.65; } .prose h1 { font-size: 24px; } .prose h2 { font-size: 17px; margin-top: 12px; } .prose p, .prose ul { margin: 0; color: #D8D5E6; }

/* Давуу тал, алхам, түгээмэл асуулт */
.perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.perk { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 6px; border-top: 3px solid var(--accent); }
.perk b { font-family: var(--display); font-size: 15px; } .perk span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; counter-reset: st; }
.steps li { counter-increment: st; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.steps li::before { content: counter(st); width: 32px; height: 32px; border-radius: 10px; background: var(--gold); color: #1A1406; font: 900 16px var(--display); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.steps b { font-size: 15px; } .steps span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.faq { display: flex; flex-direction: column; gap: 8px; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 700; position: relative; min-height: 24px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--accent); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 18px 16px; color: #D8D5E6; line-height: 1.6; }
/* Киноны мэдээллийн шошго, дуртай товч */
.chips-sm { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-sm { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 8px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: #fff; }
.favform { margin: 0; } .favform .btn { width: 100%; } .btn.faved { color: var(--accent); border-color: var(--accent); }
/* Messenger чат товч */
.chatfab { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 25; width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, #00B2FF, #A033FF 60%, #FF5C87); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.chatfab:hover { color: #fff; transform: scale(1.05); }
@media (min-width: 760px) { .chatfab { bottom: 24px; } }
@media (min-width: 760px) { .chatfab { width: 58px; height: 58px; } }

/* Facebook, Instagram-ийн дотоод хөтөч дээр гарах санамж */
.iab { background: linear-gradient(90deg, #2A1530, #1E1A3A); border-bottom: 1px solid var(--line); }
.iab-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-block: 12px; font-size: 14px; line-height: 1.45; }
.iab-in > span:first-child { flex: 1 1 260px; min-width: 0; }
.iab-act { display: flex; align-items: center; gap: 8px; }
.iab-act .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
.iab-x { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 22px; cursor: pointer; }
.iab-ios { flex-basis: 100%; color: var(--muted); }

/* Төлбөрийн хуудасны заавар */
.paysteps { text-align: left; margin: 4px 0 8px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; color: #D8D5E6; font-size: 14px; line-height: 1.5; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; vertical-align: -1px; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Үргэлжлүүлж үзэх */
.player { position: relative; }
.resume-toast { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 10px; background: rgba(12,11,20,.88); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: 8px 8px 8px 14px; font-size: 14px; white-space: nowrap; backdrop-filter: blur(6px); }
.resume-toast button { min-height: 34px; padding: 0 12px; border-radius: 8px; border: 0; background: #fff; color: #111; font: 700 13px var(--body); cursor: pointer; }
.btn.resume { flex-wrap: wrap; position: relative; overflow: hidden; }
.btn .rbar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.25); }
.btn .rbar i { display: block; height: 100%; background: #fff; }

/* Дарахад амар (утсанд) */
.topbar .nav a { padding-block: 10px; }
.footer a { padding-block: 8px; display: inline-block; }
.dots button { position: relative; } .dots button::after { content: ""; position: absolute; inset: -10px -4px; }
