:root {
  --red: #d81e2c;
  --red-dark: #a8141f;
  --ink: #1d1d1f;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f6f6f4;
  --card: #ffffff;
  --ok: #15803d;
  --ok-bg: #ecfdf3;
  --bad: #b91c1c;
  --bad-bg: #fef2f2;
  --warn: #a16207;
  --warn-bg: #fefce8;
  --radius: 12px;
  --ink2: #444;
  --line2: #d1d5db;
  --soft: #f6f7f8;
  --red-soft: #fdecee;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5; font-size: 16px;
}
a { color: var(--red); }
img, video, svg, canvas { max-width: 100%; height: auto; }
iframe, embed, object { max-width: 100%; }
body { overflow-wrap: break-word; }
.wrap { max-width: 880px; margin: 0 auto; padding: 16px; }
.wide { max-width: 1180px; }

/* header */
.top {
  background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.top .wrap { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.brand .moon { width: 30px; height: 30px; border-radius: 8px; background: var(--red); color: #fff;
  display: grid; place-items: center; font-size: 16px; }
.top .sp { flex: 1; }
.who { font-size: 14px; color: var(--muted); text-align: right; line-height: 1.25; }
.who b { color: var(--ink); }
.nav { display: contents; }
.menu-btn { display: none; }

/* cards & forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
h1 { font-size: 26px; margin: 8px 0 16px; }
h2 { font-size: 20px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 8px; }
label { display: block; font-size: 14px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 8px;
  font: inherit; background: var(--card); color: var(--ink);
}
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(216, 30, 44, .25); border-color: var(--red); }
.btn { text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 8px; border: 1px solid transparent;
  background: var(--red); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--red-dark); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line2); }
.btn.ghost:hover { background: var(--soft); }
.btn.sm { padding: 5px 10px; font-size: 13px; font-weight: 500; }
.btn.block { width: 100%; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.hidden { display: none !important; }

/* login */
.login-box { max-width: 380px; margin: 9vh auto 0; }
.login-box .logo { width: 56px; height: 56px; border-radius: 14px; background: var(--red); color: #fff;
  display: grid; place-items: center; font-size: 28px; margin: 0 auto 10px; }
.msg { padding: 10px 12px; border-radius: 8px; font-size: 14px; margin-top: 12px; }
.msg.bad { background: var(--bad-bg); color: var(--bad); }
.msg.warn { background: var(--warn-bg); color: var(--warn); }

/* lessons list */
.lessons { display: grid; gap: 12px; }
.lesson-item {
  display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; cursor: pointer; transition: border-color .15s, transform .15s;
}
.lesson-item:hover { border-color: var(--red); transform: translateY(-1px); }
.num { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--red-soft); color: var(--red);
  display: grid; place-items: center; font-weight: 800; }
.lesson-item .t { flex: 1; min-width: 0; }
.lesson-item .t b { display: block; }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--soft); color: var(--muted); font-weight: 600; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.red { background: var(--red); color: #fff; }

/* lesson page */
.video { position: relative; padding-top: 56.25%; background: #111; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.novideo { background: var(--soft); border-radius: var(--radius); padding: 30px; text-align: center; color: var(--muted); margin-bottom: 16px; }
.ex { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; background: var(--card); }
.ex .q { font-weight: 600; margin-bottom: 10px; }
.ex .q .n { color: var(--red); margin-right: 6px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; margin-bottom: 8px; cursor: pointer; }
.opt:hover { background: var(--soft); }
.opt input { width: auto; margin: 0; accent-color: var(--red); }
.pair { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pair .l { flex: 1; font-weight: 600; padding: 9px 12px; background: var(--soft); border-radius: 8px; }
.pair select { flex: 1; }
.ex.ok { border-color: #86efac; background: var(--ok-bg); }
.ex.bad { border-color: #fca5a5; background: var(--bad-bg); }
.ex.part { border-color: #fde68a; background: var(--warn-bg); }
.fb { margin-top: 10px; font-size: 14px; }
.trkeys { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.trkeys button { width: 36px; height: 34px; border: 1px solid var(--line2); background: var(--card); border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; }
.trkeys button:hover { border-color: var(--red); color: var(--red); }
.score {
  text-align: center; padding: 22px; border-radius: var(--radius); margin-bottom: 16px; color: #fff;
  background: linear-gradient(135deg, var(--red), #ef4e5b);
}
.score .big { font-size: 42px; font-weight: 800; line-height: 1; }

/* admin */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { padding: 9px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font: inherit; cursor: pointer; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--soft); }
td .acts { display: flex; gap: 4px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .v { font-size: 26px; font-weight: 800; }
.stat .k { font-size: 13px; color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); background: var(--soft); border: 1px dashed var(--line2); padding: 8px 10px; border-radius: 8px; margin-top: 6px; }

/* toast & loader */
#toast { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 100; }
.toast { padding: 11px 16px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.15); max-width: 340px; }
.toast.ok { background: var(--ok); }
.toast.bad { background: var(--bad); }
.loader { text-align: center; padding: 50px; color: var(--muted); }
.loader::before { content: ""; display: block; width: 32px; height: 32px; margin: 0 auto 12px; border: 3px solid #e5e7eb; border-top-color: var(--red); border-radius: 50%; animation: sp 1s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  h1 { font-size: 22px; }
  .pair { flex-direction: column; align-items: stretch; }

  /* readable text: nothing smaller than 16px */
  label, .small, .msg, .fb, .toast, .hint, .stat .k, table, .who, .btn.sm { font-size: 16px; }
  th { font-size: 14px; }

  /* tap targets of at least 44x44px */
  .btn, .btn.sm { min-height: 44px; min-width: 44px; padding: 10px 14px; }
  .tabs button { min-height: 44px; }
  input, select, textarea { min-height: 44px; }
  input[type="radio"], input[type="checkbox"] { min-height: 0; width: 22px; height: 22px; }
  .opt { min-height: 44px; }
  .trkeys { gap: 8px; }
  .trkeys button { width: 44px; height: 44px; }
  .brand { min-height: 44px; }
  .lesson-item { padding: 14px 12px; gap: 10px; flex-wrap: wrap; }
  .lesson-item .t { flex-basis: calc(100% - 50px); }
  .lesson-item .badge { margin-left: 50px; }
  .lesson-item .badge ~ .badge { margin-left: 0; }

  /* no sideways scrolling */
  .wrap { padding-left: 12px; padding-right: 12px; }
  .row > * { flex-basis: 100%; min-width: 0; max-width: none !important; }
  .card { padding: 16px; }
  .score .btn { margin: 4px 2px; }
  #toast { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
  .loader { padding: 40px 12px; }
  .novideo { padding: 24px 12px; }

  /* collapsible navigation */
  .top .wrap { position: relative; flex-wrap: wrap; }
  .menu-btn {
    display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 1px solid var(--line2); border-radius: 8px; background: var(--card); cursor: pointer;
  }
  .menu-btn span, .menu-btn span::before, .menu-btn span::after {
    display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
    position: relative; transition: transform .2s, background .2s;
  }
  .menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
  .menu-btn span::before { top: -6px; }
  .menu-btn span::after { top: 6px; }
  .nav-open .menu-btn span { background: transparent; }
  .nav-open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
  .nav-open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }
  .nav { display: none; }
  .nav-open .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 10px;
    flex-basis: 100%; padding: 12px 0 4px; border-top: 1px solid var(--line);
  }
  .nav .who { text-align: left; }
  .nav .btn { width: 100%; }
}

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--card); border-radius: var(--radius); padding: 22px; width: 100%; max-width: 460px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.cred-box { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: 17px; display: grid; gap: 4px; }
.cred-box .pw { font-family: Consolas, monospace; font-size: 20px; color: var(--red); letter-spacing: 1px; }
@media (max-width: 600px) { .modal { padding: 18px; } .cred-box { font-size: 16px; } }
@media (max-width: 600px) { th, td { white-space: nowrap; } td .acts { flex-wrap: nowrap; } }

/* ===================== v2 ===================== */
.banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--radius); margin: 8px 0 12px; font-size: 15px; }
.banner.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #fde68a; }
.banner.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #86efac; }
.banner .btn { margin-left: auto; }

.pc-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.pc-top span { color: var(--muted); }
.bar { height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; background: linear-gradient(90deg, var(--red), #ef4e5b); border-radius: 99px; transition: width .4s; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; text-align: center; }
.mini-stats .v { font-size: 20px; font-weight: 800; }
.mini-stats .k { font-size: 12px; color: var(--muted); }
.clickable { cursor: pointer; border-radius: 8px; }
.clickable:hover { background: var(--soft); }

.lesson-item.locked { opacity: .55; cursor: not-allowed; }
.lesson-item.locked:hover { border-color: var(--line); transform: none; }

/* video: suv belgisi va to'liq ekran */
.video .wm {
  position: absolute; pointer-events: none; user-select: none; z-index: 2;
  color: rgba(255,255,255,.55); text-shadow: 0 0 3px rgba(0,0,0,.6);
  font-size: 14px; font-weight: 700; white-space: nowrap; transition: left 1.5s, top 1.5s;
}
.video .fs-btn {
  position: absolute; right: 8px; bottom: 52px; z-index: 3; width: 44px; height: 44px; border-radius: 8px;
  border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 20px; cursor: pointer;
}
.video:fullscreen, .video:-webkit-full-screen { padding-top: 0; border-radius: 0; width: 100vw; height: 100vh; }
.video:fullscreen .wm { font-size: 22px; }

/* lug'at */
.vocab { display: grid; gap: 6px; }
.vrow { display: grid; grid-template-columns: 44px 1fr 1fr; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.vrow:last-child { border-bottom: 0; }
.say { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 17px; }
.say:hover { border-color: var(--red); }

/* yangi mashq turlari */
.blank { display: inline-block; width: 120px; min-height: 0; padding: 4px 8px; margin: 0 4px; border: 0; border-bottom: 2px solid var(--red); border-radius: 0; text-align: center; font-weight: 700; background: var(--card)8f8; }
.listen { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.order-ans { min-height: 52px; border: 2px dashed var(--line2); border-radius: 10px; padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; background: var(--soft); }
.order-ans .ph { color: var(--muted); font-size: 14px; padding: 0 4px; }
.order-pool { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 8px 14px; min-height: 40px; border: 1px solid var(--line2); border-radius: 99px; background: var(--card); font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 1px 0 rgba(0,0,0,.05); }
.chip:hover { border-color: var(--red); color: var(--red); }
.order-ans .chip { background: var(--red-soft); border-color: #f5b5bb; }
.score.low { background: linear-gradient(135deg, #a16207, #d69e2e); }

/* sertifikat */
.cert { background: var(--card); padding: 14px; border-radius: 6px; box-shadow: 0 4px 30px rgba(0,0,0,.08); max-width: 800px; margin: 0 auto 16px; }
.cert-in { border: 3px double var(--red); padding: 36px 24px; text-align: center; background:
  radial-gradient(circle at 50% 0, #fff5f5, #fff 60%); }
.cert-moon { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 32px; }
.cert-small { letter-spacing: .25em; font-size: 13px; color: var(--red); font-weight: 700; }
.cert-text { font-size: 17px; color: var(--ink2); margin: 10px 0; line-height: 1.6; }
.cert-name { font-family: Georgia, "Times New Roman", serif; font-size: 40px; font-weight: 700; margin: 6px 0; color: var(--ink); border-bottom: 1px solid var(--line); display: inline-block; padding: 0 20px 6px; }
.cert-row { display: flex; justify-content: center; gap: 36px; margin-top: 22px; flex-wrap: wrap; }
.cert-row b { display: block; font-size: 20px; }
.cert-row span { font-size: 13px; color: var(--muted); }
.cert-id { margin-top: 22px; font-size: 12px; color: var(--muted); letter-spacing: .1em; }
@media print {
  .top, .no-print, #toast { display: none !important; }
  body { background: var(--card); }
  .wrap { max-width: none; padding: 0; }
  .cert { box-shadow: none; max-width: none; }
  @page { size: A4 landscape; margin: 12mm; }
}

/* admin v2 */
.modal.wide { max-width: 640px; }
.modal textarea.code { font-family: Consolas, monospace; font-size: 13px; min-height: 220px; }
.switch { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 15px; color: var(--ink); cursor: pointer; }
.switch input { width: 20px; height: 20px; min-height: 0; accent-color: var(--red); }
.tb { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.tb h2 { margin: 0; flex: 1; }

@media (max-width: 600px) {
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
  .mini-stats .k { font-size: 14px; }
  .vrow { grid-template-columns: 44px 1fr; }
  .vrow span { grid-column: 2; margin-top: -6px; }
  .say { width: 44px; height: 44px; }
  .chip { min-height: 44px; }
  .blank { width: 100px; min-height: 0; }
  .cert-in { padding: 24px 12px; }
  .cert-name { font-size: 28px; }
  .banner .btn { margin-left: 0; width: 100%; }
  .video .fs-btn { bottom: 8px; }
}

/* ===================== Kun / Tun rejimi ===================== */
:root { color-scheme: light; }
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1115; --card: #181b21; --ink: #e8e8ea; --ink2: #c9c9cf; --muted: #9aa0aa;
  --line: #2a2e36; --line2: #3a3f49; --soft: #20242b;
  --red: #e5384a; --red-dark: #c42433; --red-soft: #3a1a1f;
  --ok: #4ade80; --ok-bg: #11261a; --bad: #f87171; --bad-bg: #2b1515; --warn: #fbbf24; --warn-bg: #2a2210;
}
[data-theme="dark"] .tabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
[data-theme="dark"] .toast:not(.ok):not(.bad) { background: #2f343d; }
[data-theme="dark"] .ex.ok { border-color: #1f6b3a; }
[data-theme="dark"] .ex.bad { border-color: #7f2a2a; }
[data-theme="dark"] .ex.part, [data-theme="dark"] .banner.warn { border-color: #6b5313; }
[data-theme="dark"] .banner.ok { border-color: #1f6b3a; }
[data-theme="dark"] .order-ans .chip { border-color: #7a2b33; }
[data-theme="dark"] .modal-bg { background: rgba(0,0,0,.65); }
[data-theme="dark"] input:focus, [data-theme="dark"] select:focus, [data-theme="dark"] textarea:focus { outline-color: rgba(229,56,74,.4); }
/* sertifikat har doim oq qog'ozdek */
[data-theme="dark"] .cert { --card: #fff; --ink: #1d1d1f; --ink2: #444; --muted: #6b7280; --line: #eee; --red: #d81e2c; color: var(--ink); }
body, .card, .top, .lesson-item, .ex, input, select, textarea, .btn.ghost, .stat, .modal { transition: background-color .2s, color .2s, border-color .2s; }

.theme-btn {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line2); border-radius: 8px; background: var(--card); font-size: 20px; cursor: pointer;
}
.theme-btn:hover { border-color: var(--red); }
.login-box .card { position: relative; }
.login-box .theme-btn { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; font-size: 18px; }
@media print {
  :root, [data-theme="dark"] { --bg: #fff; --card: #fff; --ink: #1d1d1f; --muted: #6b7280; --line: #e5e7eb; color-scheme: light; }
}

/* ===================== Bo'limlar va dam olish ===================== */
.sections { display: grid; gap: 10px; }
.sec { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.sec-ic { width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--soft); display: grid; place-items: center; font-size: 20px; }
.sec-ic.big { width: 52px; height: 52px; font-size: 26px; }
.sec-t { flex: 1; min-width: 0; }
.sec-t b { display: block; }
.sec-r { display: flex; align-items: center; gap: 8px; flex: none; }
.sec.done .sec-ic { background: var(--ok-bg); color: var(--ok); font-weight: 800; }
.sec.open { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.sec.open .sec-ic { background: var(--red-soft); }
.sec.lock { opacity: .55; }
.sec.rest { border-style: dashed; }
.rest-cd { font-weight: 700; color: var(--warn); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sec-title { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.lesson-total { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.35); }
.rest-screen { text-align: center; padding: 28px 18px; }
.rest-emoji { font-size: 44px; }
.rest-big { font-size: 64px; font-weight: 800; line-height: 1.1; margin: 6px 0 8px; color: var(--red); font-variant-numeric: tabular-nums; }
.rest-tip { background: var(--soft); border-radius: 10px; padding: 12px 14px; margin-top: 10px; }
@media (max-width: 600px) {
  .sec { flex-wrap: wrap; }
  .sec-t { flex-basis: calc(100% - 60px); }
  .sec-r { width: 100%; justify-content: flex-end; }
  .rest-big { font-size: 56px; }
}

/* ===================== To'liq ekran (telefon) ===================== */
.video .fs-btn { top: 8px; bottom: auto; right: 8px; }
.video.pseudo-fs {
  position: fixed; inset: 0; z-index: 1000; margin: 0; padding-top: 0;
  width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; background: #000;
}
@media (orientation: portrait) {
  /* telefon tik turgan bo'lsa — videoni yonboshga buramiz */
  .video.pseudo-fs {
    inset: auto; top: 50%; left: 50%;
    width: 100vh; width: 100dvh; height: 100vw;
    transform: translate(-50%, -50%) rotate(90deg);
  }
}
.video.pseudo-fs .wm { font-size: 20px; }
.video.pseudo-fs .fs-btn, .video:fullscreen .fs-btn { top: 12px; right: 12px; background: rgba(0,0,0,.7); }
body.no-scroll { overflow: hidden; }
@media (max-width: 600px) { .video .fs-btn { bottom: auto; top: 8px; } }
.pc-top b, .pc-top > span:last-child { white-space: nowrap; }

/* suv belgisi — doim chap yuqori burchakda */
.video .wm { left: 12px !important; top: 10px !important; transition: none; font-size: 12px; color: rgba(255,255,255,.5); }
.video.pseudo-fs .wm, .video:fullscreen .wm { left: 18px !important; top: 14px !important; font-size: 15px; }

/* ===================== Jonli dars, jadval, davomat, tahlil ===================== */
.live-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); margin: 8px 0 12px; background: var(--card); border: 1px solid var(--line); }
.live-card.on { border-color: var(--red); background: var(--red-soft); }
.live-card .live-t { flex: 1; min-width: 0; }
.live-card .live-t b { display: block; }
.live-ic { font-size: 22px; }
.live-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); flex: none; animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(216,30,44,.6); } 70% { box-shadow: 0 0 0 10px rgba(216,30,44,0); } 100% { box-shadow: 0 0 0 0 rgba(216,30,44,0); } }
#lessons_page.stale ~ * { }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.day { display: inline-flex; margin: 0; cursor: pointer; }
.day input { display: none; }
.day span { min-width: 48px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line2); border-radius: 8px; color: var(--ink); font-weight: 600; background: var(--card); }
.day input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.att { display: inline-flex; gap: 4px; }
.att button { width: 40px; height: 36px; border: 1px solid var(--line2); border-radius: 8px; background: var(--card); color: var(--ink); cursor: pointer; font-size: 16px; }
.att button[data-v="present"].on { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.att button[data-v="late"].on { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.att button[data-v="absent"].on { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.rate { width: 70px; height: 6px; background: var(--soft); border-radius: 99px; overflow: hidden; margin-bottom: 4px; }
.rate > div { height: 100%; border-radius: 99px; }
@media (max-width: 600px) {
  .live-card { flex-wrap: wrap; }
  .live-card .btn { width: 100%; }
  .att button { width: 44px; height: 44px; }
}
