/**
 * main.css
 * -----------------------------------------------------------------------
 * Дизайны эх сурвалж: "Mongolia Pickleball Digital Federation Platform"
 * (Stitch дизайн систем — DESIGN.md). Tailwind-ийг CDN-ээр ачаалж байгаа
 * тул өнгө/фонт/бүрэлдэхүүн хэсгийн нэмэлт стилийг энд тодорхойлно.
 *
 * Брэндийн өнгийг өөрчлөх бол:
 *   1) Энэ файлын :root доторх --color-* утгуудыг шинэчил
 *   2) Тухайн бүх HTML файлын <head> дотор буй tailwind.config-ийн
 *      colors.navy / colors.lime / colors.emerald-ийг адилхан утгаар шинэчил
 *   3) js/config.js доторх BRAND object-ийг мөн адил шинэчил
 * -----------------------------------------------------------------------
 */

:root {
  /* Үндсэн брэнд өнгө — "Mongolian Royal Navy" / "Electric Court Lime" */
  --color-navy: #0B1E3D;
  --color-navy-dark: #071B3A;
  --color-navy-hover: #16325C;
  --color-lime: #D4E824;
  --color-lime-hover: #E0F33A;
  --color-emerald: #10B981;
  --color-danger: #EF4444;

  /* Гадаргуу / төвийг сахисан өнгө (Tailwind slate-тэй тааруулсан) */
  --color-ink: #0F172A;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F8FAFC;
  --color-surface-muted: #F1F5F9;
  --color-border: #E2E8F0;
  --color-border-hover: #CBD5E1;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  background-color: var(--color-surface-alt);
  color: var(--color-ink);
}

/* ---------- Material Symbols ---------- */
.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  line-height: 1;
  vertical-align: middle;
  user-select: none;
}
.icon-fill {
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

/* ---------- "Court lines" texture — dark hero/section backdrops ---------- */
.court-lines {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}
.court-lines-light {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ---------- Elevation (DESIGN.md-ийн "Depth Hierarchy") ---------- */
.shadow-level1 { box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.05); }
.shadow-level2 { box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05); }
.shadow-level3 { box-shadow: 0 20px 25px -5px rgba(11, 30, 61, 0.12), 0 8px 10px -6px rgba(11, 30, 61, 0.08); }

/* ---------- Touch feedback (гар утасны мэдрэмж) ---------- */
.touch-target,
button, a.btn, .card-clickable {
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, opacity 120ms ease, border-color 120ms ease;
}
.touch-target:active,
button:active, a.btn:active, .card-clickable:active {
  transform: scale(0.96);
}

/* ---------- Компонент: товч (DESIGN.md > Components > Buttons) ---------- */
.btn-primary {
  background-color: var(--color-navy);
  color: #fff;
  font-weight: 600;
}
.btn-primary:hover { background-color: var(--color-navy-hover); }

.btn-accent {
  background-color: var(--color-lime);
  color: var(--color-navy);
  font-weight: 700;
}
.btn-accent:hover { background-color: var(--color-lime-hover); }

.btn-outline {
  background-color: var(--color-surface);
  color: var(--color-ink);
  border: 1px solid var(--color-border);
}
.btn-outline:hover { background-color: var(--color-surface-muted); border-color: var(--color-border-hover); }

/* ---------- Input fields ---------- */
.field-input {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-hover);
  color: var(--color-ink);
  border-radius: 0.5rem;
}
.field-input::placeholder { color: #94A3B8; }
.field-input:focus {
  outline: none;
  border-color: var(--color-navy);
  box-shadow: 0 0 0 2px rgba(11, 30, 61, 0.15);
}

/* ---------- Card ---------- */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
}
.card-hover {
  transition: transform 120ms ease, box-shadow 150ms ease, border-color 150ms ease;
}
.card-hover:hover {
  border-color: var(--color-border-hover);
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
}
.card-hover:active {
  transform: scale(0.985);
}
@media (prefers-reduced-motion: reduce) {
  .card-hover:active { transform: none; }
}

