/* 12-2 анги — шилэн (glass) загвар, ногоон + цагаан */

:root {
  --ink: #0b2a1c;
  --ink-2: #33523f;
  --ink-3: #6a8574;
  --green: #0fa35a;
  --green-600: #0b8a4b;
  --green-700: #08703c;
  --green-800: #06552e;
  --green-300: #7fe0ab;
  --green-200: #b6f0cf;
  --green-100: #dcf8e8;
  --green-50: #f1fcf5;
  --white: #ffffff;
  --bg: #f3fbf6;
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.8);
  --glass-soft: rgba(255, 255, 255, 0.38);
  --glass-border: rgba(255, 255, 255, 0.85);
  --line: rgba(11, 42, 28, 0.08);
  --line-2: rgba(11, 42, 28, 0.14);
  --shadow: 0 10px 40px -12px rgba(8, 80, 44, 0.22), 0 2px 6px rgba(8, 80, 44, 0.06);
  --shadow-lg: 0 30px 80px -20px rgba(8, 80, 44, 0.35);
  --danger: #d4443f;
  --danger-bg: #fdecec;
  --warn: #b7791f;
  --radius: 22px;
  --radius-sm: 14px;
  --blur: blur(22px) saturate(170%);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
  --nav-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
::selection { background: var(--green-200); }

.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 26px; height: 26px; }

/* ---------- Арын бүдгэрсэн ногоон толбонууд ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-orbs::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(127, 224, 171, 0.55), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(15, 163, 90, 0.28), transparent 60%),
    radial-gradient(800px 600px at 50% 120%, rgba(182, 240, 207, 0.7), transparent 60%),
    linear-gradient(180deg, #f6fdf9 0%, #eefaf3 100%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.55; animation: float 22s ease-in-out infinite; }
.orb.o1 { width: 420px; height: 420px; background: #5fd699; top: 8%; left: -120px; }
.orb.o2 { width: 360px; height: 360px; background: #a8efc9; top: 45%; right: -100px; animation-delay: -7s; animation-duration: 26s; }
.orb.o3 { width: 300px; height: 300px; background: #2dbb73; bottom: -80px; left: 30%; opacity: 0.3; animation-delay: -13s; animation-duration: 30s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 30px) scale(0.95); }
}
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.35;
  background-image: radial-gradient(rgba(11, 42, 28, 0.06) 1px, transparent 1px); background-size: 3px 3px; }

/* ---------- Шил ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.glass-strong { background: var(--glass-strong); }

.wrap { width: min(1240px, 100% - 32px); margin: 0 auto; }

/* ---------- Навигаци ---------- */
.nav {
  position: sticky; top: 12px; z-index: 50;
  margin: 12px auto 0; width: min(1240px, 100% - 24px);
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 14px; border-radius: 999px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); text-decoration: none !important; margin-right: auto; min-width: 0; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-700) 100%);
  color: #fff; font-family: var(--display); font-size: 13px; letter-spacing: -0.02em;
  box-shadow: 0 6px 16px -4px rgba(15, 163, 90, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text b { font-size: 15px; }
.brand-text small { font-size: 11.5px; color: var(--ink-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px;
  color: var(--ink-2); font-weight: 700; font-size: 14px; text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover, .nav-links a.active { background: rgba(255, 255, 255, 0.75); color: var(--green-700); }

/* ---------- Товчнууд ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 14.5px; cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: transform 0.15s ease, box-shadow 0.2s, background 0.2s, color 0.2s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  color: #fff; background: linear-gradient(135deg, #14b866 0%, var(--green-700) 100%);
  box-shadow: 0 10px 24px -8px rgba(15, 163, 90, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:hover { box-shadow: 0 14px 30px -8px rgba(15, 163, 90, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-ghost { background: rgba(255, 255, 255, 0.65); border-color: rgba(255, 255, 255, 0.9); color: var(--ink); box-shadow: 0 2px 10px -4px rgba(8, 80, 44, 0.18); }
.btn-ghost:hover { background: #fff; color: var(--green-700); }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 10px 24px -10px rgba(212, 68, 63, 0.7); }
.btn-danger-ghost { background: rgba(255, 255, 255, 0.65); color: var(--danger); border-color: rgba(212, 68, 63, 0.25); }
.btn-danger-ghost:hover { background: var(--danger-bg); }
.btn-sm { height: 36px; padding: 0 13px; font-size: 13.5px; }
.btn-icon { width: 44px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }

/* ---------- Hero ---------- */
.hero { padding: 42px 0 18px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; align-items: stretch; }
.hero-card { padding: 34px; position: relative; overflow: hidden; }
.hero-card::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 163, 90, 0.18), transparent 70%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.75); border: 1px solid rgba(15, 163, 90, 0.18);
  color: var(--green-700); font-weight: 700; font-size: 12.5px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(15, 163, 90, 0.18); }