/* ---------- Typography scale (DESIGN.md-ийн typography tokens) ---------- */
.text-title-athletic {
  font-size: 13px;
  font-weight: 800;
  line-height: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.text-stat-display {
  font-size: 48px;
  font-weight: 800;
  line-height: 52px;
  letter-spacing: -0.03em;
}
.text-stat-display-mobile {
  font-size: 32px;
  font-weight: 800;
  line-height: 38px;
  letter-spacing: -0.02em;
}
.text-label-sm {
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Skeleton loader ---------- */
.skeleton {
  position: relative;
  overflow: hidden;
  background-color: var(--color-surface-muted);
  border-radius: 0.5rem;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: skeleton-shimmer 1.4s infinite;
}
@keyframes skeleton-shimmer {
  100% { transform: translateX(100%); }
}

/* ---------- Fade / slide-in animations ---------- */
.fade-in {
  animation: fadeIn 320ms ease both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.stagger > * { animation: fadeIn 320ms ease both; }
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 40ms; }
.stagger > *:nth-child(3) { animation-delay: 80ms; }
.stagger > *:nth-child(4) { animation-delay: 120ms; }
.stagger > *:nth-child(5) { animation-delay: 160ms; }
.stagger > *:nth-child(6) { animation-delay: 200ms; }
.stagger > *:nth-child(n+7) { animation-delay: 240ms; }

/* ---------- Live pulse dot (LIVE badge) ---------- */
.pulse-dot {
  position: relative;
  display: inline-block;
  height: 8px;
  width: 8px;
  border-radius: 9999px;
  background-color: var(--color-lime);
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background-color: var(--color-lime);
  animation: pulse-ring 1.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ---------- Mobile bottom tab bar ---------- */
#bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
#bottom-nav a {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0.5rem 0;
  color: #94A3B8;
  font-size: 9px; /* 11px → 9px (гар утасны текстийн ерөнхий -2px, #bottom-nav аль хэдийн зөвхөн <1024px харагддаг) */
  font-weight: 600;
}

/* Header-ийн "Профайл" ICON товч (баруун дээд булан) — идэвхтэй/нээлттэй үед */
#profile-menu-btn[aria-expanded="true"] {
  color: var(--color-navy);
  background-color: rgba(11, 30, 61, 0.08);
}
#profile-menu-btn[aria-expanded="true"] .material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

/* Идэвхтэй tab дор хөдөлгөөнт highlight (native.js-ээс байрлуулна) */
.nav-pill {
  position: absolute;
  top: 0.375rem;
  height: calc(100% - 0.75rem);
  border-radius: 9999px;
  background-color: rgba(11, 30, 61, 0.07);
  transform: scale(0.85);
  opacity: 0;
  transition: left 260ms cubic-bezier(0.34, 1.56, 0.64, 1), width 260ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  z-index: 0;
}
.nav-pill-ready {
  opacity: 1;
  transform: scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .nav-pill { transition: opacity 120ms ease; }
}
#bottom-nav a.active { color: var(--color-navy); }
#bottom-nav a.active .material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}
.has-bottom-nav { padding-bottom: 4.25rem; }
@media (min-width: 1024px) {
  #bottom-nav { display: none; }
  .has-bottom-nav { padding-bottom: 0; }
}

/* ---------- Progress bar (registration fill) ---------- */
.progress-track {
  height: 6px;
  border-radius: 9999px;
  background-color: var(--color-surface-muted);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 9999px;
  background-color: var(--color-lime);
}

/* ---------- Rank badges ---------- */
.rank-badge-1 { background: linear-gradient(135deg,#FDE68A,#D4E824); color:#0B1E3D; }
.rank-badge-2 { background: linear-gradient(135deg,#E5E7EB,#9CA3AF); color:#0F172A; }
.rank-badge-3 { background: linear-gradient(135deg,#FBCFE8,#e4b28c); color:#7C2D12; }

/* ---------- Toast ---------- */
#toast-container {
  position: fixed;
  bottom: 5.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: calc(100% - 2rem);
  max-width: 26rem;
}
@media (min-width: 1024px) {
  #toast-container { bottom: 1rem; }
}
.toast {
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: white;
  font-size: 0.875rem;
  box-shadow: 0 8px 24px rgba(11,30,61,0.25);
  animation: fadeIn 220ms ease both;
}
.toast-success { background-color: var(--color-emerald); }
.toast-error { background-color: var(--color-danger); }
.toast-info { background-color: var(--color-navy); }

/* ---------- Social share ---------- */
.share-btn {
  height: 2rem;
  width: 2rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: var(--color-surface-muted);
  color: #64748B;
  border: 1px solid transparent;
}
.share-btn:hover {
  background-color: var(--color-surface);
  border-color: var(--color-border-hover);
  color: var(--color-navy);
}
.share-btn .material-symbols-outlined {
  font-size: 17px;
}
.share-btn-light {
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.share-btn-light:hover {
  background-color: rgba(255, 255, 255, 0.22);
  border-color: transparent;
  color: var(--color-lime);
}

.share-menu {
  z-index: 10000;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.625rem;
  box-shadow: 0 12px 28px rgba(11, 30, 61, 0.2);
  min-width: 190px;
  padding: 0.375rem;
  display: flex;
  flex-direction: column;
  animation: fadeIn 150ms ease both;
}
.share-menu a,
.share-menu button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-ink);
  text-align: left;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
}
.share-menu a:hover,
.share-menu button:hover {
  background-color: var(--color-surface-muted);
}
.share-menu .material-symbols-outlined {
  font-size: 18px;
  color: #64748B;
}

.share-highlight {
  outline: 2px solid var(--color-lime);
  outline-offset: 3px;
  border-radius: 0.5rem;
}

/* ---------- Pull-to-refresh ---------- */
.ptr-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, -100%);
  z-index: 60;
  height: 2.25rem;
  width: 2.25rem;
  border-radius: 9999px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 12px rgba(11, 30, 61, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
}
.ptr-indicator .material-symbols-outlined {
  font-size: 18px;
  transition: transform 200ms ease;
}
.ptr-indicator.ptr-ready {
  color: var(--color-navy);
}
.ptr-indicator.ptr-ready .material-symbols-outlined {
  transform: rotate(180deg);
}
.ptr-indicator.ptr-spinning .material-symbols-outlined {
  animation: ptr-spin 700ms linear infinite;
}
@keyframes ptr-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .ptr-indicator.ptr-spinning .material-symbols-outlined { animation: none; }
}

/* ---------- Хуудас хоорондын шилжилт (Chrome/Edge дэмждэг үед автоматаар
   идэвхжинэ, бусад browser-т аюулгүйгээр алгасагдана) ---------- */
@view-transition {
  navigation: auto;
}

/* ---------- Utility ---------- */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* -----------------------------------------------------------------------
 * ГАР УТАСНЫ ЗАГВАРТ БҮХ ТЕКСТИЙН ХЭМЖЭЭГ 2px-ЭЭР БАГАСГАХ (v3.11)
 * -----------------------------------------------------------------------
 * Зөвхөн `<1024px` (сайтын бусад хэсэгт хэрэглэдэг `lg` breakpoint-тэй
 * ижил) дэлгэцэд Tailwind-ийн стандарт font-size үнэлгээ бүрийг яг 2px-ээр
 * багасгана; tablet/desktop (>=1024px) дээр хэвээрээ өөрчлөгдөөгүй.
 *
 * Яагаад `!important`: Tailwind-г CDN (JIT, runtime) байдлаар ачаалж
 * байгаа тул түүний өөрийн үүсгэсэн .text-* class-уудын шинжлэлийг
 * (`<style>` tag аль хэдийн head-д орсон эсэх, DOM дахь байрлал) урьдчилан
 * баталгаатай мэдэх боломжгүй. `!important` ашигласнаар cascade дараалал
 * (specificity/source order)-аас үл хамааран энэ дүрэм үргэлж давамгайлж,
 * харагдацын алдаанаас найдвартай сэргийлнэ.
 *
 * Тэмдэглэл: 10px/11px мэт хэдийнээ маш жижиг badge/шошгон текстүүдийг
 * (`text-[10px]`, `text-[11px]`) цаашид багасгаагүй — 8-9px хэмжээ бодит
 * гар утсан дээр уншигдахад хэцүү болохоос сэргийлсэн.
 * ----------------------------------------------------------------------- */
@media (max-width: 1023.98px) {
  .text-xs   { font-size: 0.625rem !important; }  /* 12px → 10px */
  .text-sm   { font-size: 0.75rem  !important; }  /* 14px → 12px */
  .text-base { font-size: 0.875rem !important; }  /* 16px → 14px */
  .text-lg   { font-size: 1rem     !important; }  /* 18px → 16px */
  .text-xl   { font-size: 1.125rem !important; }  /* 20px → 18px */
  .text-2xl  { font-size: 1.375rem !important; }  /* 24px → 22px */
  .text-3xl  { font-size: 1.75rem  !important; }  /* 30px → 28px */
  .text-4xl  { font-size: 2.125rem !important; }  /* 36px → 34px */
  .text-5xl  { font-size: 2.875rem !important; }  /* 48px → 46px */
  .text-6xl  { font-size: 3.625rem !important; }  /* 60px → 58px */
  .text-7xl  { font-size: 4.375rem !important; }  /* 72px → 70px */

  /* Сайтын өөрийн custom typography token-ууд (DESIGN.md) */
  .text-title-athletic       { font-size: 11px !important; } /* 13px → 11px */
  .text-stat-display-mobile  { font-size: 30px !important; } /* 32px → 30px */
  .text-label-sm             { font-size: 9px  !important; } /* 11px → 9px */

  /* Бусад бэлэн текст компонент (toast, share цэс) */
  .toast                      { font-size: 0.75rem   !important; } /* 14px → 12px */
  .share-menu a,
  .share-menu button           { font-size: 0.6875rem !important; } /* 13px → 11px */
}

/* -----------------------------------------------------------------------
 * ХҮСНЭГТИЙН (table) ДОТОРХ ТЕКСТИЙН ХЭМЖЭЭ — бүх дэлгэцийн хэмжээнд -2px
 * -----------------------------------------------------------------------
 * Дээрх @media блок зөвхөн 1024px-ээс доош (гар утас/таблет) үйлчилдэг.
 * Энэ блок нь эсрэгээрээ бүх breakpoint дээр (гар утас, таблет, desktop)
 * адилхан үйлчилж, зөвхөн <table> элемент дотор орших текстийг жигд
 * 2px-ээр багасгана (admin-federation.html, athletes.html, ranking.html
 * дахь хүснэгтүүд). Тусад нь бичсэн шалтгаан: дээрхээс ялгаатай нөхцөлтэй
 * (media query байхгүй тул хамрах хүрээ өөр) — хольж холбоход эрсдэлтэй.
 * Tailwind CDN/JIT нь өөрийн <style> tag-г ажиллах үед л оруулдаг тул
 * cascade дараалал баталгаагүй — иймд энд ч мөн `!important` ашиглав.
 * ----------------------------------------------------------------------- */
table.text-sm,
table .text-sm { font-size: 0.75rem  !important; } /* 14px → 12px */
table .text-xs { font-size: 0.625rem !important; } /* 12px → 10px */

/* -----------------------------------------------------------------------
 * ГИШҮҮНИЙ НЭВТРЭХ ТӨЛӨВ (v3.21) — нийтийн хуудсуудын header-ийн "Элсэх"
 * товчийг (Гишүүн session-тэй үед) Tailwind-ийн responsive `hidden`/
 * `sm:inline-flex` cascade-аас үл хамааран баталгаатай нуухын тулд.
 * Tailwind CDN/JIT-ийн <style> tag-ийн cascade дараалал баталгаагүй тул
 * (дээрх хэсгүүдийн адил шалтгаанаар) `!important` ашиглав.
 * ----------------------------------------------------------------------- */
.force-hidden { display: none !important; }

/* =====================================================================
   v3.28 — Ивээн тэтгэгч & хамтрагчдын лого (js/sponsors.js)
   Footer-ийн дээр, бүх нийтийн хуудсанд. Tailwind-аас хамааралгүй.
   ===================================================================== */
.sp-section {
  position: relative;
  background:
    radial-gradient(1200px 300px at 50% 0%, rgba(212, 232, 36, 0.10), transparent 70%),
    var(--color-surface);
  border-top: 1px solid var(--color-border);
  overflow: hidden;
}
.sp-section.hidden { display: none; }
.sp-section *, .sp-section *::before, .sp-section *::after { box-sizing: border-box; }
.sp-section h2 { margin: 0; }
.sp-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.75rem 0 2.5rem;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(.2, .8, .2, 1);
}
.sp-section.sp-visible .sp-inner { opacity: 1; transform: none; }

.sp-head { text-align: center; padding: 0 1rem; margin-bottom: 1.75rem; }
.sp-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-navy);
  background: rgba(212, 232, 36, 0.35);
  padding: .3rem .7rem;
  border-radius: 999px;
}
.sp-title {
  margin-top: .6rem;
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: -0.01em;
}

.sp-group + .sp-group { margin-top: 1.5rem; }
.sp-group-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  margin-bottom: .75rem;
  padding: 0 1rem;
}
.sp-group-label .material-symbols-outlined { font-size: 18px; color: var(--color-emerald); }

/* --- Төгсгөлгүй гүйдэг мөр --- */
.sp-marquee {
  position: relative;
  overflow: hidden;
  padding: .75rem 0 1.75rem; /* доод зай — hover үеийн нэрийн шошгонд */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.sp-track {
  display: flex;
  width: max-content;
  gap: 1rem;
  animation: sp-scroll var(--sp-duration, 40s) linear infinite;
  will-change: transform;
}
.sp-marquee[data-direction="right"] .sp-track { animation-direction: reverse; }
.sp-marquee:hover .sp-track,
.sp-marquee:focus-within .sp-track { animation-play-state: paused; }
@keyframes sp-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - .5rem)); } /* хагас + gap-ийн хагас = тасралтгүй давталт */
}

/* --- Хөдөлгөөнгүй (reduced motion) тор --- */
.sp-static {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: .75rem 1rem 1.75rem;
}

/* --- Лого карт --- */
.sp-card {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 168px;
  height: 84px;
  padding: .9rem 1.1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: .75rem;
  text-decoration: none;
  transition: transform 320ms cubic-bezier(.2, .8, .2, 1), box-shadow 320ms ease, border-color 320ms ease;
}
.sp-card::after { /* доор гүйх lime зураас */
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: -1px;
  height: 3px;
  border-radius: 3px;
  background: var(--color-lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 380ms cubic-bezier(.2, .8, .2, 1);
}
.sp-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.sp-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .62;
  transition: filter 360ms ease, opacity 360ms ease, transform 360ms cubic-bezier(.2, .8, .2, 1);
}
.sp-fallback {
  font-size: 13px;
  font-weight: 800;
  color: #64748B;
  text-align: center;
  line-height: 1.2;
  transition: color 300ms ease;
}
.sp-name { /* hover үед доороос гарах нэрийн шошго */
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translate(-50%, -4px);
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-surface);
  background: var(--color-navy);
  padding: .2rem .55rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease, transform 250ms ease;
}

.sp-card:hover,
.sp-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(212, 232, 36, 0.9);
  box-shadow: 0 14px 28px -12px rgba(11, 30, 61, 0.35), 0 0 0 4px rgba(212, 232, 36, 0.18);
  outline: none;
}
.sp-card:hover::after,
.sp-card:focus-visible::after { transform: scaleX(1); }
.sp-card:hover .sp-logo img,
.sp-card:focus-visible .sp-logo img { filter: grayscale(0); opacity: 1; transform: scale(1.06); }
.sp-card:hover .sp-fallback,
.sp-card:focus-visible .sp-fallback { color: var(--color-navy); }
.sp-card:hover .sp-name,
.sp-card:focus-visible .sp-name { opacity: 1; transform: translate(-50%, 0); }
.sp-card:active { transform: translateY(-2px) scale(.98); }

/* Touch төхөөрөмж: hover байхгүй тул лого өнгөтэйгөөр харагдана */
@media (hover: none) {
  .sp-logo img { filter: none; opacity: .95; }
}

@media (max-width: 639.98px) {
  .sp-inner { padding: 2rem 0 1.75rem; }
  .sp-title { font-size: 1.2rem; }
  .sp-card { width: 132px; height: 66px; padding: .65rem .8rem; border-radius: .6rem; }
  .sp-track, .sp-static { gap: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sp-inner { opacity: 1; transform: none; transition: none; }
  .sp-track { animation: none; }
  .sp-card, .sp-card::after, .sp-logo img, .sp-name { transition: none; }
}

/* =====================================================================
   v3.29 — "Холбооны тухай" (about.html): социал slot, удирдлагын карт
   ===================================================================== */
.social-slot {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .9rem .55rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-navy);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background-color 220ms ease;
}
.social-slot-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--color-navy);
  color: var(--color-lime);
}
a.social-slot:hover, a.social-slot:focus-visible {
  transform: translateY(-2px);
  border-color: var(--color-lime);
  box-shadow: 0 8px 18px -10px rgba(11, 30, 61, .45);
  outline: none;
}
.social-slot-soon { color: #94A3B8; cursor: default; border-style: dashed; background: var(--color-surface-alt); }
.social-slot-soon .social-slot-icon { background: #E2E8F0; color: #94A3B8; }
.social-slot-soon em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #94A3B8;
  background: #F1F5F9;
  padding: .1rem .4rem;
  border-radius: 999px;
}

/* Удирдах зөвлөлийн гишүүний карт — зураг байхгүй үед mock дүрс */
.board-card { transition: transform 260ms cubic-bezier(.2,.8,.2,1), box-shadow 260ms ease, border-color 260ms ease; }
.board-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -18px rgba(11,30,61,.45); border-color: rgba(212,232,36,.8); }
.board-avatar {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  border-radius: 10%;
  background: linear-gradient(145deg, #16325C 0%, #0B1E3D 70%);
  color: var(--color-lime);
}
.board-avatar img { width: 100%; height: 100%; object-fit: cover; }
.board-avatar .board-silhouette { /* mock дүрс — толгой + мөр */
  position: absolute;
  inset: auto 0 -6% 0;
  margin: 0 auto;
  width: 78%;
  height: 78%;
  color: rgba(255, 255, 255, .08);
}
.board-avatar .board-initials {
  position: relative;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1;
}
.board-avatar .board-photo-soon {
  position: absolute;
  right: 6%;
  bottom: 6%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .55);
}
.board-avatar .board-photo-soon .material-symbols-outlined { font-size: 14px; }

/* v3.30 — Түр (mock) спонсорын лого */
.sp-card.sp-mock { border-style: dashed; }
.sp-card.sp-mock .sp-name { background: var(--color-emerald); }

/* =====================================================================
   v3.30 — Гар утасны carousel (js/carousel.js, [data-m-carousel])
   Зөвхөн <640px-д; томоохон дэлгэцэнд анхны grid хэвээр.
   ===================================================================== */
.mc-nav { display: none; }
@media (max-width: 639.98px) {
  [data-m-carousel] {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: .75rem !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1rem;
    /* Дэлгэцийн ирмэг хүртэл сунгаж, дараагийн карт "шагайж" харагдана */
    margin-inline: -1rem;
    padding: .25rem 1rem .5rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  [data-m-carousel]::-webkit-scrollbar { display: none; }
  [data-m-carousel] > * {
    flex: 0 0 var(--mc-item, 84%);
    max-width: var(--mc-item, 84%);
    min-width: 0;
    scroll-snap-align: start;
    margin: 0 !important;
  }
  /* Ганц карт (жиш нь хоосон төлөв) бол бүтэн өргөнөөр */
  [data-m-carousel] > :only-child { flex-basis: 100%; max-width: 100%; }

  .mc-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    margin-top: .5rem;
    min-height: 1.5rem;
  }
  .mc-nav[hidden] { display: none; }
  .mc-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #CBD5E1;
    transition: width 250ms ease, background-color 250ms ease;
  }
  .mc-dot.is-active { width: 20px; background: var(--color-navy); }
  .mc-count { font-size: 12px; font-weight: 600; color: #64748B; min-width: 3.5rem; text-align: center; }
  .mc-count b { color: var(--color-navy); }
  .mc-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-navy);
  }
  .mc-arrow .material-symbols-outlined { font-size: 18px; }
  /* Бараан (navy) дэвсгэртэй хэсэгт */
  .mc-on-dark + .mc-nav .mc-dot { background: rgba(255, 255, 255, .25); }
  .mc-on-dark + .mc-nav .mc-dot.is-active { background: var(--color-lime); }
}

/* v3.31 — "Жишээ мэдээлэл" мэдэгдэл (js/demo-data.js) */
.demo-notice {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: .5rem;
  padding: .55rem 1rem;
  background: #FEF3C7;
  border-bottom: 1px solid #FDE68A;
  color: #92400E;
  font-size: 12.5px;
  line-height: 1.4;
  text-align: left;
}
.demo-notice .material-symbols-outlined { font-size: 18px; flex-shrink: 0; }
.demo-notice b { font-weight: 700; }
.demo-notice-short { display: none; }
@media (max-width: 639.98px) {
  .demo-notice { align-items: center; padding: .45rem 1rem; }
  .demo-notice-long { display: none; }
  .demo-notice-short { display: inline; }
}

/* =====================================================================
   v3.33 — Сегмент товч (Тамирчид, Чансаа хоёуланд)
   ===================================================================== */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: .6rem; background: var(--color-surface-muted); border: 1px solid var(--color-border); }