.hero h1 {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; line-height: 0.95;
  font-size: clamp(64px, 11vw, 132px); margin: 18px 0 6px;
  background: linear-gradient(135deg, var(--green-800) 0%, var(--green) 55%, #3fd184 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { font-size: 18px; font-weight: 700; color: var(--ink-2); margin: 0 0 4px; }
.hero .muted { color: var(--ink-3); font-weight: 600; font-size: 14.5px; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; position: relative; z-index: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.72); border: 1px solid rgba(255, 255, 255, 0.95);
  font-size: 13.5px; font-weight: 700; color: var(--ink-2);
}
.chip .i { width: 16px; height: 16px; color: var(--green); }
.chip b { color: var(--ink); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; position: relative; z-index: 1; }

/* Одоогийн хичээл */
.now-card { padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.now-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.now-head .label { font-weight: 800; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.clock { font-family: var(--display); font-size: 15px; font-weight: 500; color: var(--green-700); background: rgba(255, 255, 255, 0.7); padding: 6px 11px; border-radius: 999px; }
.now-main { border-radius: 18px; padding: 18px; background: linear-gradient(135deg, rgba(15, 163, 90, 0.95), rgba(8, 112, 60, 0.95)); color: #fff; position: relative; overflow: hidden; box-shadow: 0 16px 36px -14px rgba(8, 112, 60, 0.7); }
.now-main::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 200px at 90% 0%, rgba(255, 255, 255, 0.25), transparent 60%); }
.now-main > * { position: relative; }
.now-main .tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.9; }
.now-main .tag .pulse { width: 8px; height: 8px; border-radius: 50%; background: #b9ffd8; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(185, 255, 216, 0.8); } 100% { box-shadow: 0 0 0 10px rgba(185, 255, 216, 0); } }
.now-main h3 { font-size: 22px; margin: 6px 0 2px; line-height: 1.2; }
.now-main .meta { font-size: 14px; opacity: 0.92; font-weight: 600; }
.progress { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.28); margin-top: 14px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: #fff; width: 0; transition: width 0.6s ease; }
.now-main.idle { background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(220, 248, 232, 0.9)); color: var(--ink); box-shadow: none; border: 1px solid #fff; }
.now-main.idle .tag .pulse { background: var(--green-300); animation: none; }
.next-list { display: flex; flex-direction: column; gap: 8px; }
.next-item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 14px; background: rgba(255, 255, 255, 0.62); border: 1px solid rgba(255, 255, 255, 0.9); }
.next-item .t { font-family: var(--display); font-size: 12.5px; font-weight: 500; color: var(--green-700); min-width: 92px; }
.next-item .s { font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.next-item .s small { display: block; font-weight: 600; color: var(--ink-3); font-size: 12.5px; }

/* ---------- Хэсгүүд ---------- */
.section { padding: 40px 0 10px; scroll-margin-top: 90px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 4vw, 38px); letter-spacing: -0.02em; margin: 0; line-height: 1.1; }
.section-head p { margin: 6px 0 0; color: var(--ink-3); font-weight: 600; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-width: 0; max-width: 100%; }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; gap: 2px; background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: none; height: 36px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 13.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: #fff; color: var(--green-700); box-shadow: 0 4px 12px -4px rgba(8, 80, 44, 0.25); }
.seg button .badge { font-size: 11px; background: var(--green-100); color: var(--green-700); padding: 1px 7px; border-radius: 999px; }
.seg button.today-tab::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-left: 2px; }

/* ---------- 7 хоногийн хүснэгт ---------- */
.week-shell { padding: 14px; overflow: hidden; }
.week-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.week {
  display: grid; gap: 6px; min-width: 860px;
  grid-template-columns: 92px repeat(var(--days, 5), minmax(150px, 1fr));
}
.wk-head { position: sticky; top: 0; padding: 10px 12px; border-radius: 14px; font-weight: 800; font-size: 14px; text-align: center; background: rgba(255, 255, 255, 0.55); color: var(--ink-2); }
.wk-head.today { background: linear-gradient(135deg, #14b866, var(--green-700)); color: #fff; box-shadow: 0 8px 20px -8px rgba(15, 163, 90, 0.7); }
.wk-head small { display: block; font-size: 11px; font-weight: 700; opacity: 0.75; }
.wk-corner { background: transparent; }
.wk-time { display: flex; flex-direction: column; justify-content: center; padding: 6px 8px; border-radius: 12px; color: var(--ink-3); font-size: 12px; font-weight: 700; line-height: 1.25; }
.wk-time b { color: var(--ink); font-size: 13px; }
.wk-time.now { color: var(--green-700); }
.wk-time.now b { color: var(--green-700); }
.wk-empty { border-radius: 12px; background: rgba(255, 255, 255, 0.22); border: 1px dashed rgba(11, 42, 28, 0.06); min-height: 54px; }
.wk-empty.today { background: rgba(220, 248, 232, 0.35); }
.wk-break { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 4px 10px; color: var(--ink-3); font-size: 12px; font-weight: 700; }
.wk-break::before, .wk-break::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }
.wk-break .i { width: 15px; height: 15px; color: var(--green); }

.lesson {
  --tone: var(--green); --tone-bg: rgba(220, 248, 232, 0.75);
  position: relative; border-radius: 14px; padding: 10px 11px 10px 14px; min-height: 54px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), var(--tone-bg));
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px -8px rgba(8, 80, 44, 0.3);
  display: flex; flex-direction: column; gap: 3px; overflow: hidden;
  transition: transform 0.15s, box-shadow 0.2s;
}
.lesson::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--tone); }
.lesson .subj { font-weight: 800; font-size: 13.5px; line-height: 1.2; color: var(--ink); }
.lesson .who { font-size: 12.5px; font-weight: 600; color: var(--ink-2); line-height: 1.3; }
.lesson .span-t { font-size: 11px; font-weight: 700; color: var(--ink-3); margin-top: auto; }
.lesson .rows { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.lesson .row { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; font-size: 12px; line-height: 1.3; color: var(--ink-2); font-weight: 600; }
.lesson .row > span:not(.gtag) { min-width: 0; overflow-wrap: anywhere; }
.gtag { flex: none; font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.9); color: var(--tone); border: 1px solid rgba(11, 42, 28, 0.06); white-space: nowrap; }
.lesson.now { outline: 2px solid var(--green); outline-offset: 1px; box-shadow: 0 10px 26px -10px rgba(15, 163, 90, 0.7); }
.lesson.now .now-badge { position: absolute; top: 7px; right: 8px; font-size: 10px; font-weight: 800; color: #fff; background: var(--green); padding: 2px 7px; border-radius: 999px; }
.lesson.past { opacity: 0.55; }

.tone-0 { --tone: #0fa35a; --tone-bg: rgba(214, 246, 228, 0.85); }
.tone-1 { --tone: #0e8f7e; --tone-bg: rgba(208, 244, 236, 0.85); }
.tone-2 { --tone: #5a9e1a; --tone-bg: rgba(232, 246, 208, 0.85); }
.tone-3 { --tone: #11796a; --tone-bg: rgba(210, 238, 232, 0.85); }
.tone-4 { --tone: #2c8c3c; --tone-bg: rgba(222, 243, 214, 0.85); }
.tone-5 { --tone: #0b7d4a; --tone-bg: rgba(206, 240, 222, 0.85); }
.tone-6 { --tone: #3fae82; --tone-bg: rgba(220, 247, 237, 0.85); }
.tone-7 { --tone: #6d8f22; --tone-bg: rgba(238, 244, 214, 0.85); }

/* ---------- Өдрийн жагсаалт ---------- */
.day-list { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.day-item { display: grid; grid-template-columns: 86px 1fr; gap: 12px; align-items: stretch; }
.day-item .when { display: flex; flex-direction: column; justify-content: center; padding: 8px 4px; font-weight: 700; color: var(--ink-3); font-size: 12px; line-height: 1.3; }
.day-item .when b { font-family: var(--display); font-weight: 500; color: var(--ink); font-size: 14px; }
.day-item .when .p { font-size: 11px; }
.day-item .lesson { min-height: 64px; padding: 13px 14px 13px 18px; }
.day-item .lesson .subj { font-size: 15.5px; }
.day-item .lesson .who { font-size: 13.5px; }
.day-item .lesson .row { font-size: 13px; }
.day-free { border-radius: 14px; border: 1px dashed var(--line-2); color: var(--ink-3); font-weight: 700; font-size: 13px; display: flex; align-items: center; padding: 10px 14px; background: rgba(255, 255, 255, 0.25); }
.day-empty { text-align: center; padding: 40px 16px; color: var(--ink-3); font-weight: 700; }
.day-empty .i { width: 40px; height: 40px; color: var(--green-300); margin: 0 auto 10px; }

.sched-foot { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; padding: 14px 6px 0; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.sched-foot a { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Зургийн цомог ---------- */
.gal-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; padding: 10px; margin-bottom: 16px; border-radius: 999px; }
.gal-stats { color: var(--ink-3); font-weight: 700; font-size: 13.5px; padding: 0 10px; }
.masonry { display: flex; gap: 14px; align-items: flex-start; }
.masonry .col { flex: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tile {
  position: relative; margin: 0; border-radius: 18px; overflow: hidden; cursor: zoom-in; background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.95); box-shadow: 0 10px 30px -14px rgba(8, 80, 44, 0.45);
  transform: translateZ(0); animation: tileIn 0.5s ease both;
}
@keyframes tileIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: linear-gradient(135deg, #e3f7ec, #f7fdf9); transition: transform 0.5s ease; }
.tile:hover img, .tile:hover video { transform: scale(1.035); }
.tile .ph { display: grid; place-items: center; aspect-ratio: 4 / 3; color: var(--green-700); background: linear-gradient(135deg, #dff6e9, #f5fdf8); font-weight: 700; font-size: 13px; text-align: center; padding: 14px; gap: 6px; }
.tile .ph .i { width: 34px; height: 34px; }
.tile .vbadge { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 8px; border-radius: 999px; background: rgba(6, 40, 24, 0.55); color: #fff; font-size: 12px; font-weight: 800; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tile .vbadge .i { width: 13px; height: 13px; }
.tile .play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.tile .play span { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.35); border: 1px solid rgba(255, 255, 255, 0.7); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.tile .play .i { width: 22px; height: 22px; margin-left: 3px; }
.tile .sel { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: rgba(6, 40, 24, 0.3); display: none; place-items: center; color: #fff; }
.selecting .tile .sel { display: grid; }
.selecting .tile { cursor: pointer; }
.tile.picked { outline: 3px solid var(--green); outline-offset: -3px; }
.tile.picked .sel { background: var(--green); border-color: #fff; }
.tile.picked img, .tile.picked video { transform: scale(0.94); border-radius: 12px; }
.gal-more { display: flex; justify-content: center; padding: 22px 0; }
.gal-empty { text-align: center; padding: 60px 20px; }
.gal-empty .art { width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 30px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #14b866, var(--green-700)); box-shadow: 0 20px 40px -14px rgba(15, 163, 90, 0.7); transform: rotate(-6deg); }
.gal-empty .art .i { width: 44px; height: 44px; }
.gal-empty h3 { font-family: var(--display); font-size: 22px; margin: 0 0 6px; }
.gal-empty p { color: var(--ink-3); font-weight: 600; margin: 0 0 20px; }
.drop-hint { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(15, 163, 90, 0.18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none; }
.drop-hint div { padding: 30px 40px; border-radius: 26px; border: 2px dashed var(--green); background: rgba(255, 255, 255, 0.85); font-weight: 800; font-size: 20px; color: var(--green-700); display: flex; align-items: center; gap: 12px; }

/* ---------- Lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(4, 24, 14, 0.9); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); display: flex; flex-direction: column; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lb-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: #fff; }
.lb-title { margin-right: auto; min-width: 0; }
.lb-title b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-title small { font-size: 12.5px; opacity: 0.7; font-weight: 600; }
.lb .btn-ghost { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.18); box-shadow: none; }
.lb .btn-ghost:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.lb .btn-danger-ghost { background: rgba(212, 68, 63, 0.18); color: #ffb4b0; border-color: rgba(255, 180, 176, 0.25); }
.lb-stage { flex: 1; position: relative; min-height: 0; touch-action: pan-y; }
.lb-stage .lb-media { position: absolute; inset: 0 64px 20px; display: flex; align-items: center; justify-content: center; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-nav:hover { background: rgba(255, 255, 255, 0.25); }
.lb-nav.prev { left: 10px; }
.lb-nav.next { right: 10px; }
.lb-fallback { color: #fff; text-align: center; font-weight: 700; display: grid; gap: 14px; justify-items: center; }
.lb-fallback .i { width: 48px; height: 48px; opacity: 0.8; }

/* ---------- Модал ---------- */
.modal-back { position: fixed; inset: 0; z-index: 150; background: rgba(6, 40, 24, 0.28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 16px; animation: fadeIn 0.18s ease; }
.modal { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 26px; background: rgba(255, 255, 255, 0.86); animation: pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.modal.wide { width: min(760px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal h3 { margin: 0 0 6px; font-family: var(--display); font-size: 21px; letter-spacing: -0.01em; }
.modal p.lead { margin: 0 0 18px; color: var(--ink-3); font-weight: 600; font-size: 14.5px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.modal-icon { width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; margin-bottom: 14px; color: #fff; background: linear-gradient(135deg, #14b866, var(--green-700)); box-shadow: 0 12px 26px -10px rgba(15, 163, 90, 0.8); }
.modal-icon.danger { background: linear-gradient(135deg, #e86661, #c23631); box-shadow: 0 12px 26px -10px rgba(212, 68, 63, 0.7); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 800; color: var(--ink-2); }
.input, select.input, textarea.input {
  height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.85);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s; width: 100%; font-weight: 600;
}
textarea.input { height: auto; padding: 12px 14px; min-height: 90px; resize: vertical; }
.input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(15, 163, 90, 0.15); }
.err { color: var(--danger); font-weight: 700; font-size: 13.5px; min-height: 20px; }
.hint { color: var(--ink-3); font-size: 12.5px; font-weight: 600; }

/* ---------- Байршуулалтын самбар ---------- */
.up-panel { position: fixed; right: 16px; bottom: 16px; z-index: 120; width: min(400px, calc(100vw - 32px)); max-height: min(70vh, 560px); display: flex; flex-direction: column; background: rgba(255, 255, 255, 0.88); animation: pop 0.25s ease; }
.up-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.up-head b { margin-right: auto; font-size: 15px; }
.up-head small { display: block; color: var(--ink-3); font-weight: 700; font-size: 12px; }
.up-total { height: 4px; background: var(--green-100); }
.up-total i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #14b866, var(--green-700)); transition: width 0.3s; }
.up-list { overflow: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.up-panel.min .up-list, .up-panel.min .up-drop { display: none; }
.up-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 14px; background: rgba(255, 255, 255, 0.7); }
.up-thumb { width: 44px; height: 44px; border-radius: 11px; background: var(--green-100); display: grid; place-items: center; color: var(--green-700); overflow: hidden; }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; }
.up-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-meta { font-size: 11.5px; font-weight: 700; color: var(--ink-3); margin-top: 1px; }
.up-meta.err { color: var(--danger); min-height: 0; }
.up-meta.ok { color: var(--green-700); }
.up-bar { height: 5px; border-radius: 999px; background: var(--green-100); margin-top: 6px; overflow: hidden; }
.up-bar i { display: block; height: 100%; width: 0; background: var(--green); border-radius: inherit; transition: width 0.25s; }
.up-btns { display: flex; gap: 2px; }
.up-btns button { width: 32px; height: 32px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.up-btns button:hover { background: var(--green-50); color: var(--green-700); }
.up-drop { margin: 8px; border: 2px dashed rgba(15, 163, 90, 0.35); border-radius: 16px; padding: 16px; text-align: center; color: var(--ink-3); font-weight: 700; font-size: 13px; cursor: pointer; background: rgba(241, 252, 245, 0.6); }
.up-drop:hover { border-color: var(--green); color: var(--green-700); }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 50%; top: 88px; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.92); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid #fff; box-shadow: var(--shadow-lg); font-weight: 700; font-size: 14px; max-width: 520px; animation: pop 0.25s ease; }
.toast .i { color: var(--green); }
.toast.error .i { color: var(--danger); }
.toast.out { opacity: 0; transform: translateY(-8px); transition: 0.3s; }

/* ---------- Footer ---------- */
.foot { margin: 50px auto 28px; padding: 22px 26px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; color: var(--ink-3); font-weight: 600; font-size: 13.5px; }
.foot a { color: var(--ink-2); font-weight: 700; }

/* ---------- Админ ---------- */
.admin-top { padding: 32px 0 10px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.admin-top h1 { font-family: var(--display); font-size: clamp(28px, 4vw, 40px); margin: 0; letter-spacing: -0.02em; }
.admin-top p { margin: 4px 0 0; color: var(--ink-3); font-weight: 600; }
.panel { padding: 22px; margin-bottom: 18px; }
.panel h2 { margin: 0 0 4px; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.panel h2 .i { color: var(--green); }
.panel > p.hint { margin: 0 0 16px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.admin-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 14px; }
.stat { padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.7); border: 1px solid #fff; }
.stat small { display: block; color: var(--ink-3); font-weight: 800; font-size: 12px; }
.stat b { font-family: var(--display); font-weight: 600; font-size: 20px; }
.meter { height: 10px; border-radius: 999px; background: var(--green-100); overflow: hidden; margin: 8px 0 4px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, #14b866, var(--green-700)); border-radius: inherit; }
.savebar { position: sticky; bottom: 14px; z-index: 40; display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px 10px 10px 20px; border-radius: 999px; margin: 14px 0; background: rgba(11, 42, 28, 0.88); color: #fff; box-shadow: var(--shadow-lg); animation: pop 0.25s ease; }
.savebar span { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.savebar .btn-ghost { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.edit-grid .wk-empty, .edit-grid .lesson { cursor: pointer; }
.edit-grid .wk-empty { display: grid; place-items: center; color: transparent; transition: 0.15s; }
.edit-grid .wk-empty:hover { color: var(--green); background: rgba(255, 255, 255, 0.7); border-color: rgba(15, 163, 90, 0.4); }
.edit-grid .lesson:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(8, 80, 44, 0.45); }
.slot-lessons { display: flex; flex-direction: column; gap: 12px; }
.slot-card { padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.75); border: 1px solid var(--line); }
.slot-card .field { margin-bottom: 10px; }
.slot-card .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 800; font-size: 13px; color: var(--ink-3); }
.periods-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.periods-table td { padding: 0 4px; }
.periods-table td:first-child { font-weight: 800; color: var(--ink-3); width: 60px; font-size: 13px; }
.periods-table .input { height: 40px; min-width: 0; width: 100%; }
.backup-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }
.backup-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.7); font-weight: 700; font-size: 13.5px; }
.backup-row small { color: var(--ink-3); font-weight: 700; }
.preview-box { max-height: 46vh; overflow: auto; border-radius: 16px; background: rgba(255, 255, 255, 0.6); padding: 8px; border: 1px solid var(--line); }
.preview-day { margin: 6px 4px 10px; }
.preview-day h4 { margin: 8px 0 6px; font-size: 13.5px; color: var(--green-700); }
.preview-row { display: grid; grid-template-columns: 54px 1fr; gap: 8px; font-size: 13px; padding: 5px 6px; border-radius: 10px; }
.preview-row:nth-child(even) { background: rgba(241, 252, 245, 0.8); }
.preview-row b { color: var(--ink-3); }
.summary-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; margin: 10px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }
.login-card { width: min(440px, 100%); margin: 8vh auto; padding: 32px; }
.dropzone { border: 2px dashed rgba(15, 163, 90, 0.35); border-radius: 18px; padding: 26px 18px; text-align: center; background: rgba(241, 252, 245, 0.6); cursor: pointer; color: var(--ink-2); font-weight: 700; transition: 0.2s; }
.dropzone:hover, .dropzone.over { border-color: var(--green); background: rgba(220, 248, 232, 0.8); }
.dropzone .i { width: 34px; height: 34px; color: var(--green); margin: 0 auto 8px; }
.dropzone small { display: block; color: var(--ink-3); font-weight: 600; margin-top: 4px; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: spin 0.8s linear infinite; }
.spinner.dark { border-color: rgba(15, 163, 90, 0.2); border-top-color: var(--green); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .admin-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  :root { --radius: 20px; }
  .nav { top: 8px; margin-top: 8px; padding: 8px 8px 8px 10px; gap: 6px; }
  .nav-links a span { display: none; }
  .nav-links a { padding: 9px 11px; }
  .brand-text small { display: none; }
  .brand-mark { width: 36px; height: 36px; border-radius: 12px; font-size: 12px; }
  .nav .btn .lbl { display: none; }
  .nav .btn { width: 40px; height: 40px; padding: 0; }
  .hero { padding-top: 22px; }
  .hero-card, .now-card { padding: 22px; }
  .hero .sub { font-size: 16px; }
  .section { padding-top: 30px; }
  .gal-bar { border-radius: 22px; }
  .masonry { gap: 8px; }
  .masonry .col { gap: 8px; }
  .tile { border-radius: 14px; }
  .lb-stage .lb-media { inset: 0 6px 12px; }
  .lb-nav { width: 40px; height: 40px; background: rgba(0, 0, 0, 0.3); }
  .lb-top .lbl { display: none; }
  .lb-top .btn { width: 40px; padding: 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .day-item { grid-template-columns: 70px 1fr; gap: 8px; }
  .day-list { padding: 10px; }
  .modal { padding: 20px; }
  .up-panel { right: 8px; bottom: 8px; width: calc(100vw - 16px); }
  .savebar { border-radius: 20px; flex-wrap: wrap; padding: 10px 12px; }
  .toasts { top: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; scroll-behavior: auto !important; }
}