.seg-btn { display: inline-flex; align-items: center; justify-content: center; gap: .25rem; min-height: 32px; padding: .3rem .75rem; border-radius: .45rem; font-size: 12.5px; font-weight: 600; color: #64748B; transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease; }
.seg-btn:hover { color: var(--color-navy); }
.seg-btn.is-active { background: var(--color-surface); color: var(--color-navy); box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
.seg-dark { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
.seg-dark .seg-btn { color: #94A3B8; }
.seg-dark .seg-btn:hover { color: #fff; }
.seg-dark .seg-btn.is-active { background: var(--color-lime); color: var(--color-navy); box-shadow: none; }

/* =====================================================================
   v3.33 — "Тамирчид": профайл картын лавлах (цайвар, хүнд төвлөрсөн)
   ===================================================================== */
.ath-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .3rem;
  width: 100%;
  padding: 1.1rem .75rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: .9rem;
  transition: transform 260ms cubic-bezier(.2,.8,.2,1), box-shadow 260ms ease, border-color 260ms ease;
}
.ath-card:hover, .ath-card:focus-visible { transform: translateY(-4px); border-color: rgba(11, 30, 61, .25); box-shadow: 0 16px 30px -18px rgba(11, 30, 61, .45); outline: none; }
.ath-card:active { transform: scale(.98); }
.ath-avatar { display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 10%; font-weight: 800; flex-shrink: 0; }
.ath-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ath-avatar-lg { width: 76px; height: 76px; font-size: 1.5rem; margin-bottom: .35rem; }
.ath-rank { position: absolute; top: .6rem; left: .6rem; font-size: 10.5px; font-weight: 700; color: #64748B; background: var(--color-surface-muted); padding: .1rem .45rem; border-radius: 999px; }
.ath-gender { position: absolute; top: .55rem; right: .55rem; width: 22px; height: 22px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.ath-gender .material-symbols-outlined { font-size: 15px; }
.ath-gender-male { background: #DBEAFE; color: #1D4ED8; }
.ath-gender-female { background: #FCE7F3; color: #BE185D; }
.ath-name { font-weight: 700; color: var(--color-ink); font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ath-club { display: inline-flex; align-items: center; gap: .2rem; font-size: 12px; color: #64748B; max-width: 100%; }
.ath-club .material-symbols-outlined { font-size: 14px; }
.ath-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem; margin-top: .3rem; }
.ath-chip { font-size: 10.5px; font-weight: 600; color: var(--color-navy); background: rgba(11, 30, 61, .06); padding: .15rem .5rem; border-radius: 999px; }
@media (max-width: 639.98px) {
  .ath-card { padding: .95rem .6rem .85rem; }
  .ath-avatar-lg { width: 60px; height: 60px; font-size: 1.2rem; }
  .ath-name { font-size: 13px; }
}

/* =====================================================================
   v3.33 — "Чансаа": бараан онооны самбар
   ===================================================================== */
.sb-zone { background: var(--color-navy); color: #fff; }
.sb-zone-2 { background: var(--color-navy-dark); border-top: 1px solid rgba(255,255,255,.06); }
.skeleton-dark { background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.12), rgba(255,255,255,.05)); background-size: 200% 100%; animation: sb-shimmer 1.4s infinite; min-height: 64px; border-radius: .6rem; }
.sb-stat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; padding: .8rem .5rem; border-radius: .75rem; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); text-align: center; }
.sb-stat b { font-size: 1.35rem; font-weight: 800; color: var(--color-lime); line-height: 1.1; }
.sb-stat span { font-size: 11px; color: #94A3B8; line-height: 1.2; }

.sb-tabs { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.sb-tabs::-webkit-scrollbar { display: none; }
.sb-tab { flex-shrink: 0; padding: .45rem .95rem; border-radius: 999px; font-size: 13px; font-weight: 700; color: #CBD5E1; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); transition: all 180ms ease; }
.sb-tab:hover { color: #fff; border-color: rgba(255,255,255,.3); }
.sb-tab.is-active { background: var(--color-lime); border-color: var(--color-lime); color: var(--color-navy); }
.sb-input { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: .55rem; color: #fff; }
.sb-input::placeholder { color: #94A3B8; }
.sb-input:focus { outline: none; border-color: var(--color-lime); }

/* Подиум: алт / мөнгө / хүрэл */
.podium { --medal: #D97706; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; padding: 1.25rem 1rem 0; border-radius: 1rem 1rem .6rem .6rem; background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.12); overflow: hidden; transition: transform 260ms cubic-bezier(.2,.8,.2,1), border-color 260ms ease; }
.podium:hover { transform: translateY(-4px); border-color: var(--medal); }
.podium-gold { --medal: #F5C542; background: linear-gradient(180deg, rgba(245,197,66,.18), rgba(255,255,255,.03)); border-color: rgba(245,197,66,.45); }
.podium-silver { --medal: #CBD5E1; }
.podium-bronze { --medal: #D08B5B; }
.podium-medal { display: inline-flex; align-items: center; gap: .2rem; font-weight: 800; font-size: 13px; color: var(--color-navy); background: var(--medal); padding: .15rem .6rem .15rem .4rem; border-radius: 999px; margin-bottom: .5rem; }
.podium-medal .material-symbols-outlined { font-size: 16px; }
.podium-name { font-weight: 800; font-size: 15px; color: #fff; line-height: 1.25; margin-top: .4rem; }
.podium-club { font-size: 12px; color: #94A3B8; }
.podium-points { font-size: 1.9rem; font-weight: 800; color: var(--color-lime); line-height: 1.05; margin-top: .35rem; }
.podium-points small { display: block; font-size: 11px; font-weight: 600; color: #94A3B8; }
.podium-meta { font-size: 11.5px; color: #CBD5E1; margin-top: .2rem; }
.podium-step { display: flex; align-items: center; justify-content: center; align-self: stretch; margin: .9rem -1rem 0; height: 44px; font-size: 1.6rem; font-weight: 800; color: var(--color-navy); background: var(--medal); opacity: .92; }
@media (min-width: 640px) {
  .podium-gold .podium-step { height: 88px; }
  .podium-silver .podium-step { height: 60px; }
  .podium-bronze .podium-step { height: 40px; }
  .podium-gold .podium-points { font-size: 2.4rem; }
}
.sb-avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 10%; overflow: hidden; background: rgba(255,255,255,.1); color: var(--color-lime); font-weight: 800; font-size: 13px; }
.sb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sb-avatar-lg { width: 60px; height: 60px; font-size: 1.15rem; box-shadow: 0 0 0 3px var(--medal); }
.sb-avatar-xl { width: 78px; height: 78px; font-size: 1.5rem; box-shadow: 0 0 0 3px var(--medal); }

/* Онооны самбарын мөр */
.sb-head, .sb-row { display: grid; grid-template-columns: 3rem minmax(0, 1fr) 11rem 6.5rem; align-items: center; gap: .75rem; }
.sb-head { padding: 0 1rem .4rem; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #64748B; }
.sb-row { padding: .65rem 1rem; border-radius: .7rem; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); text-decoration: none; transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease; }
.sb-row:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.sb-row.is-me { border-color: var(--color-lime); background: rgba(212,232,36,.1); }
.sb-row.is-match, .podium.is-match { animation: sb-flash 1.6s ease 1; }
@keyframes sb-flash { 0%, 100% { box-shadow: 0 0 0 0 rgba(212,232,36,0); } 30% { box-shadow: 0 0 0 4px rgba(212,232,36,.6); } }
.sb-rank { font-size: 1.15rem; font-weight: 800; color: #fff; text-align: center; font-variant-numeric: tabular-nums; }
.sb-who { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.sb-name { display: block; font-weight: 700; color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-name em { font-style: normal; font-size: 10px; font-weight: 800; color: var(--color-navy); background: var(--color-lime); padding: .05rem .4rem; border-radius: 999px; vertical-align: middle; }
.sb-sub { display: block; font-size: 11.5px; color: #94A3B8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-col-win { display: flex; flex-direction: column; gap: .3rem; }
.sb-bar { display: block; height: 5px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.sb-bar span { display: block; height: 100%; border-radius: 999px; background: var(--color-emerald); }
.sb-win { font-size: 11px; color: #CBD5E1; }
.sb-pts { text-align: right; font-size: 1.15rem; font-weight: 800; color: var(--color-lime); font-variant-numeric: tabular-nums; line-height: 1.1; }
.sb-pts small { display: block; font-size: 10.5px; font-weight: 600; color: #94A3B8; }
.sb-empty { padding: 2.5rem 1rem; text-align: center; color: #94A3B8; font-size: 14px; border: 1px dashed rgba(255,255,255,.15); border-radius: .8rem; }
.sb-more { display: inline-flex; align-items: center; gap: .35rem; padding: .7rem 1.4rem; border-radius: .6rem; font-weight: 700; font-size: 14px; color: var(--color-navy); background: var(--color-lime); }
.sb-soon { display: inline-flex; align-items: center; gap: .25rem; font-size: 11px; font-weight: 600; color: #94A3B8; border: 1px dashed rgba(255,255,255,.2); padding: .2rem .55rem; border-radius: 999px; }
.sb-soon .material-symbols-outlined { font-size: 14px; }
@media (max-width: 639.98px) {
  .sb-head { display: none; }
  .sb-row { grid-template-columns: 2.1rem minmax(0, 1fr) auto; gap: .55rem; padding: .6rem .7rem; }
  .sb-col-win { display: none; }
  .sb-rank { font-size: 1rem; }
  .sb-avatar { width: 34px; height: 34px; }
  .sb-pts { font-size: 1.05rem; }
  .sb-soon { display: none; }
}

/* "Миний байр" наалттай мөр */
.my-rank-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 1rem; z-index: 35; display: flex; align-items: center; gap: .75rem; width: min(92vw, 30rem); padding: .6rem .9rem; border-radius: .9rem; background: var(--color-lime); color: var(--color-navy); box-shadow: 0 14px 30px -10px rgba(7, 27, 58, .55); }
.my-rank-bar[disabled] { background: #E2E8F0; color: #475569; }
.my-rank-bar b { font-size: 13px; }
.my-rank-num { font-size: 1.35rem; font-weight: 800; min-width: 2.6rem; }
@media (max-width: 1023.98px) { .my-rank-bar { bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px)); } }
@keyframes sb-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton-dark, .sb-row.is-match, .podium.is-match { animation: none; } }

/* =====================================================================
   v3.34 — ЗУРАГ ЗАСВАРЛАГЧ (js/photo-editor.js) + PhotoField виджет
   ===================================================================== */
html.pe-lock, html.pe-lock body { overflow: hidden; }
.pe { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; }
.pe.hidden, .pe .hidden, .pf .hidden { display: none !important; }
.pe-backdrop { position: absolute; inset: 0; background: rgba(4, 12, 26, .72); backdrop-filter: blur(4px); }
.pe-sheet {
  --pe-stage-h: 52vh;
  position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; height: 100dvh;
  background: #0A1830; color: #E2E8F0; overflow: hidden;
}
@media (min-width: 640px) {
  .pe-sheet { width: min(96vw, 1000px); height: min(92vh, 780px); border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); }
}
.pe-head { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; padding-top: calc(.55rem + env(safe-area-inset-top, 0px)); border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }
.pe-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.pe-title b { color: #fff; font-size: 15px; }
.pe-title span { font-size: 11.5px; color: var(--color-lime); font-weight: 600; letter-spacing: .02em; }
.pe-iconbtn { width: 42px; height: 42px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #CBD5E1; }
.pe-iconbtn:hover { background: rgba(255,255,255,.08); color: #fff; }
.pe-done { display: inline-flex; align-items: center; gap: .3rem; height: 40px; padding: 0 1rem; border-radius: 10px; background: var(--color-lime); color: var(--color-navy); font-weight: 800; font-size: 14px; }
.pe-done:hover { background: var(--color-lime-hover); }
.pe-body { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.pe-step { display: none; }
.pe-step.is-active { display: flex; }

/* ---- source ---- */
.pe-step[data-step="source"] { flex-direction: column; align-items: center; gap: 1.25rem; padding: 1.25rem 1rem 2rem; }
.pe-src-demo { width: min(64vw, 250px); }
.pe-frame-demo { border-radius: 14px; }
.pe-src-side { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: .9rem; }
.pe-src-hint { font-size: 14px; color: #fff; font-weight: 600; text-align: center; }
.pe-tips { display: flex; flex-direction: column; gap: .4rem; font-size: 13px; color: #CBD5E1; }
.pe-tips li { display: flex; align-items: center; gap: .45rem; }
.pe-tips .material-symbols-outlined { font-size: 18px; color: var(--color-emerald); }
.pe-src-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .25rem; }
.pe-bigbtn { display: flex; align-items: center; gap: .6rem; padding: .85rem .9rem; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: #fff; text-align: left; }
.pe-bigbtn:hover { background: rgba(255,255,255,.12); }
.pe-bigbtn .material-symbols-outlined { font-size: 26px; }
.pe-bigbtn span { display: flex; flex-direction: column; line-height: 1.2; }
.pe-bigbtn b { font-size: 14px; }
.pe-bigbtn small { font-size: 11.5px; color: #94A3B8; }
.pe-bigbtn-accent { background: var(--color-lime); color: var(--color-navy); border-color: transparent; }
.pe-bigbtn-accent:hover { background: var(--color-lime-hover); }
.pe-bigbtn-accent small { color: rgba(11,30,61,.7); }
@media (min-width: 768px) {
  .pe-step[data-step="source"] { flex-direction: row; justify-content: center; gap: 2.5rem; padding: 2rem; min-height: 100%; }
  .pe-src-demo { width: 280px; }
  .pe-src-hint { text-align: left; }
}

/* ---- frame (камер, засвар, жишээ) ---- */
.pe-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: .75rem; width: 100%; }
.pe-frame {
  position: relative; overflow: hidden; border-radius: 14px; background: #000;
  aspect-ratio: var(--pe-aspect, 1); width: min(100%, calc(var(--pe-stage-h) * var(--pe-aspect, 1)), 560px);
}
.pe-frame-demo { width: 100%; }
.pe-frame video, .pe-frame canvas, .pe-demo-sil { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pe-frame video { object-fit: cover; }
.pe-frame video.is-mirror { transform: scaleX(-1); }
.pe-frame-edit { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.pe-frame-edit.is-dragging { cursor: grabbing; }
.pe-stage-hint { display: inline-flex; align-items: center; gap: .3rem; font-size: 11.5px; color: #94A3B8; }

.pe-guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 0 1.5px rgba(0,0,0,.55)); }
.pe-guide * { vector-effect: non-scaling-stroke; fill: none; }
.pe-guide .pe-g-dim { fill: rgba(6, 14, 28, .42); stroke: none; }
.pe-guide .pe-g-circle { stroke: rgba(255,255,255,.55); stroke-width: 1.5; }
.pe-guide .pe-g-face { stroke: #fff; stroke-width: 2.2; stroke-dasharray: 9 6; }
.pe-guide .pe-g-eye { stroke: var(--color-lime); stroke-width: 1.6; stroke-dasharray: 5 5; }
.pe-guide .pe-g-top { stroke: var(--color-lime); stroke-width: 1.6; stroke-dasharray: 3 5; }
.pe-guide .pe-g-body { stroke: rgba(255,255,255,.85); stroke-width: 1.8; stroke-dasharray: 9 6; }
.pe-guide .pe-g-thirds line { stroke: rgba(255,255,255,.2); stroke-width: 1; }
.pe-guide .pe-g-corner { stroke: var(--color-lime); stroke-width: 3; stroke-linecap: round; }
.pe-frame-edit.is-dragging .pe-guide .pe-g-thirds line { stroke: rgba(255,255,255,.42); }

/* ---- camera ---- */
.pe-step[data-step="camera"] { flex-direction: column; align-items: center; padding-bottom: 1rem; }
.pe-sheet[data-step="camera"] { --pe-stage-h: calc(100vh - 270px); --pe-stage-h: calc(100dvh - 270px); }
@media (min-width: 640px) { .pe-sheet[data-step="camera"] { --pe-stage-h: calc(min(92vh, 780px) - 250px); } }
.pe-cam-hint { font-size: 13px; color: #E2E8F0; text-align: center; max-width: 30rem; padding: 0 1rem; }
.pe-cam-bar { display: flex; align-items: center; justify-content: center; gap: 2rem; margin-top: .9rem; }
.pe-roundbtn { width: 58px; height: 58px; border-radius: 999px; background: rgba(255,255,255,.08); color: #fff; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.pe-roundbtn small { font-size: 10px; color: #CBD5E1; }
.pe-roundbtn.is-on { background: var(--color-lime); color: var(--color-navy); }
.pe-roundbtn.is-on small { color: var(--color-navy); }
.pe-roundbtn.is-disabled { opacity: .35; }
.pe-shutter { width: 76px; height: 76px; border-radius: 999px; border: 4px solid #fff; display: inline-flex; align-items: center; justify-content: center; }
.pe-shutter span { width: 58px; height: 58px; border-radius: 999px; background: #fff; transition: transform .12s; }
.pe-shutter:active span { transform: scale(.88); }
.pe-shutter:disabled { opacity: .4; }
.pe-cam-alt { margin-top: .6rem; }
.pe-linkbtn { display: inline-flex; align-items: center; gap: .3rem; font-size: 13px; color: #94A3B8; padding: .4rem .6rem; }
.pe-linkbtn:hover { color: #fff; }
.pe-linkbtn .material-symbols-outlined { font-size: 18px; }
.pe-cam-msg { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; padding: 1.2rem; text-align: center; background: rgba(6,14,28,.88); font-size: 13px; color: #CBD5E1; }
.pe-cam-msg b { color: #fff; display: block; margin-bottom: .3rem; font-size: 14px; }
.pe-countdown { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 6rem; font-weight: 800; color: #fff; text-shadow: 0 4px 24px rgba(0,0,0,.5); }
.pe-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.pe-flash.is-on { animation: pe-flash .35s ease-out; }
@keyframes pe-flash { from { opacity: .85; } to { opacity: 0; } }

/* ---- edit ---- */
.pe-step[data-step="edit"] { flex-direction: column; }
.pe-sheet[data-step="edit"] { --pe-stage-h: 46vh; --pe-stage-h: 46dvh; }
.pe-controls { padding: 0 .9rem 1.4rem; display: flex; flex-direction: column; gap: .8rem; }
@media (min-width: 768px) {
  .pe-step[data-step="edit"] { flex-direction: row; height: 100%; }
  .pe-step[data-step="edit"] .pe-stage { flex: 1; min-width: 0; }
  .pe-sheet[data-step="edit"] { --pe-stage-h: calc(min(92vh, 780px) - 120px); }
  .pe-controls { width: 350px; flex-shrink: 0; border-left: 1px solid rgba(255,255,255,.08); padding: 1rem; overflow-y: auto; }
}
.pe-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: rgba(255,255,255,.06); border-radius: 12px; position: sticky; top: 0; z-index: 1; }
.pe-tab { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; padding: .55rem .3rem; border-radius: 9px; font-size: 13px; font-weight: 700; color: #94A3B8; }
.pe-tab .material-symbols-outlined { font-size: 18px; }
.pe-tab.is-active { background: #fff; color: var(--color-navy); }
.pe-panel { display: flex; flex-direction: column; gap: .9rem; }
.pe-row { display: flex; flex-direction: column; gap: .35rem; }
.pe-row-label { display: flex; align-items: center; gap: .35rem; font-size: 12.5px; font-weight: 600; color: #CBD5E1; }
.pe-row-label .material-symbols-outlined { font-size: 17px; color: #94A3B8; }
.pe-row-label b { margin-left: auto; color: var(--color-lime); font-variant-numeric: tabular-nums; font-size: 12px; }
.pe-slider-row { display: flex; align-items: center; gap: .5rem; }
.pe input[type="range"] { flex: 1; width: 100%; accent-color: var(--color-lime); height: 28px; }
.pe-mini { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.pe-mini:hover { background: rgba(255,255,255,.14); }
.pe-mini .material-symbols-outlined { font-size: 20px; }
.pe-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.pe-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .45rem .75rem; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: #CBD5E1; border: 1px solid rgba(255,255,255,.16); }
.pe-chip .material-symbols-outlined { font-size: 17px; }
.pe-chip.is-on { background: rgba(212,232,36,.14); border-color: rgba(212,232,36,.55); color: var(--color-lime); }
.pe-presets { display: flex; gap: .55rem; overflow-x: auto; padding-bottom: .35rem; scrollbar-width: thin; }
@media (min-width: 768px) { .pe-presets { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; } }
.pe-preset { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: 11.5px; font-weight: 600; color: #CBD5E1; }
.pe-preset canvas { width: 64px; height: auto; border-radius: 10px; border: 2px solid transparent; display: block; }
.pe-preset.is-active canvas { border-color: var(--color-lime); }
.pe-preset.is-active { color: var(--color-lime); }
.pe-fine { border-top: 1px solid rgba(255,255,255,.08); padding-top: .6rem; }
.pe-fine summary { display: flex; align-items: center; gap: .35rem; font-size: 13px; font-weight: 700; color: #E2E8F0; cursor: pointer; list-style: none; }
.pe-fine summary::-webkit-details-marker { display: none; }
.pe-fine[open] summary { margin-bottom: .7rem; }
.pe-fine > div { display: flex; flex-direction: column; gap: .7rem; }
.pe-quality { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.pe-qopt { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: .6rem .6rem; border-radius: 11px; border: 1px solid rgba(255,255,255,.14); text-align: left; min-height: 72px; }
.pe-qopt b { font-size: 12.5px; color: #fff; }
.pe-qopt small { font-size: 10.5px; color: #94A3B8; }
.pe-qopt .pe-qsize { margin-top: auto; font-size: 11.5px; font-weight: 700; color: var(--color-lime); }
.pe-qopt.is-active { border-color: var(--color-lime); background: rgba(212,232,36,.1); }
.pe-outinfo { display: flex; flex-direction: column; gap: .35rem; background: rgba(255,255,255,.05); border-radius: 12px; padding: .7rem .8rem; }
.pe-outrow { display: flex; align-items: center; gap: .45rem; font-size: 12.5px; color: #94A3B8; flex-wrap: wrap; }
.pe-outrow .material-symbols-outlined { font-size: 17px; }
.pe-outrow b { color: #fff; font-variant-numeric: tabular-nums; }
.pe-outrow em { font-style: normal; font-size: 11px; color: #94A3B8; margin-left: auto; }
.pe-outrow em.pe-good { color: var(--color-emerald); font-weight: 800; font-size: 12px; }
.pe-warn { display: flex; align-items: flex-start; gap: .35rem; font-size: 12px; color: #FCD34D; }
.pe-warn .material-symbols-outlined { font-size: 17px; }
.pe-result-title { font-size: 12px; font-weight: 700; color: #CBD5E1; margin-bottom: .5rem; }
.pe-res-avatars { display: flex; align-items: center; gap: .9rem; padding: .8rem; border-radius: 12px; background: #fff; }
.pe-res-a { object-fit: cover; border-radius: 999px; box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(0,0,0,.18); }
.pe-res-a-lg { width: 76px; height: 76px; }
.pe-res-a-md { width: 48px; height: 48px; }
.pe-res-a-sm { width: 30px; height: 30px; }
.pe-res-a-sq { width: 48px; height: 48px; border-radius: 10px; margin-left: auto; }
.pe-res-portrait { position: relative; width: 160px; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 24px -8px rgba(0,0,0,.6); }
.pe-res-portrait img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.pe-res-lower { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem .6rem .5rem; background: linear-gradient(transparent, rgba(7,27,58,.92)); display: flex; flex-direction: column; }
.pe-res-lower b { color: #fff; font-size: 12px; letter-spacing: .04em; }
.pe-res-lower span { color: var(--color-lime); font-size: 10px; font-weight: 600; }
.pe-busy { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; background: rgba(6,14,28,.72); color: #fff; font-size: 13px; font-weight: 600; }
.pe-busy .material-symbols-outlined { font-size: 34px; color: var(--color-lime); }

/* ---- PhotoField (маягт доторх виджет) ---- */
.pf-grid { display: grid; gap: .75rem; }
@media (min-width: 640px) { .pf-grid { grid-template-columns: 1fr 1fr; } }
.pf { display: flex; gap: .85rem; align-items: flex-start; padding: .8rem; border: 1.5px dashed #CBD5E1; border-radius: 14px; background: #F8FAFC; transition: border-color .15s, background .15s; }
.pf.has-photo { border-style: solid; border-color: #E2E8F0; background: #fff; }
.pf-thumb { position: relative; flex-shrink: 0; width: 84px; height: 84px; border-radius: 18px; overflow: hidden; background: #E2E8F0; display: flex; align-items: center; justify-content: center; }
.pf-portrait .pf-thumb { width: 84px; height: 105px; border-radius: 12px; }
.pf-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-ph .material-symbols-outlined { font-size: 44px; color: #94A3B8; }
.pf-badge { position: absolute; right: 4px; bottom: 4px; width: 24px; height: 24px; border-radius: 999px; background: var(--color-navy); color: var(--color-lime); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.pf-badge .material-symbols-outlined { font-size: 14px; }
.pf-spin { position: absolute; inset: 0; background: rgba(255,255,255,.7); display: flex; align-items: center; justify-content: center; color: var(--color-navy); }
.pf-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: .3rem; }
.pf-label { font-size: 14px; font-weight: 700; color: #1E293B; }
.pf-ratio { font-size: 10.5px; font-weight: 800; color: var(--color-navy); background: var(--color-lime); padding: .05rem .4rem; border-radius: 999px; vertical-align: middle; }
.pf-req { color: #DC2626; }
.pf-hint { font-size: 12px; color: #64748B; line-height: 1.35; }
.pf-hint:empty { display: none; }
.pf-btns { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .15rem; }
.pf-btn { display: inline-flex; align-items: center; gap: .25rem; min-height: 36px; padding: .3rem .65rem; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--color-navy); background: #fff; border: 1px solid rgba(11,30,61,.18); }
.pf-btn:hover { border-color: var(--color-navy); }
.pf-btn .material-symbols-outlined { font-size: 17px; }
.pf-btn-ghost { background: rgba(11,30,61,.05); border-color: transparent; }
.pf-btn-danger { color: #DC2626; border-color: #FECACA; padding: .3rem .45rem; }
.pf-meta { font-size: 11px; color: #64748B; font-variant-numeric: tabular-nums; }
.pf-meta:empty { display: none; }
.pf.is-busy .pf-btns { opacity: .5; pointer-events: none; }

/* Header-ийн профайл товчинд гишүүний зураг (v3.34) */
.member-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.pe-guide .pe-g-safe { stroke: rgba(255,255,255,.35); stroke-width: 1; stroke-dasharray: 4 5; }
.pf-news .pf-thumb { width: 128px; height: 72px; border-radius: 10px; }

/* =====================================================================
   v3.35 — АДМИН ПАНЕЛ: хажуугийн цэс, тойм, контент удирдлага
   ===================================================================== */
.adm-shell { display: flex; align-items: flex-start; max-width: 84rem; margin: 0 auto; }
.adm-main { flex: 1; min-width: 0; padding: 1.5rem 1rem 4rem; }
@media (min-width: 640px) { .adm-main { padding: 2rem 1.5rem 4rem; } }
.adm-nav { width: 248px; flex-shrink: 0; padding: 1.25rem .75rem 2rem; position: sticky; top: 4rem; max-height: calc(100vh - 4rem); overflow-y: auto; border-right: 1px solid #E2E8F0; background: #fff; align-self: stretch; min-height: calc(100vh - 4rem); }
.adm-nav-group { margin-bottom: 1rem; }
.adm-nav-group.hidden, .adm-nav-item.hidden { display: none !important; }
.adm-nav-title { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #94A3B8; padding: 0 .65rem .35rem; }
.adm-nav-item { width: 100%; display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem; border-radius: .6rem; font-size: 13.5px; font-weight: 600; color: #475569; text-align: left; transition: background .12s, color .12s; }
.adm-nav-item .material-symbols-outlined { font-size: 20px; color: #94A3B8; }
.adm-nav-item:hover { background: #F1F5F9; color: var(--color-navy); }
.adm-nav-item.is-active { background: var(--color-navy); color: #fff; }
.adm-nav-item.is-active .material-symbols-outlined { color: var(--color-lime); }
.adm-nav-label { flex: 1; min-width: 0; }
.adm-nav-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #EF4444; color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.adm-nav-badge.hidden { display: none; }
.adm-nav-backdrop { position: fixed; inset: 4rem 0 0 0; background: rgba(11,30,61,.45); z-index: 44; }
@media (max-width: 1023.98px) {
  .adm-nav { position: fixed; top: 4rem; left: 0; bottom: 0; z-index: 45; min-height: 0; max-height: none; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 10px 0 30px -12px rgba(11,30,61,.35); }
  .adm-nav.is-open { transform: translateX(0); }
}
@media (min-width: 1024px) { .adm-nav-backdrop { display: none !important; } }

.adm-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: 1.4rem 1.4rem; border-radius: 1rem; background: radial-gradient(120% 140% at 100% 0%, #16325C 0%, var(--color-navy) 55%); }
.adm-quick { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .85rem; border-radius: .65rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff; font-size: 13px; font-weight: 700; }
.adm-quick:hover { background: var(--color-lime); color: var(--color-navy); }
.adm-quick .material-symbols-outlined { font-size: 18px; }
.adm-h2 { font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #64748B; margin-bottom: .75rem; }
.adm-h3 { font-size: 15px; font-weight: 800; color: #1E293B; margin-bottom: .75rem; }
.adm-kpi { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; padding: 1rem; border-radius: .9rem; background: #fff; border: 1px solid #E2E8F0; text-align: left; transition: border-color .15s, transform .15s, box-shadow .15s; }
.adm-kpi:hover { border-color: rgba(11,30,61,.35); transform: translateY(-1px); box-shadow: 0 8px 20px -12px rgba(11,30,61,.35); }
.adm-kpi-icon { width: 36px; height: 36px; border-radius: .6rem; background: rgba(11,30,61,.06); color: var(--color-navy); display: flex; align-items: center; justify-content: center; margin-bottom: .45rem; }
.adm-kpi-icon .material-symbols-outlined { font-size: 20px; }
.adm-kpi-num { font-size: 1.6rem; font-weight: 800; color: #0F172A; line-height: 1.1; font-variant-numeric: tabular-nums; }
.adm-kpi-label { font-size: 13px; font-weight: 700; color: #334155; }
.adm-kpi-sub { font-size: 11.5px; color: #64748B; }
.adm-kpi.is-alert { border-color: #FCA5A5; background: #FEF2F2; }
.adm-kpi.is-alert .adm-kpi-icon { background: #EF4444; color: #fff; }
.adm-kpi.is-alert .adm-kpi-num { color: #B91C1C; }
.adm-btn { display: inline-flex; align-items: center; justify-content: center; gap: .25rem; min-height: 32px; padding: .3rem .7rem; border-radius: .5rem; font-size: 12px; font-weight: 700; color: var(--color-navy); border: 1px solid rgba(11,30,61,.2); background: #fff; }
.adm-btn:hover { background: rgba(11,30,61,.05); }
.adm-btn-danger { color: #DC2626; border-color: #FECACA; padding: .3rem .45rem; }
.adm-btn-danger:hover { background: #FEF2F2; }
.adm-pill { min-height: 28px; padding: .2rem .65rem; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #64748B; background: #F1F5F9; border: 1px solid #E2E8F0; }
.adm-pill.is-on { color: #047857; background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.3); }
.adm-pill:disabled { opacity: .6; cursor: not-allowed; }
.adm-star { width: 32px; height: 32px; border-radius: .5rem; display: inline-flex; align-items: center; justify-content: center; color: #CBD5E1; }
.adm-star:hover { background: #FFFBEB; color: #F59E0B; }
.adm-star.is-on { color: #F59E0B; }
.adm-star .material-symbols-outlined { font-size: 22px; }
.adm-move { display: flex; flex-direction: column; gap: 1px; flex-shrink: 0; }
.adm-move-btn { width: 26px; height: 20px; border-radius: .35rem; color: #64748B; display: flex; align-items: center; justify-content: center; }
.adm-move-btn:hover:not(:disabled) { background: #F1F5F9; color: var(--color-navy); }
.adm-move-btn:disabled { opacity: .25; cursor: default; }
.adm-move-btn .material-symbols-outlined { font-size: 20px; }
.adm-role-row { display: flex; align-items: center; gap: .5rem; padding: .45rem .5rem; border-radius: .6rem; border: 1px solid #E2E8F0; background: #fff; }
.adm-role-row [data-actions] .adm-btn:not(.adm-btn-danger) { padding: .3rem .5rem; }
.adm-group-head { display: flex; align-items: baseline; gap: .5rem; font-size: 13px; font-weight: 800; color: var(--color-navy); margin-bottom: .5rem; }
.adm-group-head span { font-size: 11px; font-weight: 600; color: #94A3B8; }
.adm-rolecard { padding: .8rem .9rem; border-radius: .8rem; background: #fff; border: 1px solid #E2E8F0; display: flex; flex-direction: column; gap: .15rem; }
.adm-rolecard b { font-size: 13px; color: #0F172A; }
.adm-rolecard span { font-size: 12px; color: #64748B; line-height: 1.4; }
.adm-drop { display: flex; align-items: center; gap: .6rem; padding: .9rem 1rem; border: 1.5px dashed #CBD5E1; border-radius: .8rem; background: #F8FAFC; font-size: 13px; color: #475569; cursor: pointer; transition: border-color .15s, background .15s; }
.adm-drop:hover, .adm-drop.is-over { border-color: var(--color-navy); background: rgba(212,232,36,.12); }
.adm-drop .material-symbols-outlined { font-size: 26px; color: var(--color-navy); }
.adm-drop b { color: var(--color-navy); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.adm-news-preview { display: flex; flex-direction: column; max-width: 340px; border-radius: .9rem; overflow: hidden; border: 1px solid #E2E8F0; background: #fff; box-shadow: 0 6px 18px -10px rgba(11,30,61,.3); }
.adm-np-media { aspect-ratio: 16 / 9; background: var(--color-navy) center / cover no-repeat; display: flex; align-items: center; justify-content: center; }
.adm-np-media .material-symbols-outlined { font-size: 40px; color: rgba(255,255,255,.25); }
.adm-np-body { padding: .7rem .85rem .85rem; display: flex; flex-direction: column; gap: .2rem; }
.adm-np-date { font-size: 11px; font-weight: 700; color: var(--color-emerald); }
.adm-np-body b { font-size: 14px; color: #0F172A; line-height: 1.3; }
.adm-np-body p { font-size: 12.5px; color: #64748B; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* v3.37 — Админ панелын шинэ хэсгүүд */
.adm-mfields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem .9rem; padding: .7rem .8rem; border-radius: .7rem; background: #F8FAFC; }
@media (min-width: 768px) { .adm-mfields { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.adm-mf { min-width: 0; display: flex; flex-direction: column; }
.adm-mf span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #94A3B8; }
.adm-mf b { font-size: 13px; font-weight: 600; color: #1E293B; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-mf.is-missing b { color: #DC2626; }
.adm-num { width: 5.5rem; padding: .35rem .5rem; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.adm-rank-table tr.is-dirty { background: #FFFBEB; }
.adm-role-tag { display: inline-flex; align-items: center; padding: .2rem .6rem; border-radius: .45rem; font-size: 11.5px; font-weight: 700; background: #F1F5F9; color: #475569; }
.adm-role-super_admin { background: var(--color-navy); color: var(--color-lime); }
.adm-role-admin { background: rgba(11,30,61,.1); color: var(--color-navy); }
.adm-btn:disabled { opacity: .45; cursor: default; }

/* v3.42 — Админ самбар → Цомог */
.adm-btn-primary { color: #fff; background: var(--color-navy); border-color: var(--color-navy); padding: .45rem .9rem; font-size: 13px; }
.adm-btn-primary:hover { background: #16325C; }
.adm-alert { display: block; padding: .6rem .8rem; border-radius: .6rem; font-size: 13px; border: 1px solid; }
.adm-alert-ok { color: #047857; background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.3); }
.adm-alert-err { color: #B91C1C; background: #FEF2F2; border-color: #FECACA; }

/* v3.53 — чансааны ▲▼, сүүлийн тэмцээн */
.sb-move { display: block; font-size: 10px; font-weight: 800; line-height: 1.1; margin-top: 2px; letter-spacing: .02em; }
.sb-move.up { color: #34D399; } .sb-move.down { color: #F87171; } .sb-move.new { color: var(--color-lime); }
.podium .sb-move { display: inline-block; margin: 0 0 0 .35rem; font-size: 11px; }
.sb-last { display: block; font-size: 11px; color: rgba(255,255,255,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* v3.66 — Pro тэмдэг */
.pro-badge{display:inline-flex;align-items:center;gap:2px;vertical-align:middle;font-size:10px;font-weight:800;letter-spacing:.06em;line-height:1;
  padding:3px 7px 3px 5px;border-radius:999px;color:#3b2a00;background:linear-gradient(135deg,#fde68a 0%,#f59e0b 55%,#fbbf24 100%);
  box-shadow:0 1px 0 rgba(255,255,255,.6) inset,0 1px 3px rgba(180,120,0,.35);white-space:nowrap}
.pro-badge .material-symbols-outlined{font-size:13px;line-height:1}
.pro-badge-lg{font-size:12px;padding:5px 10px 5px 7px}
.pro-badge-lg .material-symbols-outlined{font-size:16px}
.ath-card.is-pro{box-shadow:0 0 0 2px #f59e0b,0 6px 18px rgba(245,158,11,.18)}
.ath-name .pro-badge{margin-left:4px}

/* ===== v3.72 — Шууд ticker (NBA/FIBA маягийн) + "Шууд" товч ===== */
#live-ticker { display: flex; align-items: stretch; background: #0B1C3A; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); position: relative; z-index: 41; }
#live-ticker .lt-label { flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 14px; background: #D7F22B; color: #0B1C3A; font-weight: 800; font-size: 12px; letter-spacing: .06em; max-width: 150px; }
#live-ticker .lt-label { flex-direction: row; align-items: center; flex-wrap: wrap; }
#live-ticker .lt-label .material-symbols-outlined { font-size: 16px; margin-right: 4px; }
#live-ticker .lt-label small { flex-basis: 100%; font-size: 10px; font-weight: 600; letter-spacing: 0; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#live-ticker .lt-scroll { flex: 1 1 auto; display: flex; gap: 1px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#live-ticker .lt-scroll::-webkit-scrollbar { display: none; }
#live-ticker .lt-nav { flex: 0 0 auto; width: 30px; display: none; align-items: center; justify-content: center; color: rgba(255,255,255,.7); background: rgba(255,255,255,.04); }
#live-ticker .lt-nav:hover { color: #fff; background: rgba(255,255,255,.1); }
@media (min-width: 768px) { #live-ticker .lt-nav { display: flex; } #live-ticker .lt-label { max-width: 190px; padding: 0 18px; } }
#live-ticker .lt-card { flex: 0 0 168px; scroll-snap-align: start; padding: 7px 10px 6px; background: rgba(255,255,255,.04); color: #fff; font-size: 12px; line-height: 1.25; transition: background .15s; }
#live-ticker .lt-card:hover { background: rgba(255,255,255,.1); }
#live-ticker .lt-card.is-live { background: rgba(239,68,68,.14); }
#live-ticker .lt-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 3px; font-size: 10px; }
#live-ticker .lt-meta { color: rgba(255,255,255,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#live-ticker .lt-time { color: #D7F22B; font-weight: 700; white-space: nowrap; }
#live-ticker .lt-done { color: rgba(255,255,255,.55); font-weight: 600; }
.lt-live { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 10px; color: #fff; background: #EF4444; border-radius: 4px; padding: 1px 5px; letter-spacing: .04em; }
.lt-live i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: ltPulse 1.2s infinite; }
.lt-badge { display: inline-flex; font-weight: 700; font-size: 10px; color: #0B1C3A; background: #D7F22B; border-radius: 4px; padding: 1px 6px; }
#live-ticker .lt-row { display: flex; justify-content: space-between; gap: 6px; }
#live-ticker .lt-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
#live-ticker .lt-score { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
#live-ticker .lt-score em { font-style: normal; font-weight: 600; color: #D7F22B; margin-right: 6px; }
#live-ticker .lt-win { color: #fff; }
#live-ticker .lt-lose { color: rgba(255,255,255,.55); }
#live-ticker .lt-ev { margin-top: 2px; font-size: 10px; color: rgba(255,255,255,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #EF4444; margin-right: 6px; box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: ltRing 1.6s infinite; }
.lt-dot.is-idle { background: #0B1C3A; animation: none; box-shadow: none; }
#live-ticker .lt-label .lt-dot { background: #EF4444; }
@keyframes ltPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes ltRing { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.55); } 70% { box-shadow: 0 0 0 7px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
.live-pill { display: inline-flex; align-items: center; height: 40px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 800; color: #0B1C3A; background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.35); white-space: nowrap; }
.live-pill:hover { background: rgba(239,68,68,.15); }
#bottom-nav a[data-live-nav] { position: relative; }
#bottom-nav .bn-live { position: absolute; top: 6px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: #EF4444; box-shadow: 0 0 0 2px #fff; animation: ltPulse 1.2s infinite; }
#bottom-nav .bn-live.is-idle { background: #D7F22B; animation: none; }
.live-home-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 16px 18px; }
.live-home-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 10px; background: #D7F22B; color: #0B1C3A; font-weight: 800; font-size: 14px; }
.live-home-btn:hover { filter: brightness(1.05); }
.live-home-ev { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 3px 10px; }
.live-home-ev:hover { background: rgba(255,255,255,.1); color: #fff; }
@media (max-width: 767px) {
  #live-ticker .lt-label { max-width: 76px; padding: 0 10px; font-size: 11px; justify-content: center; }
  #live-ticker .lt-label small { display: none; }
  #live-ticker .lt-card { flex-basis: 150px; }
  .live-pill { padding: 0 10px; font-size: 12px; }
}

/* v3.73 — Админ: багана заагаагүй grid-ийн мөр урт текст (truncate)-ээр контейнерээс хальж,
   товчнууд дэлгэцээс гарч байсныг засав (implicit "auto" багана → minmax(0,1fr)). */
.adm-main .grid:not([class*="grid-cols"]) { grid-template-columns: minmax(0, 1fr); }
.adm-main [data-row] { min-width: 0; }
