/* Raqamli ta’lim resurslari — videodarslar
   Dizayn tizimi v3: jiddiy va minimalistik. Sust ranglar (slate, po‘lat ko‘k, bronza), kichik radiuslar, tekis fonlar.
   Hamma shrift va rasmlar lokal: tashqi CDN kerak emas. */

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-wght-normal.9ef356ea553a.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-ext-wght-normal.c6ba61588d7d.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-cyrillic-wght-normal.d4a5d3021882.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-cyrillic-ext-wght-normal.8bc672637859.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Onest";
  src: url("../fonts/onest-latin-wght-normal.3db826ed1c5d.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest";
  src: url("../fonts/onest-latin-ext-wght-normal.3e2cb9888206.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  src: url("../fonts/onest-cyrillic-wght-normal.fe2bd26ae82a.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  src: url("../fonts/onest-cyrillic-ext-wght-normal.11a468877c94.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* ============================== Tokenlar ============================== */
:root {
  --ink: #2b1744;
  --ink-2: #3b2260;
  --ink-3: #5b2a86;
  --firuza: #5b2a86;           /* urg‘u: logotipdagi binafsha oilasidan to‘q plum */
  --firuza-strong: #471f6b;
  --firuza-soft: #eee8f6;
  --zafaron: #8a5300;
  --violet: #5b2a86;
  --magenta: #5b2a86;

  --page: #f7f6fa;
  --bg: #f7f6fa;
  --paper: #f7f6fa;
  --surface: #ffffff;
  --surface-2: #f0edf6;
  --line: #d9d6e3;             /* bezak hoshiya */
  --line-strong: #b9b4c9;
  --control: #85819a;          /* forma maydonlari hoshiyasi (3:1 dan yuqori) */
  --text: #1c1a26;
  --muted: #5c586b;
  --link: #4f2a9e;
  --danger: #b3261e;
  --ok: #17663f;
  --warn: #8a5300;

  --accent: var(--firuza);
  --accent-fg: #ffffff;
  --accent-soft: var(--firuza-soft);
  --focus: var(--firuza);

  --shadow-s: none;
  --shadow: 0 4px 16px rgb(28 26 38 / 0.10);
  --shadow-l: 0 12px 36px rgb(28 26 38 / 0.18);

  --r-s: 6px;
  --r-m: 8px;
  --r-l: 12px;
  --r-xl: 16px;
  --font: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Onest", "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1280px;
  --head-h: 72px;
  --side-w: 256px;

  --logo-ink: #1d1d1b;
  --head-bg: #ffffff;
  --head-hover: rgb(28 26 38 / 0.05);
  --head-field: #ffffff;
  --head-line: #d9d6e3;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --page: #14121a; --bg: #14121a; --paper: #14121a; --surface: #1d1a26; --surface-2: #25212f;
  --line: #3a3548; --line-strong: #4b455e; --control: #6e6988; --text: #e9e7f0; --muted: #a9a4ba; --link: #c3aef0;
  --firuza: #b79ce8; --firuza-strong: #cbb8f0; --firuza-soft: #2a2140;
  --accent: #b79ce8; --accent-fg: #14121a; --accent-soft: #2a2140; --focus: #b79ce8;
  --zafaron: #e3b15c;
  --danger: #f2908a; --ok: #6ccb95; --warn: #e3b15c;
  --shadow: 0 4px 16px rgb(0 0 0 / 0.4); --shadow-l: 0 12px 36px rgb(0 0 0 / 0.55);
  --logo-ink: #1d1d1b; --head-bg: #1d1a26; --head-hover: rgb(255 255 255 / 0.06); --head-field: #1d1a26; --head-line: #3a3548;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #14121a; --bg: #14121a; --paper: #14121a; --surface: #1d1a26; --surface-2: #25212f;
    --line: #3a3548; --line-strong: #4b455e; --control: #6e6988; --text: #e9e7f0; --muted: #a9a4ba; --link: #c3aef0;
    --firuza: #b79ce8; --firuza-strong: #cbb8f0; --firuza-soft: #2a2140;
    --accent: #b79ce8; --accent-fg: #14121a; --accent-soft: #2a2140; --focus: #b79ce8;
    --zafaron: #e3b15c;
    --danger: #f2908a; --ok: #6ccb95; --warn: #e3b15c;
    --shadow: 0 4px 16px rgb(0 0 0 / 0.4); --shadow-l: 0 12px 36px rgb(0 0 0 / 0.55);
    --logo-ink: #1d1d1b; --head-bg: #1d1a26; --head-hover: rgb(255 255 255 / 0.06); --head-field: #1d1a26; --head-line: #3a3548;
    color-scheme: dark;
  }
}

/* ============================== Asos ============================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 12px); }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.55; color: var(--text); background: var(--page);
  font-feature-settings: "tnum" 1; min-height: 100vh;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-size-adjust: none;
}
main { flex: 1 0 auto; }
img, svg, video { max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--zafaron) 45%, transparent); }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.005em; margin: 0 0 0.5em; font-weight: 650; }
h1, h2 { font-family: var(--serif); font-weight: 650; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.65rem, 1.15rem + 1.9vw, 2.45rem); font-weight: 650; }
h2 { font-size: 1.22rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); padding-inline: clamp(1rem, 2.4vw, 2rem); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 200; background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: var(--r-s); text-decoration: none; font-weight: 600; transition: top 0.15s; }
.skip-link:focus { top: 0.75rem; }
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ============================== Sarlavha ============================== */
.app { min-height: 100vh; background: var(--bg); }
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: calc(100vh - var(--head-h)); }
.main { min-width: 0; display: flex; flex-direction: column; }
.scrim, .side-top, .side-close, .theme-mini { display: none; }

/* ----- Yuqori panel (☰ + logo + qidiruv) ----- */
.topbar {
  position: sticky; top: 0; z-index: 70; display: flex; align-items: center; gap: 1rem; height: var(--head-h); padding: 0 clamp(0.75rem, 2vw, 1.5rem);
  background: var(--bg);
}
.top-left { display: flex; align-items: center; gap: 0.6rem; flex: none; }
.brand { display: flex; align-items: center; text-decoration: none; flex: none; min-width: 0; padding: 0.2rem 0.4rem; border-radius: var(--r-m); }
.brand:hover { text-decoration: none; }
.logo { height: 32px; width: auto; display: block; max-width: 100%; overflow: visible; }
.logo-text { fill: var(--logo-ink); }
.logo-shade { fill: #1d1d1b; }
.header-search { position: relative; flex: 1; max-width: 640px; margin-inline: auto; display: flex; align-items: center; }
.header-search .ico { position: absolute; left: 1rem; color: var(--muted); pointer-events: none; }
.header-search input {
  width: 100%; height: 44px; border: 1px solid var(--control); background: var(--surface); color: var(--text); border-radius: var(--r-m); padding: 0 3.4rem 0 2.9rem;
  font: inherit; font-size: 1rem; transition: border-color 0.15s, box-shadow 0.15s;
}
.header-search input::placeholder { color: var(--muted); }
.header-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.header-search kbd { position: absolute; right: 0.9rem; font: inherit; font-size: 0.75rem; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 0.45rem; pointer-events: none; }
.header-search input:focus ~ kbd { display: none; }
.header-search button[type="submit"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.top-actions { display: flex; align-items: center; gap: 0.6rem; flex: none; }
.upload-btn, .top-login { height: 44px; }
.upload-btn { padding-inline: 1.1rem; }
.icon-btn { width: 42px; height: 42px; border: 1px solid transparent; border-radius: var(--r-m); background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; padding: 0; transition: background 0.15s; flex: none; }
.icon-btn:hover { background: var(--surface-2); }
.me .icon-btn, .side-foot .icon-btn { border-color: var(--line); color: var(--muted); }

/* ----- Yon panel ----- */
.sidebar {
  position: sticky; top: var(--head-h); align-self: start; height: calc(100vh - var(--head-h)); overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column;
  padding: 0.9rem 0.75rem 0; background: var(--bg);
  scrollbar-width: thin; scrollbar-color: transparent transparent; scrollbar-gutter: stable; transition: scrollbar-color 0.4s ease;
}
.sidebar:hover { scrollbar-color: var(--line-strong) transparent; }
/* eski Safari uchun (standart xususiyat qo‘llanmasa) */
.sidebar::-webkit-scrollbar { width: 10px; }
.sidebar::-webkit-scrollbar-thumb { background-color: transparent; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; transition: background-color 0.4s ease; }
.sidebar:hover::-webkit-scrollbar-thumb { background-color: var(--line-strong); }
.side-label { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 0 0.9rem; margin: 0.3rem 0 0.4rem; font-weight: 600; }
.side-nav { display: grid; gap: 2px; margin-bottom: 0.8rem; }
.side-nav a, .side-switch {
  display: flex; align-items: center; gap: 0.9rem; width: 100%; padding: 0.7rem 0.9rem; border: 0; border-radius: var(--r-m); background: none; color: var(--text);
  font: inherit; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; transition: background 0.15s, color 0.15s; white-space: nowrap;
}
.side-nav a .ico, .side-switch .ico { color: var(--muted); }
.side-nav a:hover, .side-switch:hover { background: var(--surface-2); text-decoration: none; }
.side-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.side-nav a[aria-current="page"] .ico { color: var(--accent); }
.side-switch .switch { margin-left: auto; position: relative; width: 38px; height: 22px; border-radius: 99px; background: var(--line-strong); transition: background 0.2s; flex: none; }
.side-switch .switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); transition: transform 0.2s; }
.side-switch[aria-pressed="true"] .switch { background: var(--accent); }
.side-switch[aria-pressed="true"] .switch::after { transform: translateX(16px); }
.side-sep { height: 1px; background: var(--line); margin: 0.2rem 0.4rem 0.9rem; }
.side-subjects { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 1px; }
.side-subjects a { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.55rem 0.9rem; border-radius: var(--r-m); color: var(--text); text-decoration: none; font-size: 0.97rem; transition: background 0.15s; }
.side-subjects a:hover { background: var(--surface-2); text-decoration: none; }
.side-subjects a[aria-current="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.s-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-cnt { flex: none; color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.side-foot { margin-top: auto; position: sticky; bottom: 0; background: var(--bg); padding: 0.9rem 0.2rem 1rem; display: grid; gap: 0.6rem; }
.me { display: flex; align-items: center; gap: 0.5rem; }
.me-link { display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0; color: var(--text); text-decoration: none; }
.me-link:hover { text-decoration: none; }
.me-name { display: grid; min-width: 0; line-height: 1.25; }
.me-name b { font-size: 0.95rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-name small { color: var(--muted); font-size: 0.8rem; }
.logout-form { margin: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 650; font-size: 0.85rem; flex: none; overflow: hidden; }
img.avatar { object-fit: cover; background: var(--line); }

/* ----- Yig‘ilgan (ikonkali) panel: faqat kompyuterda ----- */
@media (min-width: 1001px) {
  html.side-collapsed .shell { grid-template-columns: 76px minmax(0, 1fr); }
  html.side-collapsed .sidebar { padding-inline: 0.45rem; scrollbar-gutter: auto; }
  html.side-collapsed .side-label, html.side-collapsed .side-sep, html.side-collapsed .side-subjects,
  html.side-collapsed .side-nav a span, html.side-collapsed .side-switch .lbl, html.side-collapsed .side-switch .switch,
  html.side-collapsed .side-foot .btn, html.side-collapsed .me-name { display: none; }
  html.side-collapsed .side-nav a, html.side-collapsed .side-switch { justify-content: center; padding: 0.85rem 0; }
  html.side-collapsed .me { flex-direction: column; }
}

/* ============================== Xabarlar (toast) ============================== */
.messages { position: fixed; z-index: 120; right: 1rem; bottom: 1rem; left: 1rem; list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; justify-items: end; pointer-events: none; }
.messages li {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 0.7rem; width: min(100%, 420px); padding: 0.8rem 0.9rem 0.8rem 1rem; border-radius: var(--r-m);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); box-shadow: var(--shadow-l); animation: toast-in 0.2s ease-out;
}
.messages li.leaving { opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s; }
.messages .success { border-left-color: var(--ok); }
.messages .error { border-left-color: var(--danger); }
.messages .info, .messages .warning { border-left-color: var(--zafaron); }
.messages .msg-x { margin-left: auto; flex: none; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 0 0.2rem; }
.messages .msg-x:hover { color: var(--text); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ============================== Tugmalar va formalar ============================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border: 1px solid var(--accent); background: var(--accent);
  color: var(--accent-fg); padding: 0.6rem 1.1rem; border-radius: var(--r-m); font: inherit; font-weight: 600; font-size: 0.93rem; cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:hover { background: var(--firuza-strong); border-color: var(--firuza-strong); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.btn.danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn.danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); box-shadow: none; }
.btn.small { padding: 0.4rem 0.85rem; font-size: 0.85rem; }
.btn.lg { padding: 0.85rem 1.5rem; font-size: 1.02rem; }
.btn.block { width: 100%; }
.btn.light { background: #fff; color: var(--ink); border-color: #fff; }
.btn.light:hover { background: #eaf1fb; border-color: #eaf1fb; color: var(--ink); }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.92rem; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="search"], .field input[type="number"], .field input[type="tel"], .field input[type="url"],
.field select, .field textarea, .field input[type="file"] {
  width: 100%; padding: 0.62rem 0.8rem; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--surface); color: var(--text); font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input[type="file"] { padding: 0.5rem; }
.field input[type="file"]::file-selector-button { margin-right: 0.8rem; border: 0; background: var(--accent-soft); color: var(--accent); padding: 0.45rem 0.9rem; border-radius: var(--r-m); font: inherit; font-weight: 600; cursor: pointer; }
.field textarea { resize: vertical; min-height: 6rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.field .help, .help { color: var(--muted); font-size: 0.85rem; margin-top: 0.35rem; }
.field .errorlist, .errorlist { list-style: none; margin: 0.35rem 0 0; padding: 0; color: var(--danger); font-size: 0.88rem; font-weight: 500; }
.field:has(.errorlist) input, .field:has(.errorlist) select, .field:has(.errorlist) textarea { border-color: var(--danger); }
.panel > .errorlist, form > .errorlist { background: color-mix(in srgb, var(--danger) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); padding: 0.7rem 1rem; border-radius: var(--r-m); margin: 0 0 1.1rem; }
.field-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.checkbox { display: flex; gap: 0.6rem; align-items: center; }
.checkbox input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }
.checkbox label { margin: 0; font-weight: 500; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 3rem !important; }
.pw-toggle { position: absolute; right: 0.35rem; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; color: var(--muted); border-radius: 50%; cursor: pointer; display: grid; place-items: center; padding: 0; }
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 1.4rem; }
.panel + .panel { margin-top: 1.25rem; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }


.btn { border-radius: var(--r-m); }
.btn.secondary { background: var(--surface); border-color: var(--control); }

/* ============================== Kirish / ro‘yxat ============================== */
.auth-shell { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: 3rem; align-items: center; padding-block: 2.5rem 3.5rem; min-height: calc(100vh - var(--head-h) - 200px); }
.auth-aside {
  position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 2.5rem; color: #fff; min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(160deg, #2b1744, #4a2475);
}
.auth-aside::before { content: ""; position: absolute; left: 2.5rem; top: 2.5rem; width: 48px; height: 3px; background: var(--zafaron); }
.auth-aside > * { position: relative; }
.auth-aside h2 { color: #fff; font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem); line-height: 1.15; margin-bottom: 1.2rem; }
.auth-aside ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.auth-aside li { display: flex; gap: 0.7rem; align-items: flex-start; color: #dbe6f5; }
.auth-aside li .ico { margin-top: 0.2rem; color: #e3c88a; }
.auth { width: 100%; max-width: 520px; margin: 0 auto; }
.auth.wide { max-width: 800px; padding-block: 2.5rem; }
.auth h1 { margin-bottom: 0.4rem; }
.auth .lead { color: var(--muted); margin-bottom: 1.6rem; font-size: 1.02rem; }
.auth .panel { padding: 1.6rem; }
.auth-shell .auth { margin: 0; max-width: 480px; justify-self: center; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.role-card { display: grid; gap: 0.5rem; align-content: start; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color 0.15s; }
.role-card:hover { border-color: var(--accent); text-decoration: none; }
.role-card b { font-size: 1.15rem; }
.role-ico { width: 48px; height: 48px; border-radius: var(--r-m); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.hemis-box { margin-top: 1.5rem; }
.hemis-title { display: flex; align-items: center; gap: 0.8rem; color: var(--muted); font-size: 0.86rem; margin-bottom: 0.8rem; }
.hemis-title::before, .hemis-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.hemis-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.hemis-btns .btn { text-align: center; }

/* ============================== Bosh sahifa ============================== */
.page { padding: 0.3rem clamp(1rem, 2.4vw, 2rem) 2.5rem; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.2rem; align-items: start; }
.sec-head { display: flex; align-items: center; gap: 0.9rem; margin: 0.6rem 0 1.3rem; flex-wrap: wrap; }
.sec-head.sm { margin: 0 0 0.9rem; }
.sec-head h1, .sec-head h2 { margin: 0; font-size: 1.4rem; }
.sec-head.sm h2 { font-size: 1.1rem; }
.sec-ico { width: 40px; height: 40px; border-radius: var(--r-m); background: var(--surface-2); color: var(--muted); display: grid; place-items: center; flex: none; }
.sec-title { min-width: 0; }
.sec-title .count { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.1rem; }
.sec-title .count a { color: var(--accent); }
.sec-head .sort-bar { margin-left: auto; }

.chips-scroll { display: none; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; margin: 0 -0.2rem 1.3rem; padding: 2px 0.2rem; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; padding: 0.45rem 0.9rem; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-size: 0.88rem; font-weight: 560; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.chip:hover { color: var(--text); border-color: var(--line-strong); text-decoration: none; }
.chip[aria-current="true"] { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip span { font-size: 0.76rem; opacity: 0.75; font-variant-numeric: tabular-nums; }
.sort-bar { display: inline-flex; gap: 0.35rem; flex-wrap: wrap; }

.page-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1rem 1.25rem; }
.page-head h1 { margin: 0; }
.page-head .count { color: var(--muted); }
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.catalog { padding-bottom: 2.5rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 2.4rem 1.8rem; }

/* ----- Video kartasi ----- */
.vcard { display: block; color: inherit; text-decoration: none; }
.vcard:hover { text-decoration: none; }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r-l); overflow: hidden; isolation: isolate; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vcard:hover .thumb { box-shadow: var(--shadow); }
.thumb .play { position: absolute; z-index: 3; left: 50%; top: 50%; width: 76px; height: 52px; margin: -26px 0 0 -38px; border-radius: 15px; display: grid; place-items: center; background: var(--ink); color: #fff; opacity: 0; transform: scale(0.9); transition: opacity 0.18s, transform 0.18s; box-shadow: 0 4px 14px rgb(0 0 0 / 0.3); }
.thumb .play svg { width: 32px; height: 32px; margin: 0; fill: #fff; }
.vcard:hover .thumb .play, .vcard:focus-visible .thumb .play { opacity: 1; transform: none; }
.thumb.empty { background: var(--ink-2); }
.thumb > .dur { position: absolute; z-index: 2; right: 0.6rem; bottom: 0.6rem; background: rgb(20 18 26 / 0.85); color: #fff; font-size: 0.78rem; font-weight: 600; padding: 0.1rem 0.45rem; border-radius: 4px; font-variant-numeric: tabular-nums; }
.thumb .state { position: absolute; left: 0.6rem; top: 0.6rem; background: var(--zafaron); color: #2a1c00; font-size: 0.78rem; font-weight: 650; padding: 0.1rem 0.5rem; border-radius: 8px; }
.vbody { display: block; margin-top: 0.8rem; }
.vtitle { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; font-size: 1.04rem; line-height: 1.35; letter-spacing: -0.005em; transition: color 0.15s; overflow-wrap: anywhere; }
.vcard:hover .vtitle { color: var(--accent); }
.vmeta { display: flex; flex-wrap: wrap; gap: 0 0.5rem; color: var(--muted); font-size: 0.92rem; margin-top: 0.2rem; }
.vmeta.sub { font-size: 0.85rem; margin-top: 0.1rem; }
.vmeta .own { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.empty-state { padding: 3.5rem 1.5rem; text-align: center; color: var(--muted); border: 1.5px dashed var(--line-strong); border-radius: var(--r-l); }
.empty-state .ico { width: 44px; height: 44px; color: var(--muted); margin-bottom: 0.8rem; stroke-width: 1.5; }
.empty-state h2 { color: var(--text); }
.pager { display: flex; gap: 0.6rem; justify-content: center; margin-top: 2.5rem; align-items: center; }
.pager .cur { color: var(--muted); padding: 0 0.6rem; font-variant-numeric: tabular-nums; }

/* ----- O‘ng ustun ----- */
.rail { display: grid; gap: 1.2rem; position: sticky; top: calc(var(--head-h) + 0.5rem); }
.rail-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 1.2rem; }
.t-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.t-item { display: flex; align-items: center; gap: 0.8rem; padding: 0.55rem 0.5rem; margin-inline: -0.5rem; border-radius: var(--r-m); color: var(--text); text-decoration: none; transition: background 0.15s; }
.t-item:hover { background: var(--surface-2); text-decoration: none; }
.t-item .avatar { width: 44px; height: 44px; }
.t-name { display: grid; min-width: 0; line-height: 1.25; }
.t-name b { font-size: 0.95rem; font-weight: 650; }
.t-name small { color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.3rem 0.9rem; }
.stat-card > div { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.st-ico { flex: none; display: grid; place-items: center; color: var(--accent); }
.st-ico .ico { width: 40px; height: 40px; stroke-width: 1.6; }
.st-txt { display: grid; min-width: 0; line-height: 1.15; }
.st-txt b { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.st-txt span { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.profile-head { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin: 0.6rem 0 1.8rem; padding: 1.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.profile-head .avatar { width: 88px; height: 88px; font-size: 1.7rem; }
.profile-head .ph-text { flex: 1; min-width: 200px; }
.profile-head h1 { margin: 0.2rem 0 0; font-size: 1.6rem; }
.profile-head p { margin: 0.2rem 0 0; }
.ph-count { text-align: center; padding-inline: 1rem; }
.ph-count b { display: block; font-size: 1.8rem; line-height: 1; }
.ph-count span { color: var(--muted); font-size: 0.85rem; }

/* ============================== Ko‘rish sahifasi ============================== */
.stage { padding: 0.3rem clamp(1rem, 2.4vw, 2rem) 0; }
.stage .player-wrap { width: 100%; }
.player-box { position: relative; border-radius: var(--r-xl); overflow: hidden; background: #000; aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.player-box .plyr, .player-box video { width: 100%; height: 100%; }
.player-box .plyr { --plyr-color-main: #b79ce8; --plyr-video-control-background-hover: #b79ce8; --plyr-font-family: var(--font); --plyr-range-fill-background: #b79ce8; --plyr-menu-radius: 8px; --plyr-control-radius: 6px; }
.player-box .plyr--video .plyr__control--overlaid { background: #2b1744; border-radius: 15px; width: 84px; height: 58px; padding: 0; display: flex; align-items: center; justify-content: center; }
.player-box .plyr--video .plyr__control--overlaid svg { width: 36px; height: 36px; margin: 0; left: 0; fill: #fff; }
.player-box .plyr--video .plyr__control--overlaid:hover { background: #3b2260; color: #fff; }
.player-box .plyr__menu__container { font-family: var(--font); }
.player-state {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; padding: 2rem;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.1' stroke-width='1.2'%3E%3Crect x='11' y='11' width='26' height='26'/%3E%3Crect x='11' y='11' width='26' height='26' transform='rotate(45 24 24)'/%3E%3C/g%3E%3C/svg%3E"),
    var(--ink-2);
}
.player-state h2 { color: #fff; margin-bottom: 0.4rem; }
.player-state p { color: #c4d3e6; max-width: 46ch; margin-inline: auto; }
.player-state.err { background: rgb(8 16 30 / 0.92); z-index: 10; }
.bar { height: 6px; border-radius: 3px; background: rgb(255 255 255 / 0.18); overflow: hidden; width: min(360px, 80vw); margin: 1rem auto 0; }
.bar > i { display: block; height: 100%; background: #b79ce8; width: 0; transition: width 0.4s ease; }
.toast-resume { position: absolute; left: 1rem; bottom: 4.4rem; z-index: 5; background: rgb(15 22 32 / 0.92); color: #fff; padding: 0.5rem 0.8rem; border-radius: 12px; display: flex; gap: 0.8rem; align-items: center; font-size: 0.9rem; }
.toast-resume button { background: none; border: 0; color: #cbb8f0; font: inherit; font-weight: 650; cursor: pointer; padding: 0; }
.qar-chapter-mark { position: absolute; top: 50%; width: 3px; height: 9px; margin-top: -4.5px; background: rgb(255 255 255 / 0.9); border-radius: 1px; pointer-events: none; transform: translateX(-1px); z-index: 2; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.25); }
.qar-chapter-tip { position: absolute; bottom: 100%; margin-bottom: 38px; background: rgb(8 20 38 / 0.92); color: #fff; padding: 0.15rem 0.5rem; border-radius: 3px; font-size: 0.8rem; white-space: nowrap; pointer-events: none; transform: translateX(-50%); z-index: 6; }

.watch-body { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 2.2rem; padding-block: 1.5rem 3rem; align-items: start; }
.watch-main h1 { margin-bottom: 0.7rem; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); overflow-wrap: anywhere; font-weight: 650; }
.watch-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; align-items: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 1.1rem; }
.watch-meta .dotsep::before { content: "·"; margin-right: 0.6rem; }
.byline { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; padding-block: 0.9rem; border-block: 1px solid var(--line); }
.owner { display: flex; align-items: center; gap: 0.75rem; min-width: 0; margin-right: auto; text-decoration: none; color: var(--text); }
.owner:hover { text-decoration: none; }
.owner .avatar { width: 46px; height: 46px; font-size: 0.95rem; }
.owner b { display: block; font-weight: 650; line-height: 1.2; }
.owner > span:last-child { min-width: 0; }
.owner:hover b { color: var(--accent); }
.owner > span:last-child > span { display: block; color: var(--muted); font-size: 0.85rem; line-height: 1.3; }
.byline-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.byline .owner { flex: 1 1 220px; }
.byline-group { display: contents; }
@media (max-width: 760px) {
  .byline { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; column-gap: 0.5rem; row-gap: 0.8rem; }
  .byline .owner { grid-column: 1; grid-row: 1; margin-right: 0; }
  .byline-actions { display: contents; }
  .byline .sub-btn { grid-column: 2; grid-row: 1; width: 44px; padding: 0; justify-content: center; gap: 0; }
  .byline .sub-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .byline .wmenu { grid-column: 3; grid-row: 1; }
  .byline-group { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; grid-column: 1 / -1; grid-row: 2; }
}
.badge { display: inline-flex; align-items: center; padding: 0.1rem 0.55rem; border-radius: var(--r-m); background: var(--accent-soft); color: var(--accent); font-size: 0.82rem; font-weight: 620; text-decoration: none; }
a.badge:hover { background: var(--accent); color: var(--accent-fg); text-decoration: none; }
.desc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 1rem 1.2rem; margin-top: 1rem; }
.desc { white-space: pre-line; overflow-wrap: anywhere; max-width: 78ch; }
.desc.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.desc-more { margin-top: 0.4rem; background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 650; cursor: pointer; }
.section-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 1.25rem 1.25rem 0.75rem; margin-top: 1.5rem; }
.section-card h2 { display: flex; align-items: center; gap: 0.5rem; font-size: 1.1rem; }
.chapters { list-style: none; margin: 0; padding: 0; }
.chapters li button {
  display: grid; grid-template-columns: 4.6rem 1fr; gap: 0.75rem; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line);
  padding: 0.7rem 0.6rem; font: inherit; color: var(--text); cursor: pointer; border-left: 3px solid transparent; border-radius: 0;
}
.chapters li:first-child button { border-top: 0; }
.chapters li button:hover { background: var(--surface-2); }
.chapters li.current button { border-left-color: var(--zafaron); background: var(--surface-2); font-weight: 650; }
.chapters .t { color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 640; }
.share-grid { display: grid; gap: 0.9rem; }
.copyrow { display: flex; gap: 0.5rem; }
.copyrow input, .copyrow textarea { flex: 1; min-width: 0; padding: 0.55rem 0.75rem; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--surface-2); color: var(--text); font: inherit; font-size: 0.85rem; }
.copyrow .btn { align-self: flex-start; flex: none; }

.copyrow textarea { resize: none; min-height: 6.5rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78rem; }
.side h2 { font-size: 1.05rem; margin-bottom: 1rem; }
.side { position: sticky; top: calc(var(--head-h) + 0.5rem); }
.side .vcard + .vcard { margin-top: 1rem; }
.side .vcard { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 0.85rem; align-items: start; }
.side .thumb { border-radius: var(--r-m); }
.side .thumb .play { display: none; }
.side .vbody { display: flex; margin-top: 0; }
.side .vbody .avatar { display: none; }
.side .vtitle { font-size: 0.93rem; -webkit-line-clamp: 3; }
.side .vbody .vmeta { font-size: 0.85rem; }
.side .vmeta { font-size: 0.8rem; }

/* ============================== Kabinet ============================== */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }
.stat { position: relative; padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.stat b { display: block; font-size: 1.75rem; font-weight: 650; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat span { color: var(--muted); font-size: 0.88rem; }
.quota { height: 7px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-top: 0.6rem; }
.quota i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.vtable { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.vtable th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.vtable td { padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.vtable tbody tr { transition: background 0.12s; }
.vtable tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.vtable tr:last-child td { border-bottom: 0; }
.vtable .title-cell { display: grid; grid-template-columns: 128px 1fr; gap: 1rem; align-items: center; min-width: 340px; }
.vtable .title-cell .thumb { border-radius: var(--r-s); animation: none; }
.vtable .title-cell a.t { color: var(--text); font-weight: 650; text-decoration: none; }
.vtable .title-cell a.t:hover { color: var(--accent); }
.dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--muted); margin-right: 0.45rem; }
.dot.ready { background: var(--ok); }
.dot.failed { background: var(--danger); }
.dot.processing, .dot.queued, .dot.uploading { background: var(--zafaron); }
.mini-bar { height: 5px; background: var(--surface-2); border-radius: 3px; margin-top: 0.4rem; overflow: hidden; width: 150px; }
.mini-bar i { display: block; height: 100%; background: var(--zafaron); width: 0; transition: width 0.4s; }
.notice { display: flex; gap: 0.8rem; border: 1px solid color-mix(in srgb, var(--zafaron) 55%, var(--line)); background: color-mix(in srgb, var(--zafaron) 12%, var(--surface)); padding: 1rem 1.2rem; border-radius: var(--r-m); margin-bottom: 1.5rem; }
.notice.danger { border-color: color-mix(in srgb, var(--danger) 50%, var(--line)); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.err-pre { white-space: pre-wrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.8rem; background: var(--surface-2); padding: 0.7rem; border-radius: var(--r-s); max-height: 12rem; overflow: auto; }

/* ============================== Yuklash ============================== */
.upload-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2rem; padding-block: 1rem 3.5rem; align-items: start; }
.drop {
  display: block; position: relative; border: 1.5px dashed var(--line-strong); border-radius: var(--r-l); padding: 2.6rem 1.5rem; text-align: center; cursor: pointer;
  background: var(--surface); transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.drop:hover, .drop.over { background: var(--accent-soft); border-color: var(--accent); }
.drop .drop-ico { width: 52px; height: 52px; border-radius: var(--r-m); margin: 0 auto 1rem; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.drop .drop-ico .ico { width: 30px; height: 30px; }
.drop b { display: block; font-size: 1.2rem; margin-bottom: 0.3rem; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.up-file { margin-top: 1.25rem; }
.up-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.88rem; margin-top: 0.4rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.up-bar { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.up-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width 0.2s; }
.up-actions { display: flex; gap: 0.6rem; margin-top: 1rem; flex-wrap: wrap; }
.up-msg { margin-top: 0.8rem; font-size: 0.92rem; }
.up-msg.err { color: var(--danger); }
.up-list { display: grid; gap: 0.8rem; margin-top: 1.1rem; }
.up-item { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.up-item[data-state="done"] { border-color: var(--ok); }
.up-item[data-state="error"] { border-color: var(--danger); }
.up-item[data-state="queued"] { opacity: 0.85; }
.up-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.up-name { overflow-wrap: anywhere; }
.up-title { width: 100%; margin-top: 0.5rem; padding: 0.55rem 0.8rem; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: var(--surface); color: var(--text); font: inherit; font-size: 0.94rem; }
.up-title:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.up-title:disabled { opacity: 0.7; }
.up-item .up-bar { margin-top: 0.7rem; }
.up-item .up-actions { margin-top: 0.7rem; }
#up-notice, #up-summary { margin-top: 0.8rem; }

/* ============================== Tahrirlash ============================== */
.manage-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 2rem; padding-block: 1.5rem 3.5rem; align-items: start; }
.back-link { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 560; }
.back-link:hover { color: var(--accent); }
.sub-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.sub-list li { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sub-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.inline-form { display: inline; margin: 0; }
.tabs-anchor { scroll-margin-top: calc(var(--head-h) + 1rem); }

/* ============================== Pastki qism ============================== */
.site-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 0.6rem 1.5rem; flex-wrap: wrap; padding: 1.2rem clamp(1rem, 2.4vw, 2rem) 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.foot-links { display: flex; gap: 1.2rem; }

/* ============================== Embed ============================== */
body.embed { background: #000; display: block; min-height: 0; overflow: hidden; }
body.embed .player-box { border-radius: 0; box-shadow: none; position: fixed; inset: 0; aspect-ratio: auto; }
.embed-blocked { min-height: 100vh; display: grid; place-items: center; background: var(--ink); color: #fff; text-align: center; padding: 1.5rem; }
.embed-blocked > div { max-width: 460px; }
.embed-blocked .lock { width: 64px; height: 64px; border-radius: var(--r-m); margin: 0 auto 1rem; display: grid; place-items: center; background: rgb(255 255 255 / 0.1); }
.embed-blocked .lock .ico { width: 28px; height: 28px; }
.embed-blocked h2 { color: #fff; }
.embed-blocked p { color: #c4d3e6; }
.embed-blocked a:not(.btn) { color: #c3a566; }
body.embed .embed-link { position: absolute; top: 0.7rem; left: 0.9rem; z-index: 8; color: #fff; font-size: 0.85rem; font-weight: 600; text-decoration: none; background: rgb(8 20 38 / 0.7);  padding: 0.25rem 0.75rem; border-radius: var(--r-m); opacity: 0; transition: opacity 0.2s; }
body.embed .player-box:hover .embed-link, body.embed .embed-link:focus-visible { opacity: 1; }

/* ============================== Pleyer: bob nomi ============================== */
.plyr .qar-chapter-now { color: #fff; font-size: 0.82rem; font-weight: 600; margin-left: 0.4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28%; opacity: 0.92; }
.plyr .qar-chapter-now:empty { display: none; }
.plyr__progress { position: relative; }

/* ============================== Profil rasmi ============================== */
.avatar-card { display: flex; gap: 1.5rem; align-items: center; margin-bottom: 1.5rem; padding: 1.2rem 1.3rem; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface-2); }
.avatar-info { min-width: 0; }
.avatar-info h2 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.avatar-info .help { margin: 0 0 0.2rem; }
.avatar-lg {
  position: relative; width: 112px; height: 112px; flex: none; border-radius: 50%; overflow: hidden; cursor: pointer;
  background: var(--ink-3); color: #fff; display: grid; place-items: center; font-size: 2.1rem; font-weight: 600;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--line-strong);
}
.avatar-lg:has(> img) { background: var(--surface); }
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-cam { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(0 0 0 / 0.5); color: #fff; opacity: 0; transition: opacity 0.15s; }
.avatar-lg:hover .avatar-cam, .avatar-lg:focus-within .avatar-cam { opacity: 1; }
.avatar-actions { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-top: 0.6rem; }
.avatar-actions .btn { cursor: pointer; }
.check { display: inline-flex; gap: 0.4rem; align-items: center; font-size: 0.9rem; cursor: pointer; }
.cropper { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 1.5rem; align-items: start; margin-bottom: 1.5rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface-2); }
.crop-main { display: grid; gap: 0.6rem; justify-items: center; }
.crop-stage { position: relative; width: 100%; max-width: 320px; aspect-ratio: 1; touch-action: none; border-radius: var(--r-m); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.crop-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.crop-stage canvas:active { cursor: grabbing; }
.crop-stage canvas:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.crop-mask { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at center, transparent 0 70%, rgb(8 18 32 / 0.6) 70.4%); }
.crop-zoom { display: flex; align-items: center; gap: 0.5rem; width: 100%; max-width: 320px; }
.zoom-btn { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: 1.2rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.zoom-btn:hover { border-color: var(--accent); color: var(--accent); }
.crop-zoom input { flex: 1; accent-color: var(--accent); }
.help.center { text-align: center; margin: 0; }
.crop-side { display: grid; gap: 0.8rem; justify-items: start; align-content: start; }
.crop-previews { display: flex; align-items: flex-end; gap: 1.25rem; }
.crop-previews figure { margin: 0; display: grid; justify-items: center; gap: 0.35rem; }
.crop-previews figcaption { font-size: 0.78rem; color: var(--muted); }
.avatar-card.over { border-color: var(--accent); background: var(--accent-soft); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.crop-prev { border-radius: 50%; display: block; background: #fff; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line-strong); }

/* ============================== Subtitr tahrirlagich ============================== */
.sub-edit { display: grid; grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.5fr); gap: 1.5rem; align-items: start; padding-bottom: 3rem; }
.sub-edit-side { position: sticky; top: calc(var(--head-h) + 0.75rem); }
.find-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0.4rem; }
.find-row input { min-width: 0; padding: 0.5rem 0.7rem; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: var(--surface); color: var(--text); font: inherit; font-size: 0.9rem; }
.sub-save { display: flex; gap: 0.6rem; margin-top: 1rem; flex-wrap: wrap; }
#save-info.err { color: var(--danger); }
.cue-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.7rem; }
.cue-list { display: grid; gap: 0.55rem; }
.cue { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; grid-template-areas: "n times tools" "n text text" "n info info"; gap: 0.35rem 0.7rem; padding: 0.75rem 0.85rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.cue.active { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.cue.bad { border-color: var(--danger); }
.cue-n { grid-area: n; color: var(--muted); font-size: 0.82rem; padding-top: 0.45rem; text-align: right; font-variant-numeric: tabular-nums; }
.cue-times { grid-area: times; display: flex; align-items: center; gap: 0.4rem; color: var(--muted); }
.cue-times input.t { width: 6.6rem; padding: 0.3rem 0.45rem; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: var(--surface-2); color: var(--text); font: inherit; font-size: 0.88rem; font-variant-numeric: tabular-nums; text-align: center; }
.cue-times input.t.err { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface-2)); }
.cue textarea { grid-area: text; width: 100%; resize: vertical; min-height: 3.2rem; padding: 0.5rem 0.65rem; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: var(--surface-2); color: var(--text); font: inherit; line-height: 1.4; }
.cue textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.cue-info { grid-area: info; font-size: 0.78rem; color: var(--muted); }
.cue-info.warn, .cue.bad .cue-info { color: var(--danger); }
.cue-tools { grid-area: tools; display: flex; gap: 0.25rem; flex-wrap: wrap; justify-content: flex-end; }
.cue-btn { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: var(--r-s); padding: 0.2rem 0.55rem; font: inherit; font-size: 0.8rem; cursor: pointer; min-height: 30px; }
.cue-btn:hover { border-color: var(--accent); color: var(--accent); }
.cue-btn.play { color: var(--accent); font-weight: 700; }
.cue-btn.del:hover { border-color: var(--danger); color: var(--danger); }

/* ============================== Like va izohlar ============================== */
.react-bar { position: relative; display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--surface); }
.react-bar .react-msg { position: absolute; top: calc(100% + 0.35rem); left: 0.5rem; white-space: nowrap; font-size: 0.8rem; }
.react-btn:first-child { border-radius: var(--r-m) 0 0 var(--r-m); }
.react-btn:nth-child(2) { border-radius: 0 var(--r-m) var(--r-m) 0; }
.react-btn { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.5rem 1rem; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 0.94rem; font-weight: 620; cursor: pointer; transition: background 0.15s, color 0.15s; font-variant-numeric: tabular-nums; }
.react-btn + .react-btn { border-left: 1px solid var(--line-strong); }
.react-btn:hover { background: var(--surface-2); color: var(--accent); }
.react-btn.active { background: var(--accent-soft); color: var(--accent); }
.react-btn svg { transition: transform 0.15s; }
.react-msg { color: var(--danger); }
.comments { margin-top: 2.5rem; }
.comments h2 { margin-bottom: 1.1rem; }
#cm-compose { margin-bottom: 1.5rem; }
.cm-form textarea { width: 100%; resize: none; min-height: 3.2rem; padding: 0.75rem 0.9rem; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--surface); color: var(--text); font: inherit; line-height: 1.45; }
.cm-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.cm-info { display: flex; justify-content: space-between; gap: 1rem; min-height: 1.2rem; margin-top: 0.2rem; }
.cm-err { color: var(--danger); }
.cm-actions { display: flex; gap: 0.5rem; margin-top: 0.3rem; }
.cm-list { display: grid; gap: 1.3rem; margin-bottom: 1.2rem; }
.cm { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 0.8rem; }
.cm .avatar { width: 38px; height: 38px; font-size: 0.82rem; }
.cm-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.cm-name { font-weight: 650; color: var(--text); text-decoration: none; }
.cm-name:hover { color: var(--accent); text-decoration: underline; }
.badge.soft { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.cm-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0.15rem 0 0.25rem; }
.cm-tools { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.link-btn { background: none; border: 0; padding: 0.1rem 0; font: inherit; font-size: 0.85rem; font-weight: 620; color: var(--muted); cursor: pointer; text-decoration: none; }
.link-btn:hover { color: var(--accent); text-decoration: underline; }
.link-btn.danger:hover { color: var(--danger); }
.cm-slot { margin-top: 0.5rem; }
.cm-slot:empty { margin: 0; }
.cm-replies-box { margin-top: 0.3rem; }
.cm-toggle { color: var(--accent); }
.cm-replies { display: grid; gap: 1rem; margin-top: 0.8rem; border-left: 2px solid var(--line); padding-left: 0.9rem; }
.cm-reply { grid-template-columns: 30px minmax(0, 1fr); }
.cm-reply .avatar { width: 30px; height: 30px; font-size: 0.74rem; }
.cm-empty { margin: 0.4rem 0 0; }

/* ============================== Moslashuvchanlik ============================== */
@media (max-width: 1280px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 1100px) {
  .watch-body, .manage-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; }
}
@media (max-width: 1000px) {
  .shell { display: block; min-height: 0; }
  .sidebar { position: fixed; z-index: 90; top: 0; left: 0; bottom: 0; width: min(86vw, 320px); height: 100dvh; transform: translateX(-104%); transition: transform 0.25s ease; box-shadow: var(--shadow-l); border-right: 0; padding-top: 0.8rem; }
  .side-top { display: flex; align-items: center; justify-content: space-between; margin: 0 0.4rem 1rem; }
  body.nav-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 80; background: rgb(8 12 20 / 0.5); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  .side-close, .theme-mini { display: grid; }
  .chips-scroll { display: flex; }
  .watch-body, .manage-grid, .upload-grid { grid-template-columns: 1fr; }
  .side { position: static; }
  .side .vcard { grid-template-columns: 168px minmax(0, 1fr); }
  .sub-edit { grid-template-columns: 1fr; }
  .sub-edit-side { position: static; }
  .auth-shell { grid-template-columns: 1fr; gap: 1.5rem; padding-block: 1.5rem 2.5rem; min-height: 0; }
  .auth-aside { min-height: 0; padding: 1.5rem; }
  .auth-aside ul { display: none; }
  .auth-aside h2 { margin: 0; }
}
@media (max-width: 760px) {
  :root { --head-h: 60px; }
  .topbar { gap: 0.5rem; }
  .topbar .brand { display: none; }
  .header-search kbd { display: none; }
  .header-search input { height: 42px; }
  .upload-btn { height: 42px; padding-inline: 0.9rem; }
  .upload-btn span { display: none; }
  .top-login { height: 42px; padding-inline: 0.9rem; }
  .sec-head .sort-bar { margin-left: 0; width: 100%; }
  .grid { grid-template-columns: 1fr; gap: 1.7rem; }
  .thumb { border-radius: 18px; }
  .watch-main h1 { font-size: 1.35rem; }
  .byline { gap: 0.8rem; }
  .byline-actions { width: 100%; }
  .side .vcard { grid-template-columns: 138px minmax(0, 1fr); }
  .stage .player-box { border-radius: 18px; }
  .panel { padding: 1.15rem; }
  .auth .panel { padding: 1.25rem; }
  .hemis-btns { grid-template-columns: 1fr; }
  .vtable thead { display: none; }
  .vtable, .vtable tbody, .vtable tr, .vtable td { display: block; width: 100%; }
  .vtable td { border: 0; padding: 0.35rem 1rem; }
  .vtable td:nth-child(3) { max-width: none; }
  .vtable tr { border-bottom: 1px solid var(--line); padding: 0.7rem 0; }
  .vtable tr:last-child { border-bottom: 0; }
  .vtable .title-cell { min-width: 0; grid-template-columns: 104px 1fr; }
  .plyr .qar-chapter-now { display: none; }
  .avatar-card { flex-direction: column; text-align: center; }
  .avatar-actions { justify-content: center; }
  .cropper { grid-template-columns: 1fr; }
  .crop-side { justify-items: center; }
  .crop-previews { justify-content: center; }
  .messages { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; justify-items: stretch; }
  .messages li { width: 100%; }
  .profile-head { padding: 1rem; }
}
@media (max-width: 480px) {
  .top-login { display: none; }
  .logo { height: 28px; }
}
@media (max-width: 560px) {
  .cue { grid-template-columns: 1.6rem minmax(0, 1fr); grid-template-areas: "n times" "n text" "n info" "n tools"; }
  .cue-tools { justify-content: flex-start; }
  .find-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
@media (prefers-contrast: more) {
  :root { --line: #8a97ab; --line-strong: #5a6a80; --muted: #3d4b60; }
}
@media print {
  .sidebar, .topbar, .site-footer, .rail, .side, .messages, .react-bar, .comments { display: none !important; }
  .shell { display: block; }
}


/* ============================== Akademik uyg‘unlashtirish ============================== */
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="search"], .field input[type="number"], .field input[type="tel"], .field input[type="url"],
.field select, .field textarea, .copyrow input, .copyrow textarea, .cm-form textarea, .up-title, .find-row input, .cue textarea, .cue-times input.t { border-color: var(--control); }
.field input:focus, .field select:focus, .field textarea:focus, .cm-form textarea:focus, .up-title:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
a { color: var(--link); }
.btn, .btn:hover, .badge, a.badge:hover, .side-nav a, .chip, .t-item, .site-footer a, .back-link, .me-link, .vcard, .brand { text-decoration: none; }
:root[data-theme="dark"] .brand { background: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand { background: #fff; } }
.watch-meta .dotsep::before { content: "·"; margin-right: 0.5rem; }
/* Ajratuvchi nuqta oldingi elementga yopishadi: qator boshida «· 3 hafta oldin» bo‘lib qolmaydi */
.vmeta.sub { gap: 0 0.5rem; }
.vmeta.sub > span { white-space: nowrap; }
.vmeta.sub > span + span::before { content: none; margin: 0; }
.vmeta.sub > span:not(:last-child)::after { content: "·"; margin-left: 0.5rem; }
.side-subjects li { min-width: 0; }
.side-subjects a { min-width: 0; }
.s-name { flex: 1; min-width: 0; }

/* ============================== Rejim almashtirgich animatsiyasi ============================== */
.theme-ico { position: relative; display: block; width: 22px; height: 22px; flex: none; }
.theme-ico .ico { position: absolute; inset: 0; width: 22px; height: 22px; transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease; transform-origin: 50% 50%; }
.theme-ico .i-moon { opacity: 1; transform: rotate(0) scale(1); }
.theme-ico .i-sun { opacity: 0; transform: rotate(-120deg) scale(0.2); color: var(--zafaron); }
:root[data-theme="dark"] .theme-ico .i-moon { opacity: 0; transform: rotate(120deg) scale(0.2); }
:root[data-theme="dark"] .theme-ico .i-sun { opacity: 1; transform: rotate(0) scale(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-ico .i-moon { opacity: 0; transform: rotate(120deg) scale(0.2); }
  :root:not([data-theme="light"]) .theme-ico .i-sun { opacity: 1; transform: rotate(0) scale(1); }
}
.side-switch .theme-ico .ico, .theme-mini .theme-ico .ico { color: var(--muted); }
.side-switch .theme-ico .i-sun, .theme-mini .theme-ico .i-sun { color: var(--zafaron); }
.theme-toggling .theme-ico { animation: ico-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes ico-pop { 0% { transform: scale(0.8); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }
.lbl { position: relative; }
.lbl .l-day { display: none; }
:root[data-theme="dark"] .lbl .l-night { display: none; }
:root[data-theme="dark"] .lbl .l-day { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lbl .l-night { display: none; }
  :root:not([data-theme="light"]) .lbl .l-day { display: inline; }
}
.lbl > span { animation: lbl-in 0.35s ease; }
@keyframes lbl-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
/* ranglar yumshoq o‘tadi (faqat almashtirish paytida) */
html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after { transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, fill 0.4s ease, box-shadow 0.4s ease !important; }
@media (prefers-reduced-motion: reduce) { .theme-ico .ico, .theme-toggling .theme-ico, .lbl > span { animation: none !important; transition: none !important; } }

.nav-btn { width: 48px; height: 48px; border-radius: 50%; }
.nav-btn .ico { width: 28px; height: 28px; stroke-width: 2.2; }

/* ============================== Ikonkalar: bir xil o‘lcham, bir ustun ============================== */
.nav-btn { width: 44px; height: 44px; border-radius: 50%; }
.nav-btn .ico, .side-nav a .ico, .side-switch .theme-ico, .side-switch .theme-ico .ico { width: 24px; height: 24px; }
.nav-btn .ico { stroke-width: 2; }
.topbar { padding-left: 16px; }                         /* ☰ markazi: 16 + 22 = 38 px */
.side-nav a, .side-switch { padding-left: 14px; padding-right: 14px; }  /* ikonka markazi: 12 + 14 + 12 = 38 px */
.side-foot { padding-inline: 6px; }                     /* avatar markazi: 12 + 6 + 20 = 38 px */

/* ============================== Bir xil keng konteyner, kartochkasiz sahifalar ============================== */
:root { --wrap: 1400px; }
.page, .wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1rem, 2.4vw, 2rem); }
.stage { max-width: var(--wrap); margin-inline: auto; }
.page .wrap, .page > .wrap { padding-inline: 0; }

/* .panel — endi kartochka emas: yassi bo‘lim, orasi chiziq bilan ajratiladi (YouTube sozlamalari kabi) */
.panel { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
.panel + .panel, .manage-grid .panel, .upload-grid .panel { margin-top: 0; padding-top: 1.6rem; margin-bottom: 1.6rem; border-top: 1px solid var(--line); }
.manage-grid > div > .panel:first-child, .upload-grid > .panel:first-child, .manage-grid > div > :first-child.panel { border-top: 0; padding-top: 0; }
.panel > h2:first-child { margin-top: 0; font-size: 1.3rem; }
.auth .panel { padding: 0; }
.profile-head { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0.4rem 0 1.5rem; }

/* Profil, parol, ro‘yxatdan o‘tish: yorliq chapda, maydon o‘ngda */
.auth.wide { max-width: none; width: 100%; margin: 0; padding-block: 1.4rem 3rem; }
.auth.wide h1 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); margin-bottom: 0.3rem; }
.auth.wide .lead { margin-bottom: 1.8rem; max-width: 70ch; }
.auth.wide .panel .field { display: grid; grid-template-columns: 220px minmax(0, 560px); column-gap: 2rem; row-gap: 0.3rem; align-items: start; padding-block: 1.1rem; margin: 0; border-top: 1px solid var(--line); }
.auth.wide .panel .field > label { grid-column: 1; margin: 0.65rem 0 0; font-weight: 600; }
.auth.wide .panel .field > :not(label) { grid-column: 2; }
.auth.wide .field-row { display: block; }
.auth.wide .panel > .btn, .auth.wide .panel > button.btn, .auth.wide .panel > a.btn { margin-top: 1.4rem; margin-right: 0.6rem; }
.auth.wide .avatar-card { background: none; border: 0; border-radius: 0; padding: 0.4rem 0 1.5rem; margin-bottom: 0; }
.auth.wide .help { max-width: 70ch; }
@media (max-width: 760px) {
  .auth.wide .panel .field { grid-template-columns: 1fr; }
  .auth.wide .panel .field > label, .auth.wide .panel .field > :not(label) { grid-column: 1; }
  .auth.wide .panel .field > label { margin-top: 0; }
}

/* ============================== Kartochka hover (YouTube kabi) ============================== */
/* YouTube kabi: kartochka orqasida yumaloq fon paneli (eskiz joyida qoladi, kattalashmaydi) */
.vcard { position: relative; isolation: isolate; }
.vcard::before { content: ""; position: absolute; inset: -12px; z-index: -1; border-radius: 16px; background: var(--card-hover, var(--surface-2)); opacity: 0; transition: opacity 0.2s ease, background-color 0.3s ease; pointer-events: none; }
@media (hover: hover) { .vcard:hover::before { opacity: 1; } }
.vcard:focus-visible::before { opacity: 1; }
.vcard:focus-visible { outline: 0; }
.vcard:focus-visible .thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.side .vcard::before { inset: -8px; }
.pv { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity 0.25s ease; background-repeat: no-repeat; background-color: #000; pointer-events: none; }
.pvbar { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 4px; background: rgb(255 255 255 / 0.25); opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.pvbar i { display: block; height: 100%; width: 0; background: #e5384f; }
.thumb.previewing .pv, .thumb.previewing .pvbar { opacity: 1; }
.thumb.previewing .play { opacity: 0 !important; }
@media (prefers-reduced-motion: reduce) { .pv, .pvbar { display: none; } .vcard::before { transition: none; } }

/* ============================== Yana yuklash (AJAX) ============================== */
.more-wrap { display: grid; justify-items: center; gap: 0.75rem; margin: 3rem 0 1rem; text-align: center; }
.more-meta { color: var(--muted); font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.more-bar { width: 200px; height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.more-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.5s ease; }
.more-btn { min-width: 240px; gap: 0.6rem; position: relative; }
.more-btn .more-ico { width: 20px; height: 20px; transition: transform 0.2s ease; }
.more-btn:hover .more-ico { transform: translateY(2px); }
.more-spin { display: none; width: 18px; height: 18px; border: 2.5px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
.more-btn.loading { pointer-events: none; }
.more-btn.loading .more-ico { display: none; }
.more-btn.loading .more-spin { display: inline-block; }
.more-btn.loading .more-label::after { content: "…"; }
.more-err { color: var(--danger); margin: 0; font-size: 0.9rem; }
.more-wrap.done { margin-top: 2.5rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.grid > .card-in { animation: card-in 0.45s cubic-bezier(0.22, 0.8, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .grid > .card-in, .more-spin { animation-duration: 0.01ms !important; } }

/* ============================== Kabinet jadvali: tuzatishlar ============================== */
.vtable { font-size: 0.95rem; }
.vtable td { white-space: nowrap; }
.vtable td.c-title { white-space: normal; }
.vtable td.c-status { min-width: 130px; }
.vtable td.c-status .js-stage { white-space: normal; }
.vtable .dot { vertical-align: middle; margin-top: -2px; }
.vtable td.c-vis { max-width: none; font-size: 0.92rem; color: var(--muted); }
.vtable td.c-date { color: var(--muted); }
.vtable th { white-space: nowrap; }
@media (max-width: 760px) { .vtable td { white-space: normal; } .vtable td.c-status { min-width: 0; } }

@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
  .stat { padding: 0.9rem 1rem; }
  .stat b { font-size: 1.4rem; }
  .stat span { font-size: 0.82rem; }
}

/* Telefonda kabinet jadvali: har video — ixcham kartochka, ma’lumotlar bitta qatorda */
@media (max-width: 760px) {
  .vtable, .vtable tbody { display: block; width: 100%; border: 0; background: none; }
  .vtable tr { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
  .vtable tr:last-child { border-bottom: 0; }
  .vtable td { display: block; width: auto; padding: 0; border: 0; font-size: 0.92rem; }
  .vtable td.c-title { flex: 1 0 100%; }
  .vtable .title-cell { grid-template-columns: 124px 1fr; gap: 0.9rem; }
  .vtable td:nth-child(4)::after { content: " ko‘rish"; color: var(--muted); }
  .vtable td.c-status { order: 1; }
  .vtable td.c-vis { order: 2; }
  .vtable td:nth-child(4) { order: 3; }
  .vtable td.c-date { order: 4; }
}

/* ============================== Videoni tahrirlash (Studio uslubi) ============================== */
.studio { padding-block: 1.4rem 3rem; }
.studio-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.sh-text { min-width: 0; flex: 1 1 360px; }
.studio-head h1 { margin: 0.4rem 0 0.55rem; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); overflow-wrap: anywhere; }
.sh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1rem; color: var(--muted); font-size: 0.92rem; }
.sh-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.status-pill { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.15rem 0.7rem; border-radius: 99px; font-size: 0.82rem; font-weight: 650; background: var(--surface-2); color: var(--text); }
.status-pill .dot { margin: 0; width: 0.5rem; height: 0.5rem; box-shadow: none; }
.status-pill.ready { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.status-pill.failed { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.status-pill.processing, .status-pill.queued, .status-pill.uploading { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }

.studio-tabs { position: sticky; top: var(--head-h); z-index: 35; display: flex; gap: 0.2rem; overflow-x: auto; scrollbar-width: none; background: var(--bg); border-bottom: 1px solid var(--line); margin-bottom: 0.4rem; }
.studio-tabs::-webkit-scrollbar { display: none; }
.studio-tabs a { padding: 0.9rem 1.05rem; color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; transition: color 0.15s, border-color 0.15s; }
.studio-tabs a:hover { color: var(--text); }
.studio-tabs a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }

.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 2.5rem; align-items: start; }
.studio-side { position: sticky; top: calc(var(--head-h) + 70px); display: grid; gap: 1.2rem; }
.studio-side .player-box { border-radius: var(--r-xl); box-shadow: var(--shadow); }
.side-info-card { border: 1px solid var(--line); border-radius: var(--r-l); padding: 1.15rem 1.25rem; }
.side-info-card h2 { font-size: 1.05rem; margin-bottom: 0.8rem; }
.info-list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.6rem 1.2rem; margin: 0; font-size: 0.92rem; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.info-list .wrap-any { overflow-wrap: anywhere; }

.st-sec { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1rem 2rem; padding-block: 2rem; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--head-h) + 70px); }
.st-sec:first-of-type { border-top: 0; padding-top: 1.2rem; }
.st-sec > header h2 { font-size: 1.15rem; margin: 0 0 0.35rem; }
.st-sec > header .help { margin: 0; max-width: 28ch; }
.st-body { min-width: 0; }
.btn-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.vis-field { border: 0; padding: 0; margin: 0 0 1.2rem; min-width: 0; }
.vis-field legend { padding: 0; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.92rem; }
.vis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
.vis-opt { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.85rem 1rem; border: 1px solid var(--control); border-radius: var(--r-m); cursor: pointer; transition: border-color 0.15s, background 0.15s; font-weight: 400; margin: 0; }
.vis-opt:hover { border-color: var(--accent); }
.vis-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.vis-opt input { flex: none; width: 1.05rem; height: 1.05rem; margin-top: 0.2rem; accent-color: var(--accent); }
.vo-body { display: grid; line-height: 1.3; }
.vo-body b { font-weight: 650; }
.vo-body small { color: var(--muted); font-size: 0.82rem; margin-top: 0.15rem; }

.field .toggle { display: flex; gap: 0.85rem; align-items: center; margin: 0; font-weight: 400; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tg { position: relative; flex: none; width: 46px; height: 26px; border-radius: 99px; background: var(--line-strong); transition: background 0.2s; }
.tg::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.3); transition: transform 0.2s; }
.toggle input:checked + .tg { background: var(--accent); }
.toggle input:checked + .tg::after { transform: translateX(20px); }
.toggle input:focus-visible + .tg { outline: 2px solid var(--accent); outline-offset: 2px; }
.tg-text { display: grid; line-height: 1.3; }
.tg-text b { font-weight: 650; }
.tg-text small { color: var(--muted); font-size: 0.85rem; }

.poster-preview img { display: block; width: 100%; max-width: 420px; border-radius: var(--r-l); border: 1px solid var(--line); }
.poster-form { margin-top: 1.1rem; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.1rem 1.25rem; border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--line)); border-radius: var(--r-l); background: color-mix(in srgb, var(--danger) 5%, transparent); }
.danger-zone p { margin: 0.2rem 0 0; max-width: 52ch; }

@media (max-width: 1100px) { .studio-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; } }
@media (max-width: 980px) {
  .studio-grid { grid-template-columns: 1fr; }
  .studio-side { position: static; order: -1; }
  .st-sec { grid-template-columns: 1fr; padding-block: 1.6rem; }
  .st-sec > header .help { max-width: none; }
}
@media (max-width: 560px) { .vis-grid { grid-template-columns: 1fr; } .sh-actions { width: 100%; } .sh-actions .btn { flex: 1; } }
.field .vis-opt { display: flex; margin: 0; font-weight: 400; align-items: flex-start; }

/* ============================== Nusxalash: input ichidagi ikonkali tugma ============================== */
.copyrow { position: relative; display: block; }
.copyrow input, .copyrow textarea { width: 100%; padding-right: 3.4rem; }
.copy-btn { position: absolute; right: 0.45rem; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: var(--r-m); background: transparent; color: var(--muted); display: grid; place-items: center; padding: 0; cursor: pointer; transition: background 0.15s, color 0.15s; }
.copyrow:has(textarea) .copy-btn { top: 0.55rem; transform: none; }
.copy-btn:hover { background: var(--surface-2); color: var(--text); }
.copy-btn .ico { grid-area: 1 / 1; width: 20px; height: 20px; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease; }
.copy-btn .i-done { opacity: 0; transform: scale(0.3) rotate(-30deg); color: var(--ok); stroke-width: 2.6; }
.copy-btn.copied { color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); }
.copy-btn.copied .i-copy { opacity: 0; transform: scale(0.3) rotate(30deg); }
.copy-btn.copied .i-done { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .copy-btn .ico { transition: none; } }

/* ============================== Select: o‘z strelkasi, ochilganda 180° aylanadi ============================== */
.select-wrap { position: relative; display: block; }
.select-wrap select { -webkit-appearance: none; appearance: none; width: 100%; padding-right: 3rem !important; cursor: pointer; text-overflow: ellipsis; }
.select-wrap::after {
  content: ""; position: absolute; right: 1.2rem; top: 50%; width: 16px; height: 16px; margin-top: -8px; pointer-events: none; background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.15s;
}
.select-wrap:hover::after, .select-wrap:focus-within::after { background: var(--text); }
.select-wrap.open::after { transform: rotate(180deg); background: var(--accent); }
@media (prefers-reduced-motion: reduce) { .select-wrap::after { transition: none; } }

/* ============================== Accordion (details/summary) ============================== */
details.acc { margin-top: 1.1rem; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); transition: border-color 0.2s, box-shadow 0.2s; }
details.acc:hover { border-color: var(--line-strong); }
details.acc[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
details.acc > summary { list-style: none; display: flex; align-items: center; gap: 0.75rem; padding: 0.95rem 1.2rem; cursor: pointer; font-weight: 650; color: var(--text); border-radius: var(--r-l); user-select: none; transition: background 0.15s; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary:hover { background: var(--surface-2); }
details.acc > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
details.acc > summary::after { content: ""; flex: none; margin-left: auto; width: 18px; height: 18px; background: var(--muted); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.15s; }
details.acc > summary:hover::after { background: var(--text); }
details.acc[open] > summary::after { transform: rotate(180deg); background: var(--accent); }
details.acc.sub-upload > summary::before { content: ""; flex: none; width: 30px; height: 30px; border-radius: var(--r-m); background-color: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 62% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 62% no-repeat; opacity: 1; }
details.acc[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 1px solid var(--line); }
details.acc > :not(summary) { padding-inline: 1.2rem; }
details.acc[open] > :not(summary) { animation: acc-in 0.3s cubic-bezier(0.22, 0.8, 0.3, 1); }
details.acc > :not(summary):last-child { padding-bottom: 1.2rem; }
details.acc > summary + * { padding-top: 1.1rem; }
@keyframes acc-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { details.acc[open] > :not(summary) { animation: none; } details.acc > summary::after { transition: none; } }

/* ============================== Checkbox va radio ============================== */
input[type="checkbox"], input[type="radio"] { -webkit-appearance: none; appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border: 1.6px solid var(--control); background-color: var(--surface); cursor: pointer; position: relative; vertical-align: middle; transition: background-color 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.18s; }
input[type="checkbox"] { border-radius: 7px; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:hover, input[type="radio"]:hover { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); }
input[type="checkbox"]:checked { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: 78%; animation: cb-pop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1); }
:root[data-theme="dark"] input[type="checkbox"]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314121a' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) input[type="checkbox"]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314121a' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E"); } }
input[type="radio"]:checked { border-color: var(--accent); background-image: radial-gradient(circle, var(--accent) 0 44%, transparent 48%); animation: cb-pop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1); }
input[type="checkbox"]:active, input[type="radio"]:active { transform: scale(0.88); }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
@keyframes cb-pop { 0% { transform: scale(0.78); } 55% { transform: scale(1.14); } 100% { transform: scale(1); } }
.toggle input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; border: 0; background: none; box-shadow: none; animation: none; }
.check, .checkbox label { cursor: pointer; }
.field.checkbox, .check { align-items: center; gap: 0.7rem; }
.vis-opt input[type="radio"] { margin-top: 0.1rem; }
@media (prefers-reduced-motion: reduce) { input[type="checkbox"]:checked, input[type="radio"]:checked { animation: none; } }

/* ============================== Asosiy tugmalar ============================== */
.btn { position: relative; overflow: hidden; min-height: 44px; padding: 0.65rem 1.35rem; border-radius: 10px; font-weight: 650; letter-spacing: 0.005em; transition: transform 0.15s ease, box-shadow 0.22s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; -webkit-tap-highlight-color: transparent; }
.btn:not(.secondary):not(.danger):not(.light) { border-color: transparent; background-image: linear-gradient(180deg, color-mix(in srgb, #fff 14%, var(--accent)), var(--accent)); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 1px 2px color-mix(in srgb, var(--accent) 45%, #000 20%), 0 8px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn:not(.secondary):not(.danger):not(.light):hover { background-color: var(--firuza-strong); background-image: linear-gradient(180deg, color-mix(in srgb, #fff 12%, var(--firuza-strong)), var(--firuza-strong)); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.24), 0 2px 4px color-mix(in srgb, var(--accent) 45%, #000 20%), 0 12px 24px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.btn.secondary { border-color: var(--control); }
.btn.secondary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.small { min-height: 36px; padding: 0.35rem 0.95rem; border-radius: 8px; }
.btn.lg { min-height: 52px; padding: 0.8rem 1.7rem; font-size: 1.02rem; border-radius: 12px; }
.btn[disabled] { transform: none; box-shadow: none; }
.btn .ripple { position: absolute; border-radius: 50%; pointer-events: none; background: rgb(255 255 255 / 0.45); transform: scale(0); animation: ripple 0.6s ease-out forwards; }
.btn.secondary .ripple, .btn.danger .ripple { background: color-mix(in srgb, var(--accent) 25%, transparent); }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .btn, .btn:hover, .btn:active { transform: none; transition: none; } .btn .ripple { display: none; } }

/* Accordion: ramkasiz, yassi */
details.acc, details.acc:hover, details.acc[open] { border: 0; background: none; box-shadow: none; border-radius: 0; }
details.acc > summary { padding: 0.55rem 0; border-radius: var(--r-m); gap: 0.7rem; }
details.acc > summary:hover { background: none; color: var(--accent); }
details.acc[open] > summary { border-bottom: 0; border-radius: var(--r-m); }
details.acc > :not(summary) { padding-inline: 0; }
details.acc > summary + * { padding-top: 0.9rem; }
details.acc > :not(summary):last-child { padding-bottom: 0.2rem; }
details.acc.sub-upload > summary::before { width: 22px; height: 22px; -webkit-mask-size: 100%; mask-size: 100%; }

/* Tugmalar: sodda va yassi (soyasiz, ko‘tarilishsiz) */
.btn:not(.secondary):not(.danger):not(.light) { background-image: none; background-color: var(--accent); box-shadow: none; }
.btn:not(.secondary):not(.danger):not(.light):hover { background-image: none; background-color: var(--firuza-strong); transform: none; box-shadow: none; }
.btn:hover, .btn:active { transform: none; }
.btn.secondary:hover { transform: none; box-shadow: none; border-color: var(--accent); color: var(--accent); }
.btn:not(.secondary):not(.danger):not(.light):focus-visible, .btn:focus-visible { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.btn[disabled]:hover { background-color: var(--accent); }

/* Tuzatish: qorong‘i rejimda logo plashkasiz; pleyerdagi play belgisi aniq markazda */
:root[data-theme="dark"] { --logo-ink: #f1f4f8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --logo-ink: #f1f4f8; } }
:root[data-theme="dark"] .brand { background: none; padding: 0.2rem 0.4rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand { background: none; padding: 0.2rem 0.4rem; } }
:root[data-theme="dark"] .logo path[fill^="url"] { filter: brightness(1.45) saturate(1.2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo path[fill^="url"] { filter: brightness(1.45) saturate(1.2); } }
.player-box .plyr.plyr--video .plyr__control--overlaid svg { position: absolute !important; left: 50% !important; top: 50% !important; width: 34px; height: 34px; margin: -17px 0 0 -17px !important; }
/* Play belgisi: uchburchakning og‘irlik markazi tugma markaziga to‘g‘ri kelsin (optik markazlash) */
.player-box .plyr.plyr--video .plyr__control--overlaid svg { margin-left: -13px !important; }
.thumb .play svg { margin-left: 6px; }

/* Chiqish tugmasi: ramkasiz, menyu ikonkalari bilan bir xil uslubda */
.side-foot .logout-form .icon-btn, .me .icon-btn { border: 0; background: transparent; color: var(--muted); width: 44px; height: 44px; border-radius: 50%; transition: background-color 0.15s, color 0.15s; }
.side-foot .logout-form .icon-btn .ico { width: 24px; height: 24px; }
.side-foot .logout-form .icon-btn:hover, .me .icon-btn:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
@media (min-width: 1001px) {
  html.side-collapsed .me { gap: 0.35rem; }
  html.side-collapsed .me-link { flex: none; justify-content: center; padding: 0.3rem 0; }
  html.side-collapsed .me .logout-form { display: flex; justify-content: center; width: 100%; }
}

/* Tab bosilganda bo‘lim tablar ostiga yaqin turadi (ortiqcha bo‘sh joy yo‘q): umumiy scroll-padding ustiga ~50px */
.st-sec, .st-sec.tabs-anchor, #asosiy { scroll-margin-top: 50px; }
/* Oxirgi bo‘lim ham tablar ostiga ko‘tarila olsin (sahifa pastida bo‘sh joy qoladi) */
.studio-main > .st-sec:last-child { min-height: calc(100vh - 240px); align-content: start; }
@media (max-width: 980px) { .studio-main > .st-sec:last-child { min-height: 0; } }
/* Tab bosilganda bo‘lim chizig‘i tablar paneli chizig‘i bilan ustma-ust tushadi */
.st-sec, .st-sec.tabs-anchor { scroll-margin-top: 45px; }

/* Pleyer boshqaruvi: konteyner kengligiga qarab ortiqcha tugmalar yashiriladi (tiqilib ketmasin) */
.player-box { container-type: inline-size; container-name: pbox; }
@container pbox (max-width: 640px) {
  .plyr [data-plyr="rewind"], .plyr [data-plyr="fast-forward"], .plyr [data-plyr="pip"], .plyr [data-plyr="airplay"], .plyr .plyr__volume input[data-plyr="volume"], .plyr .plyr__time--duration { display: none !important; }
  .plyr .plyr__volume { min-width: 0; width: auto; max-width: none; }
  .plyr--video .plyr__controls { padding: 10px 10px 8px; gap: 2px; }
  .plyr__controls .plyr__progress__container { min-width: 0; }
  .plyr .plyr__control svg { width: 20px; height: 20px; }
  .plyr__time { font-size: 13px; }
}
@container pbox (max-width: 380px) {
  .plyr .plyr__time--current { display: none !important; }
}
@container pbox (max-width: 640px) { .plyr .qar-chapter-now { display: none !important; } }

/* ============================== Pleyer boshqaruvi (Rutube uslubida) ============================== */
.player-box .plyr {
  --plyr-color-main: #b79ce8;
  --plyr-video-control-color: #fff;
  --plyr-video-control-color-hover: #fff;
  --plyr-video-control-background-hover: rgb(255 255 255 / 0.18);
  --plyr-control-icon-size: 22px;
  --plyr-control-spacing: 8px;
  --plyr-control-radius: 50%;
  --plyr-range-track-height: 4px;
  --plyr-range-thumb-height: 14px;
  --plyr-range-thumb-background: #fff;
  --plyr-range-thumb-shadow: 0 0 0 4px color-mix(in srgb, #b79ce8 45%, transparent), 0 1px 3px rgb(0 0 0 / 0.4);
  --plyr-range-fill-background: #b79ce8;
  --plyr-video-range-track-background: rgb(255 255 255 / 0.28);
  --plyr-video-progress-buffered-background: rgb(255 255 255 / 0.38);
  --plyr-menu-background: rgb(24 20 32 / 0.95);
  --plyr-menu-color: #f1eef8;
  --plyr-menu-arrow-size: 0px;
  --plyr-menu-radius: 14px;
  --plyr-menu-shadow: 0 12px 36px rgb(0 0 0 / 0.5);
  --plyr-tooltip-background: rgb(24 20 32 / 0.95);
  --plyr-tooltip-color: #fff;
  --plyr-tooltip-radius: 8px;
  --plyr-tooltip-padding: 5px 10px;
  --plyr-tooltip-arrow-size: 0px;
  --plyr-font-size-small: 13px;
}

/* pastdan yumshoq qorayish; progress yuqori qatorda, tugmalar pastki qatorda */
.player-box .plyr--video .plyr__controls {
  flex-wrap: wrap; align-items: center; row-gap: 0; column-gap: 2px; padding: 40px 16px 12px;
  background: linear-gradient(to top, rgb(8 6 14 / 0.86), rgb(8 6 14 / 0.5) 58%, transparent);
}
.plyr__controls .plyr__progress__container { order: -1; flex: 1 0 100%; min-width: 0; margin: 0 0 6px; padding: 0 2px; }
.plyr__controls .plyr__progress { margin: 0; }
.plyr__controls .plyr__progress input[data-plyr="seek"] { height: 20px; }
.plyr__controls .plyr__progress__container:hover { --plyr-range-track-height: 6px; }
.plyr__controls .plyr__progress input[type="range"]::-webkit-slider-thumb { transform: scale(0); transition: transform 0.15s ease; }
.plyr__controls .plyr__progress input[type="range"]::-moz-range-thumb { transform: scale(0); transition: transform 0.15s ease; }
.plyr__controls .plyr__progress__container:hover input[type="range"]::-webkit-slider-thumb,
.plyr__controls .plyr__progress input[type="range"]:focus-visible::-webkit-slider-thumb { transform: scale(1); }
.plyr__controls .plyr__progress__container:hover input[type="range"]::-moz-range-thumb,
.plyr__controls .plyr__progress input[type="range"]:focus-visible::-moz-range-thumb { transform: scale(1); }

/* tugmalar: yumaloq, shaffof, hover'da yumshoq yorug‘lik */
.plyr--video .plyr__controls > .plyr__control, .plyr--video .plyr__controls .plyr__menu > .plyr__control, .plyr--video .plyr__controls > .plyr__volume > .plyr__control { padding: 9px; border-radius: 50%; transition: background-color 0.15s ease, transform 0.15s ease; }
.plyr--video .plyr__controls .plyr__control svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.35)); }
.plyr--video .plyr__controls .plyr__control:hover { background: rgb(255 255 255 / 0.18); }
.plyr--video .plyr__controls .plyr__control:active { transform: scale(0.92); }
.plyr--video .plyr__controls .plyr__control[aria-expanded="true"] { background: rgb(255 255 255 / 0.22); }
.plyr--video .plyr__controls .plyr__control[aria-expanded="true"][data-plyr="settings"] svg { transform: rotate(45deg); }
.plyr__controls [data-plyr="settings"] svg { transition: transform 0.3s ease; }

/* tartib: chapda play, ovoz, vaqt, bob nomi; o‘ngda sozlamalar va to‘liq ekran */
.plyr__controls > [data-plyr="play"] { order: 1; }
.plyr__controls > [data-plyr="rewind"] { order: 2; }
.plyr__controls > [data-plyr="fast-forward"] { order: 3; }
.plyr__controls > [data-plyr="mute"] { order: 4; }
.plyr__controls > .plyr__volume { order: 5; display: flex; align-items: center; min-width: 0; width: auto; max-width: none; }
.plyr__controls > .plyr__time--current { order: 6; }
.plyr__controls > .plyr__time--duration { order: 7; margin-right: auto; }
.plyr__controls > .qar-chapter-now { order: 8; margin-right: auto; }
.plyr__controls > .plyr__time--duration:has(+ .qar-chapter-now:not(:empty)) { margin-right: 0; }
.plyr__controls > [data-plyr="captions"] { order: 10; }
.plyr__controls > .plyr__menu { order: 11; }
.plyr__controls > [data-plyr="pip"] { order: 12; }
.plyr__controls > [data-plyr="airplay"] { order: 13; }
.plyr__controls > [data-plyr="fullscreen"] { order: 14; }
.plyr__time { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 0 4px; text-shadow: 0 1px 2px rgb(0 0 0 / 0.5); }
.plyr__time--current { padding-right: 0; }
.plyr__time + .plyr__time::before { content: "/"; margin-right: 6px; opacity: 0.7; }

/* ovoz slideri: sichqoncha ustiga borganda ochiladi */
.plyr__volume input[data-plyr="volume"] { width: 0; min-width: 0; margin: 0; opacity: 0; transition: width 0.22s ease, opacity 0.18s ease, margin 0.22s ease; }
.plyr__controls:has([data-plyr="mute"]:hover) .plyr__volume input[data-plyr="volume"],
.plyr__volume:hover input[data-plyr="volume"], .plyr__volume:focus-within input[data-plyr="volume"] { width: 84px; opacity: 1; margin: 0 8px 0 2px; }

/* sozlamalar menyusi: shisha uslubida */
.plyr__menu__container { background: rgb(24 20 32 / 0.95); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgb(255 255 255 / 0.1); border-radius: 14px; box-shadow: 0 12px 36px rgb(0 0 0 / 0.5); padding: 6px; right: 0; bottom: calc(100% + 12px); animation: plyr-menu-in 0.18s ease-out; transform-origin: bottom right; }
.plyr__menu__container::after { display: none; }
.plyr__menu__container .plyr__control { color: #f1eef8; border-radius: 9px; padding: 8px 12px; font-weight: 500; }
.plyr__menu__container .plyr__control:hover, .plyr__menu__container .plyr__control[aria-checked="true"]:hover { background: rgb(255 255 255 / 0.12); color: #fff; }
.plyr__menu__container .plyr__control[role="menuitemradio"][aria-checked="true"]::before { background: #b79ce8; }
.plyr__menu__container .plyr__menu__value { color: #b9b2cc; }
.plyr__menu__container .plyr__control--back { border-bottom: 1px solid rgb(255 255 255 / 0.1); border-radius: 9px 9px 0 0; margin-bottom: 4px; font-weight: 650; }
@keyframes plyr-menu-in { from { opacity: 0; transform: translateY(6px) scale(0.97); } to { opacity: 1; transform: none; } }
.plyr__tooltip { font-weight: 600; box-shadow: 0 4px 14px rgb(0 0 0 / 0.4); border: 1px solid rgb(255 255 255 / 0.08); }
.plyr__preview-thumb { border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / 0.5); border: 2px solid rgb(255 255 255 / 0.9); }
.plyr__preview-thumb__time-container { border-radius: 0 0 8px 8px; }

/* tor pleyer: gradient va oraliqlar */
@container pbox (max-width: 640px) {
  .player-box .plyr--video .plyr__controls { padding: 32px 10px 8px; }
  .plyr--video .plyr__controls > .plyr__control, .plyr--video .plyr__controls .plyr__menu > .plyr__control { padding: 8px; }
  .plyr--video .plyr__controls .plyr__control svg { width: 20px; height: 20px; }
  .plyr__controls > .plyr__time--duration { display: inline-block !important; }
}
@container pbox (max-width: 380px) { .plyr__controls > .plyr__time--current { display: inline-block !important; padding-right: 0; } }
@media (prefers-reduced-motion: reduce) { .plyr__menu__container { animation: none; } .plyr__volume input[data-plyr="volume"] { transition: none; } }
/* Progress alohida yuqori qatorda (Plyr ning o‘z flex qoidasidan kuchliroq) */
.player-box .plyr--video .plyr__controls { flex-wrap: wrap !important; }
.player-box .plyr--video .plyr__controls .plyr__progress__container { order: -1 !important; flex: 0 0 100% !important; width: 100%; max-width: 100%; margin: 0 0 4px !important; padding: 0 2px; }
.player-box .plyr--video .plyr__controls .plyr__progress__container .plyr__progress { margin: 0 !important; width: 100%; }
/* Plyr birinchi tugmaga margin-right:auto beradi: bekor qilamiz, guruhlar o‘z joyida turadi */
.player-box .plyr--video .plyr__controls > .plyr__controls__item { margin-left: 0 !important; margin-right: 0 !important; }
.player-box .plyr--video .plyr__controls > .plyr__time--duration { margin-right: auto !important; }
.player-box .plyr--video .plyr__controls > .plyr__time--duration:has(+ .qar-chapter-now:not(:empty)) { margin-right: 0 !important; }
.player-box .plyr--video .plyr__controls > .qar-chapter-now { margin-right: auto !important; margin-left: 10px !important; }
.player-box .plyr--video .plyr__controls > .plyr__volume { width: auto !important; min-width: 0 !important; max-width: none !important; flex: 0 0 auto !important; }

/* Yangi pleyer ikonkalari: aylanish effekti olib tashlandi, katta play belgisi markazga keltirildi */
.player-box .plyr--video .plyr__controls .plyr__control[aria-expanded="true"][data-plyr="settings"] svg { transform: none; }
.plyr__controls [data-plyr="settings"] svg { transition: none; }
.player-box .plyr.plyr--video .plyr__control--overlaid svg { margin: -17px 0 0 -17px !important; width: 34px !important; height: 34px !important; }
.plyr--video .plyr__controls .plyr__control svg { width: 24px; height: 24px; }
.plyr--video .plyr__controls .plyr__control[data-plyr="rewind"] svg, .plyr--video .plyr__controls .plyr__control[data-plyr="fast-forward"] svg { width: 26px; height: 26px; }

/* Vaqt matni kattaroq; ovoz slideri vaqtdan KEYIN ochiladi (vaqt joyidan siljimaydi) */
.player-box .plyr { --plyr-font-size-time: 15px; }
.player-box .plyr--video .plyr__controls > .plyr__time { font-size: 15px !important; font-weight: 600; letter-spacing: 0.01em; padding: 0 2px; }
.player-box .plyr--video .plyr__controls > .plyr__time--current { order: 4 !important; margin-left: 6px !important; }
.player-box .plyr--video .plyr__controls > .plyr__time--duration { order: 5 !important; margin-right: 0 !important; }
.player-box .plyr--video .plyr__controls > .plyr__volume { order: 6 !important; margin-right: auto !important; margin-left: 4px !important; }
.player-box .plyr--video .plyr__controls > .qar-chapter-now { order: 8; margin-left: 10px !important; margin-right: auto !important; }
.player-box .plyr--video .plyr__controls > .plyr__volume:has(+ .qar-chapter-now:not(:empty)) { margin-right: 0 !important; }
.plyr__time + .plyr__time::before { margin-right: 5px; margin-left: 1px; }
@container pbox (max-width: 640px) { .player-box .plyr--video .plyr__controls > .plyr__time { font-size: 14px !important; } }

/* Preview: ramkasiz (qora halqa va oq chiziq yo‘q); vaqt matnlari 16px */
.player-box .plyr { --plyr-font-size-time: 16px; }
.player-box .plyr--video .plyr__controls > .plyr__time { font-size: 16px !important; }
@container pbox (max-width: 640px) { .player-box .plyr--video .plyr__controls > .plyr__time { font-size: 16px !important; } }
.plyr .plyr__preview-thumb { background: transparent !important; border: 0 !important; box-shadow: 0 8px 26px rgb(0 0 0 / 0.5) !important; border-radius: 12px !important; overflow: hidden; padding: 0 !important; }
.plyr .plyr__preview-thumb__image-container { background: #14121a !important; border-radius: 12px !important; }
.plyr .plyr__preview-thumb__time-container { border-radius: 0 0 12px 12px !important; }
.plyr .plyr__preview-thumb__time-container span { font-size: 16px !important; font-weight: 600; }

/* «Davom ettirilmoqda» xabari: progress qatoridan yuqorida turadi */
.player-box .toast-resume { bottom: 104px; left: 16px; }
@container pbox (max-width: 640px) { .player-box .toast-resume { bottom: 92px; left: 10px; } }
.player-box .toast-resume { bottom: 88px; }
@container pbox (max-width: 640px) { .player-box .toast-resume { bottom: 82px; } }


/* ============================== Pleyer sozlamalari oynasi (zamonaviy va qulay) ============================== */
.plyr .plyr__menu__container { min-width: 260px; padding: 8px; border-radius: 16px; }
.plyr .plyr__menu__container [role="menu"] { max-height: min(320px, 56vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / 0.25) transparent; }
.plyr .plyr__menu__container .plyr__control { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 46px; margin: 0; padding: 11px 14px; border-radius: 10px; font-size: 15px; line-height: 1.2; color: #f1eef8; text-align: left; transition: background-color 0.15s ease, color 0.15s ease; }
.plyr .plyr__menu__container .plyr__control > span:not(.plyr__menu__value):not(.plyr--visually-hidden) { flex: 1; }
.plyr .plyr__menu__container .plyr__control + .plyr__control { margin-top: 2px; }
.plyr .plyr__menu__container .plyr__control:hover { background: rgb(255 255 255 / 0.09); }
.plyr .plyr__menu__container .plyr__menu__value { display: flex; align-items: center; margin-left: auto; padding-left: 16px; overflow: visible; color: #b9b2cc; font-size: 14px; font-weight: 500; }

/* bosh ro‘yxat: o‘ngga strelka */
.plyr .plyr__menu__container .plyr__control--forward { padding-right: 40px; }
.plyr .plyr__menu__container .plyr__control--forward::after { content: ""; border: 0; width: 16px; height: 16px; right: 14px; top: 50%; transform: translateY(-50%); background: #b9b2cc; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.plyr .plyr__menu__container .plyr__control--forward:hover::after { background: #fff; }

/* orqaga qaytish sarlavhasi */
.plyr .plyr__menu__container .plyr__control--back { margin: 0 0 8px; padding: 11px 14px 11px 40px; font-weight: 700; border-radius: 10px; }
.plyr .plyr__menu__container .plyr__control--back::before { content: ""; border: 0; width: 16px; height: 16px; left: 14px; top: 50%; transform: translateY(-50%); background: #f1eef8; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 6-6 6 6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 6-6 6 6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.plyr .plyr__menu__container .plyr__control--back::after { content: ""; display: block; position: absolute; left: 6px; right: 6px; bottom: -5px; width: auto; height: 1px; background: rgb(255 255 255 / 0.12); }

/* variantlar: tanlangani urg‘u fonida, o‘ngda ✓ */
.plyr .plyr__menu__container .plyr__control[role="menuitemradio"] { position: relative; padding: 11px 44px 11px 14px; }
.plyr .plyr__menu__container .plyr__control[role="menuitemradio"]::before { display: none; }
.plyr .plyr__menu__container .plyr__control[role="menuitemradio"]::after { content: ""; border: 0; border-radius: 0; left: auto; right: 14px; top: 50%; width: 18px; height: 18px; background: #cbb8f0; opacity: 0; transform: translateY(-50%) scale(0.4); transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E") center / contain no-repeat; }
.plyr .plyr__menu__container .plyr__control[role="menuitemradio"][aria-checked="true"] { background: rgb(183 156 232 / 0.18); color: #eadffd; font-weight: 650; }
.plyr .plyr__menu__container .plyr__control[role="menuitemradio"][aria-checked="true"]::after { opacity: 1; transform: translateY(-50%) scale(1); }
.plyr .plyr__menu__container .plyr__control[role="menuitemradio"][aria-checked="true"]:hover { background: rgb(183 156 232 / 0.26); }
@media (prefers-reduced-motion: reduce) { .plyr .plyr__menu__container .plyr__control[role="menuitemradio"]::after { transition: none; } }
@container pbox (max-width: 380px) { .plyr .plyr__menu__container { min-width: 220px; } }
/* Sozlamalar menyusi: tuzatishlar */
.plyr .plyr__menu__container .plyr__control--back::after { border: 0 !important; height: 1px !important; width: auto !important; left: 6px !important; right: 6px !important; bottom: -5px !important; top: auto !important; transform: none !important; background: rgb(255 255 255 / 0.12) !important; }
.plyr .plyr__menu__container .plyr__control--back .plyr__menu__value { display: none; }
.plyr .plyr__menu__container [role="menu"] { max-height: min(380px, 68vh); }

/* Sozlamalar menyusi: o‘lcham animatsiyasi yo‘q (qatorlar darrov to‘liq kenglikda), fokus ramkasi ichkarida */
.plyr .plyr__menu__container { width: 280px; }
.plyr .plyr__menu__container > div { width: 100% !important; }
.plyr .plyr__menu__container [role="menu"] { width: 100%; box-sizing: border-box; }
.plyr .plyr__menu__container .plyr__control:focus-visible { outline: 0 !important; box-shadow: inset 0 0 0 2px rgb(183 156 232 / 0.75); }
@container pbox (max-width: 380px) { .plyr .plyr__menu__container { width: 230px; } }
/* «Orqaga» sarlavhasi: faqat bitta ajratuvchi chiziq (eski border-bottom olib tashlandi) */
.plyr .plyr__menu__container .plyr__control--back { border-bottom: 0 !important; border-radius: 10px !important; margin-bottom: 8px; }

/* Menyu: kenglik qat'iy (qatorlar darrov to‘liq), balandlik esa silliq animatsiya bilan o‘zgaradi */
.plyr .plyr__menu__container > div { transition: height 0.32s cubic-bezier(0.4, 0, 0.2, 1) !important; }
@media (prefers-reduced-motion: reduce) { .plyr .plyr__menu__container > div { transition: none !important; } }


/* ============================== Ulashish oynasi ============================== */
.share-dlg { border: 0; padding: 0; width: min(92vw, 520px); max-height: 90vh; border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-l); overflow: hidden; }
.share-dlg::backdrop { background: rgb(8 12 20 / 0.58); }
.share-dlg[open] { animation: dlg-in 0.22s cubic-bezier(0.22, 0.8, 0.3, 1); }
.share-dlg[open]::backdrop { animation: dlg-fade 0.2s ease-out; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes dlg-fade { from { opacity: 0; } to { opacity: 1; } }
.sd-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem 0.4rem; }
.sd-head h2 { margin: 0; font-size: 1.25rem; }
.sd-body { padding: 0.6rem 1.25rem 1.3rem; overflow-y: auto; max-height: calc(90vh - 70px); }
.sd-targets { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.4rem 0 1rem; scrollbar-width: none; }
.sd-targets::-webkit-scrollbar { display: none; }
.sd-t { display: grid; justify-items: center; gap: 0.45rem; min-width: 68px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 0.82rem; font-weight: 560; text-decoration: none; cursor: pointer; }
.sd-t:hover { text-decoration: none; }
.sd-ico { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; transition: transform 0.15s ease; }
.sd-t:hover .sd-ico { transform: scale(1.08); }
.sd-ico .ico { width: 26px; height: 26px; fill: none; stroke: currentColor; }
.sd-field { margin-top: 0.6rem; }
.sd-field label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; font-weight: 600; }
.sd-time { display: flex; align-items: center; gap: 0.6rem; margin: 0.9rem 0 0.2rem; font-size: 0.95rem; }
.sd-note { margin: 1rem 0 0; padding: 0.7rem 0.9rem; border-radius: var(--r-m); background: var(--surface-2); color: var(--muted); font-size: 0.88rem; }
@media (prefers-reduced-motion: reduce) { .share-dlg[open], .share-dlg[open]::backdrop { animation: none; } }


/* ============================== Til almashtirgich ============================== */
.lang-menu { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 0.4rem; height: 44px; padding: 0 0.8rem; border: 1px solid transparent; border-radius: var(--r-m); background: transparent; color: var(--text); font: inherit; font-weight: 650; font-size: 0.9rem; cursor: pointer; transition: background-color 0.15s; }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { background: var(--surface-2); }
.lang-btn .ico { width: 20px; height: 20px; color: var(--muted); }
.lang-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 80; min-width: 170px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-l); animation: pop 0.14s ease-out; transform-origin: top right; }
.lang-pop button { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; width: 100%; padding: 0.6rem 0.8rem; border: 0; border-radius: 9px; background: none; color: var(--text); font: inherit; font-size: 0.95rem; text-align: left; cursor: pointer; }
.lang-pop button:hover { background: var(--surface-2); }
.lang-pop button[aria-current="true"] { color: var(--accent); font-weight: 650; background: var(--accent-soft); }
.lang-pop .ico { width: 18px; height: 18px; }
@media (max-width: 480px) { .lang-btn span { display: none; } .lang-btn { padding: 0 0.6rem; } }

/* ============================== Karta menyusi, obuna, pleylist, shikoyat ============================== */
.vcard .vlink::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.vcard .vlink { color: inherit; text-decoration: none; }
.vcard .vlink:focus-visible { outline: 0; }
.vcard:has(.vlink:focus-visible) .thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.vcard:has(.vlink:focus-visible)::before { opacity: 1; }
.vbody { display: flex; align-items: flex-start; gap: 0.25rem; }
.vtext { display: block; flex: 1; min-width: 0; }
.vtext .vtitle { display: -webkit-box; }
.vmenu-btn { position: relative; z-index: 4; flex: none; width: 34px; height: 34px; margin: -0.3rem -0.5rem 0 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; opacity: 0; transition: opacity 0.15s, background-color 0.15s; }
.vmenu-btn .ico { width: 20px; height: 20px; fill: none; stroke: currentColor; }
.vcard:hover .vmenu-btn, .vcard:focus-within .vmenu-btn, .vmenu-btn[aria-expanded="true"] { opacity: 1; }
.vmenu-btn:hover, .vmenu-btn[aria-expanded="true"] { background: color-mix(in srgb, var(--text) 10%, transparent); }
.vmenu-btn:focus-visible { outline: 2px solid var(--accent); opacity: 1; }
@media (hover: none) { .vmenu-btn { opacity: 1; } }
.side .vmenu-btn { width: 30px; height: 30px; margin: -2px -2px 0 0; }

.vmenu { position: fixed; z-index: 200; min-width: 260px; max-width: min(92vw, 340px); padding: 0.4rem 0; border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-l); border: 1px solid var(--line); opacity: 0; transform: translateY(-4px); transition: opacity 0.14s, transform 0.14s; }
.vmenu.show { opacity: 1; transform: none; }
.vm-item { display: flex; align-items: center; gap: 0.85rem; width: 100%; padding: 0.62rem 1rem; border: 0; background: none; color: inherit; font: inherit; font-size: 0.95rem; text-align: left; cursor: pointer; }
.vm-item .ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; }
.vm-item span { min-width: 0; overflow-wrap: anywhere; }
.vm-item:hover, .vm-item:focus-visible { background: var(--surface-2); outline: 0; }
.vm-sep { height: 1px; margin: 0.35rem 0; background: var(--line); }
.vmenu.sheet { left: 0 !important; right: 0; top: auto !important; bottom: 0; max-width: none; min-width: 0; border-radius: 18px 18px 0 0; padding: 0.5rem 0 calc(0.6rem + env(safe-area-inset-bottom)); transform: translateY(24px); transition: opacity 0.18s, transform 0.22s cubic-bezier(0.22, 0.8, 0.3, 1); }
.vmenu.sheet.show { transform: none; }
.vmenu.sheet::before { content: ""; display: block; width: 38px; height: 4px; margin: 0.1rem auto 0.5rem; border-radius: 4px; background: var(--line-strong); }
.vmenu.sheet .vm-item { padding: 0.85rem 1.25rem; font-size: 1rem; }
html.vmenu-open::after { content: ""; position: fixed; inset: 0; z-index: 190; background: rgb(8 12 20 / 0.45); }

.soc-toast { position: fixed; z-index: 300; left: 50%; bottom: 1.4rem; max-width: min(92vw, 420px); transform: translate(-50%, 12px); padding: 0.7rem 1.1rem; border-radius: 10px; background: var(--ink, #1c1b24); color: #fff; font-size: 0.93rem; box-shadow: var(--shadow-l); opacity: 0; transition: opacity 0.22s, transform 0.22s; pointer-events: none; }
.soc-toast.show { opacity: 1; transform: translate(-50%, 0); }

.soc-dlg { width: min(92vw, 440px); }
.pl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; max-height: 40vh; overflow-y: auto; }
.pl-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.4rem 0; }
.pl-list small { color: var(--muted); white-space: nowrap; }
.pl-empty { color: var(--muted); margin: 0.2rem 0 0.6rem; }
.pl-new-toggle { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.6rem; padding: 0.55rem 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.pl-new-toggle .ico { width: 20px; height: 20px; fill: none; stroke: currentColor; }
.pl-new { display: grid; gap: 0.35rem; margin-top: 0.6rem; }
.pl-new label, .rp-dl { font-size: 0.85rem; color: var(--muted); font-weight: 600; margin-top: 0.4rem; }
.rp-reasons { border: 0; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.rp-reasons legend { padding: 0; margin-bottom: 0.4rem; font-weight: 600; }
.rp-reasons .check { padding: 0.3rem 0; }
.rp-note { margin: 0.8rem 0 0; color: var(--muted); font-size: 0.85rem; }
.soc-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1rem; }
.soc-err { margin: 0.6rem 0 0; padding: 0.55rem 0.8rem; border-radius: var(--r-m); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); font-size: 0.9rem; }

.nav-badge { margin-left: auto; min-width: 20px; padding: 0 0.4rem; border-radius: 10px; background: var(--accent); color: #fff; font-size: 0.72rem; line-height: 20px; text-align: center; font-weight: 700; }
.page-head { margin-bottom: 1rem; }
.page-head h1, .pl-head h1 { margin: 0 0 0.2rem; }
.sub-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.6rem; }
.pl-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.pl-card { display: flex; align-items: center; gap: 0.9rem; padding: 1rem 1.1rem; border-radius: var(--r-l); background: var(--surface-2); color: var(--text); text-decoration: none; }
.pl-card:hover { background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); }
.pl-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--accent); flex: none; }
.pl-ico .ico { width: 24px; height: 24px; fill: none; stroke: currentColor; }
.pl-t { display: grid; min-width: 0; }
.pl-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-t small, .pl-hint { color: var(--muted); }
.pl-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.pl-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pl-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.pl-item { display: grid; grid-template-columns: 2rem 168px minmax(0, 1fr) auto; align-items: center; gap: 0.9rem; padding: 0.4rem 0.5rem; border-radius: var(--r-l); }
.pl-item:hover { background: var(--surface-2); }
.pl-n { text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.pl-thumb { width: 168px; }
.pl-info { display: grid; gap: 0.2rem; min-width: 0; }
.pl-vt { font-weight: 600; color: var(--text); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-ctl { display: flex; gap: 0.1rem; }
@media (max-width: 640px) { .pl-item { grid-template-columns: 1.4rem 112px minmax(0, 1fr); } .pl-thumb { width: 112px; } .pl-ctl { grid-column: 2 / -1; } }
@media (prefers-reduced-motion: reduce) { .vmenu, .vmenu.sheet, .soc-toast { transition: none; } }
.wmenu-btn { opacity: 1; margin: 0; width: 40px; height: 40px; background: var(--surface-2); }
.wmenu { display: inline-flex; }
.wmenu-btn .ico { transform: rotate(90deg); }
.sub-btn .ico { width: 18px; height: 18px; fill: none; stroke: currentColor; }
.sub-btn.on { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
.soc-dlg input[type="text"], .soc-dlg input:not([type]), .soc-dlg textarea, .soc-dlg select { width: 100%; padding: 0.6rem 0.8rem; border: 1px solid var(--control, var(--line-strong)); border-radius: var(--r-m); background: var(--surface); color: var(--text); font: inherit; }
.soc-dlg select { appearance: auto; }
.soc-dlg .select-wrap select { -webkit-appearance: none; appearance: none; }  /* maxsus strelka (.select-wrap::after) bor — brauzernikini yashiramiz */
.soc-dlg textarea { resize: vertical; }
.soc-dlg input:focus-visible, .soc-dlg textarea:focus-visible, .soc-dlg select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* «O‘chirish» (danger) tugmasi hover: `.btn.secondary.danger` bo‘lganda ham .secondary:hover (binafsha matn) bosib ketmasin */
.btn.danger:hover, .btn.secondary.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; box-shadow: none; }
/* Qorong‘i rejimda --danger och pushti: oq matn o‘qilmaydi, to‘q matn kerak */
:root[data-theme="dark"] .btn.danger:hover, :root[data-theme="dark"] .btn.secondary.danger:hover { color: #2a0b09; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.danger:hover, :root:not([data-theme="light"]) .btn.secondary.danger:hover { color: #2a0b09; } }

/* «O‘chirish» (danger) tugmasi oddiy holatda: chegarasi ham qizil tusda (.btn.secondary kulrang chegarasini bosib ketmasin) */
.btn.danger, .btn.secondary.danger { border-color: color-mix(in srgb, var(--danger) 60%, transparent); }
.btn.danger:hover, .btn.secondary.danger:hover { border-color: var(--danger); }

/* Ulashish tugmalari: bir qator; sig‘masa chetida fade bilan strelka chiqadi (YouTube kabi), sig‘sa ko‘rinmaydi */
.sd-scroll { position: relative; --fl: 0px; --fr: 0px; }
.sd-scroll .sd-targets {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
}
.sd-scroll.has-left { --fl: 36px; }
.sd-scroll.has-right { --fr: 36px; }
.sd-arrow {
  position: absolute; top: 0.4rem; width: 40px; height: 54px; display: grid; place-items: center; padding: 0; border: 0; background: none;
  cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; z-index: 1;
}
.sd-arrow::before {
  content: ""; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-strong, var(--line));
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.18); grid-area: 1 / 1;
}
.sd-arrow svg { grid-area: 1 / 1; width: 18px; height: 18px; fill: none; stroke: var(--text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; z-index: 1; }
.sd-arrow:hover::before { background: var(--accent-soft, var(--paper)); border-color: var(--accent); }
.sd-prev { left: -6px; } .sd-next { right: -6px; }
.sd-scroll.has-left .sd-prev, .sd-scroll.has-right .sd-next { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .sd-arrow { transition: none; } }

/* ---------- «Mening faolligim» ---------- */
.act-tabs { margin-bottom: 0.9rem; }
.chip-n { opacity: 0.65; font-variant-numeric: tabular-nums; margin-left: 0.15rem; }
.dot-new { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-left: 0.35rem; }
.act-search { display: flex; gap: 0.5rem; margin: 0 0 1.2rem; max-width: 520px; }
.act-search input { flex: 1; min-width: 0; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); color: var(--text); font: inherit; }
.act-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.act-item { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 1rem; align-items: start; padding: 0.8rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.act-item.act-report { grid-template-columns: 44px minmax(0, 1fr) auto; }
.act-thumb { width: 132px; aspect-ratio: 16 / 9; border-radius: var(--r-s); overflow: hidden; display: block; animation: none; }
.act-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.act-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2, var(--paper)); color: var(--muted); }
.act-ico.rep-open { color: var(--danger); }
.act-ico.rep-done { color: var(--ok); }
.act-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.2rem; }
.act-head .t { color: var(--text); font-weight: 650; text-decoration: none; }
.act-head .t:hover { color: var(--accent); }
.act-text { margin: 0.25rem 0 0.35rem; white-space: pre-wrap; overflow-wrap: anywhere; }
blockquote.act-text { margin: 0.3rem 0; padding: 0.2rem 0.8rem; border-left: 3px solid var(--line-strong, var(--line)); color: var(--muted); }
.act-note { margin-top: 0.4rem; padding: 0.5rem 0.7rem; border-radius: var(--r-s); background: var(--surface-2, var(--paper)); font-size: 0.92rem; }
.act-actions form { margin: 0; }
.badge.new { background: var(--danger); color: #fff; }
:root[data-theme="dark"] .badge.new { color: #2a0b09; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.new { color: #2a0b09; } }
.act-more { margin-top: 1rem; }
@media (max-width: 640px) {
  .act-item, .act-item.act-report { grid-template-columns: 96px minmax(0, 1fr); }
  .act-item.act-report { grid-template-columns: 44px minmax(0, 1fr); }
  .act-thumb { width: 96px; }
  .act-actions { grid-column: 1 / -1; }
}

/* ---------- «Mening videolarim»: statistika ustunlari va kartochkalar ---------- */
.vtable-scroll { overflow-x: auto; border-radius: var(--r-l); }
.vtable-stats th.c-num, .vtable-stats td.c-num { text-align: center; font-variant-numeric: tabular-nums; }
.vtable-stats td.zero { color: var(--muted); opacity: 0.55; }
.th-sort { color: inherit; text-decoration: none; white-space: nowrap; }
.th-sort:hover, .th-sort.on { color: var(--accent); text-decoration: none; }
.th-sort i { font-style: normal; margin-left: 0.2em; }
.stat small { font-size: 0.6em; font-weight: 500; color: var(--muted); }
.stat-up { font-style: normal; color: var(--ok); margin-left: 0.3rem; font-size: 0.82rem; }
.stat-warn b { color: var(--danger); }
.rep-badge { display: inline-block; min-width: 1.6rem; padding: 0.05rem 0.5rem; border-radius: 99px; background: var(--danger); color: #fff; font-weight: 650; text-decoration: none; }
:root[data-theme="dark"] .rep-badge { color: #2a0b09; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rep-badge { color: #2a0b09; } }
.rep-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.rep-list .rep { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-radius: var(--r-m); }
.status-pill.rep-open, .rep-pill.open { color: var(--danger); }
.status-pill.rep-done { color: var(--ok); }
.react-btn .n:empty { display: none; }
@media (max-width: 760px) {
  .vtable-stats td.c-num { display: inline-block; width: auto; padding: 0.15rem 0.2rem 0.15rem 1rem; text-align: left; }
  .vtable-stats td.c-num::before { content: attr(data-label) ": "; color: var(--muted); font-size: 0.82rem; }
  .vtable-stats td.c-num.zero { display: none; }
}

@media (min-width: 761px) {
  .vtable-stats th { padding: 0.8rem 0.6rem; font-size: 0.74rem; letter-spacing: 0.02em; }
  .vtable-stats td { padding: 0.8rem 0.6rem; }
  .vtable-stats .title-cell { grid-template-columns: 96px 1fr; gap: 0.75rem; min-width: 240px; }
  .vtable-stats td.c-status { min-width: 110px; }
}
.stat .stat-up { display: block; margin-top: 0.15rem; }

/* ---------- Kabinet: «bento» statistika paneli ---------- */
.b-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vtable-stats th.c-num .th-sort { display: inline-flex; align-items: center; gap: 0.2rem; }
.vtable-stats th.c-num .ico { width: 18px; height: 18px; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }
.b { --c: var(--accent); position: relative; overflow: hidden; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); padding: 1.15rem 1.3rem; }
.b-ico { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.b-ico .ico { width: 21px; height: 21px; }
.b-num { display: block; font-size: 2.1rem; font-weight: 680; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.b-num.s { font-size: 1.5rem; }
.b-lbl { color: var(--muted); font-size: 0.88rem; font-weight: 560; }

/* hero: obunachilar */
.b-hero { grid-column: span 4; color: #fff; border: 0; display: flex; flex-direction: column; gap: 0.35rem; isolation: isolate;
  background: linear-gradient(145deg, #5b32a3 0%, #3a1f66 55%, #2a1650 100%); }
.b-hero .b-ico { color: #fff; background: rgb(255 255 255 / 0.16); margin-bottom: 0.5rem; }
.b-hero .b-num { font-size: 3rem; }
.b-hero .b-lbl { color: rgb(255 255 255 / 0.78); }
.b-orb { position: absolute; z-index: -1; right: -48px; top: -48px; width: 190px; height: 190px; border-radius: 50%; border: 26px solid rgb(255 255 255 / 0.07); }
.b-orb.o2 { right: 40px; top: auto; bottom: -70px; width: 140px; height: 140px; border-width: 18px; border-color: rgb(255 255 255 / 0.05); }
.b-pill { align-self: flex-start; font-style: normal; font-size: 0.8rem; font-weight: 650; padding: 0.15rem 0.65rem; border-radius: 99px; background: rgb(110 231 160 / 0.2); color: #b6f3d0; }
.b-foot { margin-top: auto; padding-top: 0.9rem; display: flex; align-items: center; gap: 0.45rem; font-size: 0.9rem; color: rgb(255 255 255 / 0.8); }
.b-foot .ico { width: 18px; height: 18px; }
.b-foot b { color: #fff; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.is-all .b-hero { grid-column: span 4; }

/* yoqdi / yoqmadi */
.b-react { grid-column: span 5; display: flex; flex-direction: column; gap: 0.8rem; }
.is-all .b-react { grid-column: span 8; }
.react-nums { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.rn { display: inline-flex; align-items: center; gap: 0.65rem; }
.rn b { font-size: 2.1rem; font-weight: 680; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.rn.up .b-ico { --c: var(--ok); }
.rn.down .b-ico { --c: var(--danger); }
.react-split { display: flex; gap: 3px; height: 10px; border-radius: 99px; overflow: hidden; background: var(--line); animation: b-reveal 0.9s cubic-bezier(.2,.7,.2,1) both; }
.react-split i { min-width: 6px; }
.react-split i.up { background: var(--ok); border-radius: 99px 0 0 99px; }
.react-split i.down { background: var(--danger); border-radius: 0 99px 99px 0; }
.react-split i.up:only-child { border-radius: 99px; }
.react-split i.down:only-child { border-radius: 99px; }
@keyframes b-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.react-foot { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: auto; }
.react-foot span { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.8rem; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: 0.86rem; }
.react-foot .ico { width: 17px; height: 17px; }
.react-foot b { color: var(--text); font-variant-numeric: tabular-nums; }

/* xotira halqasi */
.b-store { grid-column: span 3; display: flex; align-items: center; gap: 1rem; --c: var(--accent); }
.b-store.warm { --c: var(--warn); }
.b-store.hot { --c: var(--danger); }
.ring { position: relative; flex: none; width: 92px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--surface); }
.ring span { position: relative; font-weight: 680; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.ring small { font-size: 0.65em; color: var(--muted); font-weight: 600; }
.store-txt { display: grid; gap: 0.2rem; min-width: 0; }
.store-txt b { font-size: 1.3rem; letter-spacing: -0.02em; }
.store-txt span { color: var(--muted); font-size: 0.84rem; }

/* kichik kartalar */
.b-sm { grid-column: span 4; display: flex; align-items: center; gap: 0.9rem; padding: 0.95rem 1.2rem; }
.b-sm.c-acc { --c: var(--accent); }
.b-sm.c-warn { --c: var(--warn); }
.b-sm.c-ok { --c: var(--ok); }
.b-sm.c-bad { --c: var(--danger); }
.b-sm > div { display: grid; gap: 0.1rem; min-width: 0; }
.b-sm.is-alert { background: color-mix(in srgb, var(--danger) 7%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.b-sm.is-alert .b-num { color: var(--danger); }
.b-sm.is-alert .b-ico { animation: b-pulse 2.2s ease-in-out infinite; }
@keyframes b-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 40%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) { .react-split, .b-sm.is-alert .b-ico { animation: none; } }

@media (max-width: 1180px) {
  .b-hero, .b-react { grid-column: span 6; }
  .is-all .b-hero { grid-column: span 5; } .is-all .b-react { grid-column: span 7; }
  .b-store { grid-column: span 12; }
}
@media (max-width: 760px) {
  .b-hero, .b-react, .is-all .b-hero, .is-all .b-react { grid-column: span 12; }
  .b-sm { grid-column: span 6; padding: 0.8rem 0.9rem; gap: 0.7rem; }
  .b-sm:last-child { grid-column: span 12; }
  .b-hero .b-num { font-size: 2.6rem; }
}

/* ============================== Ko‘rishlar tarixi ============================== */
.hist-tools { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; margin: 0 0 0.4rem; }
.hist-tools .act-search { margin: 0; flex: 1 1 320px; }
.hist-tools form { margin: 0; }
.hist-day { font-size: 1.05rem; margin: 1.6rem 0 0.9rem; }
.hist-item { position: relative; isolation: isolate; display: flex; flex-direction: column; min-width: 0; }
/* hover ramkasi butun element (karta + ko‘rilganlik qatori) atrofida bo‘lsin */
.hist-item .vcard::before, .hist-item .vcard:has(.vlink:focus-visible)::before { display: none; }
.hist-item::before { content: ""; position: absolute; inset: -12px; z-index: -1; border-radius: 16px; background: var(--card-hover, var(--surface-2)); opacity: 0; transition: opacity 0.2s ease, background-color 0.3s ease; pointer-events: none; }
@media (hover: hover) { .hist-item:hover::before { opacity: 1; } }
.hist-item:focus-within::before { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hist-item::before { transition: none; } }
.hist-meta { display: grid; gap: 0.4rem; margin-top: 0.6rem; }
.hist-bar { height: 4px; border-radius: 99px; overflow: hidden; background: color-mix(in srgb, var(--text) 14%, transparent); }
.hist-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.hist-bar.done i { background: #2e9e6b; }
.hist-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; }
.hist-row form { margin: 0; }
.hist-rm { border: 0; background: none; padding: 0.15rem 0; font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.hist-rm:hover, .hist-rm:focus-visible { color: var(--danger, #c0392b); text-decoration: underline; }

/* ---------- «Obuna bo‘lish» tugmasi: aniq holatlar va yumshoq effektlar ---------- */
/* Eslatma: asosiy .btn qoidasi `:not(.secondary):not(.danger):not(.light)` bilan kuchaytirilgan — shuning uchun bu yerda ham xuddi shunday maxsuslik. */
.btn.sub-btn { position: relative; overflow: visible; }
.btn.sub-btn .ico { transform-origin: 50% 8%; }
.btn.sub-btn .emo { display: inline-block; font-size: 1.15rem; line-height: 1; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.btn.sub-btn.has-emo .ico { display: none; }
.btn.sub-btn.on:not(.secondary):not(.danger):not(.light),
.btn.sub-btn.on:not(.secondary):not(.danger):not(.light):hover,
.btn.sub-btn.on:not(.secondary):not(.danger):not(.light):focus-visible {
  background-image: none; background-color: var(--accent-soft); color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
}
.btn.sub-btn.on:not(.secondary):not(.danger):not(.light):hover { background-color: color-mix(in srgb, var(--accent) 20%, var(--surface)); }
.btn.sub-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; box-shadow: none; }
.btn.sub-btn > span.sub-lab { display: inline-block; }
.btn.sub-btn > span.lab-in { animation: sub-label 0.5s ease-out; }
@keyframes sub-label { from { opacity: 0; transform: translateY(0.35em); } to { opacity: 1; transform: none; } }

/* --- Obuna bo‘lish: yumshoq «sakrash» + bitta halqa (≈ 1.4 s) --- */
.btn.sub-btn.just-on { animation: sub-pop 0.8s cubic-bezier(0.2, 0.8, 0.3, 1.15), sub-ring 1.3s ease-out; }
.btn.sub-btn.just-on .emo { animation: emo-pop 0.9s cubic-bezier(0.2, 0.8, 0.3, 1.2); }
.btn.sub-btn.just-on .ico { animation: bell-ring 1s ease-in-out; }
@keyframes sub-pop { 0% { transform: scale(0.97); } 35% { transform: scale(1.06); } 70% { transform: scale(0.99); } 100% { transform: scale(1); } }
@keyframes sub-ring { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 38%, transparent); } to { box-shadow: 0 0 0 14px transparent; } }
@keyframes emo-pop { 0% { transform: scale(0.4) rotate(-25deg); opacity: 0; } 55% { transform: scale(1.25) rotate(8deg); opacity: 1; } 100% { transform: none; } }
@keyframes bell-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg) scale(1.12); } 35% { transform: rotate(-14deg) scale(1.12); } 55% { transform: rotate(9deg); } 75% { transform: rotate(-4deg); } }

/* --- Obunani bekor qilish: yengil «cho‘kish» (≈ 1.1 s) --- */
.btn.sub-btn.just-off { animation: sub-deflate 0.7s ease-out, sub-fade-ring 1s ease-out; }
.btn.sub-btn.just-off .emo { animation: emo-sleep 0.8s ease-in-out; }
.btn.sub-btn.just-off .ico { animation: bell-sleep 0.9s ease-in-out; }
@keyframes sub-deflate { 0% { transform: scale(1); } 30% { transform: scale(0.95); } 65% { transform: scale(1.015); } 100% { transform: scale(1); } }
@keyframes sub-fade-ring { from { box-shadow: 0 0 0 10px color-mix(in srgb, var(--muted) 28%, transparent); } to { box-shadow: 0 0 0 0 transparent; } }
@keyframes emo-sleep { 0% { transform: none; opacity: 1; } 35% { transform: rotate(22deg) translateY(2px); opacity: 0.45; } 100% { transform: none; opacity: 1; } }
@keyframes bell-sleep { 0% { transform: rotate(0); opacity: 1; } 35% { transform: rotate(22deg); opacity: 0.5; } 100% { transform: rotate(0); opacity: 1; } }

/* Zarrachalar: silliq paydo bo‘ladi, sekin siljiydi va silliq so‘nadi */
.sub-spark { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--c, #f2b84b);
  pointer-events: none; z-index: 6; opacity: 0; animation: sub-spark 1.1s cubic-bezier(0.12, 0.8, 0.25, 1) forwards; }
.sub-spark.star { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 0;
  clip-path: polygon(50% 0, 62% 36%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 38% 36%); }
.sub-spark.bar { width: 4px; height: 11px; margin: -5.5px 0 0 -2px; border-radius: 2px; }
.sub-spark.ring { width: 9px; height: 9px; background: transparent; border: 2px solid var(--c, #f2b84b); }
.sub-spark.dust { width: 6px; height: 6px; margin: -3px 0 0 -3px; animation: sub-dust 1.3s ease-out forwards; }
@keyframes sub-spark {  /* tez portlash (ease-out), so‘ng sekin pastga tushib silliq so‘nadi */
  0% { transform: translate(0, 0) scale(0.5) rotate(0); opacity: 0; }
  10% { opacity: 1; }
  46% { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(calc(var(--rot) * 0.6)); opacity: 1; }
  100% { transform: translate(calc(var(--dx) * 1.08), calc(var(--dy) + var(--fall))) scale(0.75) rotate(var(--rot)); opacity: 0; }
}
@keyframes sub-dust {
  0% { transform: translate(0, 0) scale(0.7); opacity: 0; }
  25% { opacity: 0.7; }
  100% { transform: translate(var(--dx), calc(var(--dy) + var(--fall))) scale(0.5); opacity: 0; }
}

/* Nishon: 🎉 / 🔕 (emoji bo‘lmasa — «✓» / «×» doirasi) */
.sub-badge { position: absolute; top: -12px; right: -10px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; z-index: 7; pointer-events: none;
  color: #fff; background: #2f9e6b; box-shadow: 0 2px 6px rgb(0 0 0 / 0.2); opacity: 0; animation: sub-badge-ok 1.8s ease-in-out forwards; }
.sub-badge .ico { width: 14px; height: 14px; stroke-width: 3; }
.sub-badge.off { background: var(--muted); animation: sub-badge-off 1.3s ease-in-out forwards; }
.sub-badge.emo-badge { width: auto; height: auto; background: none; box-shadow: none; border-radius: 0; font-size: 22px; line-height: 1; top: -16px; right: -12px;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
@keyframes sub-badge-ok { 0% { transform: scale(0.3); opacity: 0; } 22% { transform: scale(1.12); opacity: 1; } 34% { transform: scale(1); } 75% { transform: translateY(-3px); opacity: 1; } 100% { transform: translateY(-9px); opacity: 0; } }
@keyframes sub-badge-off { 0% { transform: scale(0.4); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 70% { transform: translateY(3px); opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .btn.sub-btn.just-on, .btn.sub-btn.just-on .ico, .btn.sub-btn.just-on .emo, .btn.sub-btn.just-off, .btn.sub-btn.just-off .ico, .btn.sub-btn.just-off .emo, .btn.sub-btn > span.lab-in { animation: none; }
  .sub-spark, .sub-badge { display: none; }
}
/* Telefonda tugma faqat ikonka bo‘lib qoladi: shu qoida emoji va nishonni yashirib qo‘ymasin */
.byline .btn.sub-btn span.emo { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
.byline .btn.sub-btn span.sub-badge { position: absolute; width: 24px; height: 24px; overflow: visible; clip-path: none; }
.byline .btn.sub-btn span.sub-badge.emo-badge { width: auto; height: auto; }
/* Fan sahifasi: sarlavha yonidagi tugma */
.sec-head .sub-btn { flex: none; align-self: center; }

/* ---------- Yoqdi / Yoqmadi: bosilganda animatsiya ---------- */
.react-btn { position: relative; }
.react-btn .n { display: inline-block; }
.react-btn.fx-like { animation: like-glow 1.1s ease-out; }
.react-btn.fx-like svg { animation: like-jump 1s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
.react-btn.fx-dislike { animation: dislike-shake 0.6s ease-in-out, dislike-fade 1s ease-out; }
.react-btn.fx-dislike svg { animation: dislike-drop 0.95s cubic-bezier(0.3, 0.7, 0.3, 1); }
.react-btn.fx-off { animation: react-off 0.65s cubic-bezier(0.3, 0.7, 0.3, 1); }
.react-btn .n.n-up { animation: n-up 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
.react-btn .n.n-down { animation: n-down 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes like-glow {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); background-color: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
  100% { box-shadow: 0 0 0 12px transparent; }
}
@keyframes like-jump {
  0% { transform: rotate(0) scale(1); } 18% { transform: rotate(-30deg) translateY(3px) scale(0.8); } 42% { transform: rotate(-12deg) translateY(-7px) scale(1.35); }
  62% { transform: rotate(6deg) translateY(0) scale(0.95); } 80% { transform: rotate(-3deg) scale(1.08); } 100% { transform: rotate(0) scale(1); }
}
@keyframes dislike-drop {
  0% { transform: translateY(0) rotate(180deg) scale(1); } 22% { transform: translateY(-3px) rotate(202deg) scale(0.84); } 48% { transform: translateY(6px) rotate(157deg) scale(1.18); }
  70% { transform: translateY(1px) rotate(188deg) scale(0.97); } 100% { transform: translateY(0) rotate(180deg) scale(1); }
}
@keyframes dislike-shake { 0%, 100% { transform: translateX(0); } 18% { transform: translateX(-4px); } 36% { transform: translateX(4px); } 54% { transform: translateX(-3px); } 72% { transform: translateX(2px); } }
@keyframes dislike-fade { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--muted) 40%, transparent); } to { box-shadow: 0 0 0 14px transparent; } }
@keyframes react-off { 0% { transform: scale(1); } 30% { transform: scale(0.9); } 65% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes n-up { 0% { transform: translateY(70%) scale(1.5); opacity: 0.1; } 60% { transform: translateY(-8%) scale(1.15); opacity: 1; } 100% { transform: none; } }
@keyframes n-down { 0% { transform: translateY(-70%) scale(0.8); opacity: 0.1; } 60% { transform: translateY(8%) scale(1); opacity: 1; } 100% { transform: none; } }
.react-spark { position: absolute; left: 27px; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--c, #f2b84b);
  pointer-events: none; z-index: 6; opacity: 0; animation: sub-spark 1.05s cubic-bezier(0.12, 0.8, 0.25, 1) forwards; }
.react-spark.star { width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 0;
  clip-path: polygon(50% 0, 62% 36%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 38% 36%); }
.react-spark.bar { width: 4px; height: 11px; margin: -5.5px 0 0 -2px; border-radius: 2px; }
.react-spark.dust { width: 6px; height: 6px; margin: -3px 0 0 -3px; animation: sub-dust 1.1s cubic-bezier(0.2, 0.6, 0.4, 1) forwards; }
@media (prefers-reduced-motion: reduce) {
  .react-btn.fx-like, .react-btn.fx-like svg, .react-btn.fx-dislike, .react-btn.fx-dislike svg, .react-btn.fx-off, .react-btn .n.n-up, .react-btn .n.n-down { animation: none; }
  .react-spark { display: none; }
}

/* Fan sahifasi: tugma sarlavha ostida */
.sec-title .sub-btn { margin-top: 0.6rem; }

/* ---------- Fan sahifasi: o‘ng panelsiz; ixcham ikkilamchi «Obuna» tugmasi sarlavha qatorida ---------- */
.home-grid.no-rail { grid-template-columns: minmax(0, 1fr); }
.sec-head.has-sub > .sub-btn { margin-left: auto; flex: none; }
.sec-head.has-sub .sort-bar { flex: 0 0 100%; margin-left: 0; }   /* saralash chiplari keyingi qatorda, chapdan */
.sec-head.sm { justify-content: space-between; }
.see-all { margin-left: auto; font-size: 0.88rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.see-all:hover { text-decoration: underline; }
/* Ikkilamchi (ramkali) obuna tugmasi: obuna bo‘lingach och binafsha fon + to‘q binafsha matn */
.btn.sub-btn.secondary.on, .btn.sub-btn.secondary.on:hover, .btn.sub-btn.secondary.on:focus-visible {
  background-color: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 38%, transparent);
}
.btn.sub-btn.secondary.on:hover { background-color: color-mix(in srgb, var(--accent) 20%, var(--surface)); }
/* Faqat qo‘ng‘iroq ikonkali yumaloq tugma (matn ekran o‘qiydiganlar uchun yashirin) */
.btn.sub-btn.sub-icon { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; flex: none; }
.btn.sub-btn.sub-icon .ico { width: 20px; height: 20px; }
.btn.sub-btn.sub-icon > span.sub-lab { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- O‘qituvchilar sahifasi: video kartalari tuzilmasida (muqova + avatar + matn + ikonka-tugma) ---------- */
.tcard { display: flex; flex-direction: column; gap: 0.7rem; min-width: 0; }
.tcard-media { position: relative; margin-bottom: 1.45rem; }   /* avatar muqova chetidan chiqib turadi */
.tcard-thumb::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgb(0 0 0 / 0.30), transparent 55%); }
.tcard-thumb .dur { z-index: 1; }
.tcard-avatar { position: absolute; left: 14px; bottom: -1.45rem; display: block; border-radius: 50%; line-height: 0; text-decoration: none; }
.tcard-avatar .avatar { width: 56px; height: 56px; font-size: 1.1rem; border: 3px solid var(--bg); box-sizing: content-box; }
.tcard .vbody { align-items: flex-start; }
.tcard .sub-btn { margin-top: 0.15rem; }

/* Fan sahifasi, telefon: tugma matnsiz (faqat qo‘ng‘iroq ikonkasi) va fan nomi qatorida qoladi */
.sec-head.has-sub .sec-title { flex: 1 1 0; min-width: 0; }
@media (max-width: 640px) {
  .sec-head.has-sub > .sub-btn { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; margin-left: auto; flex: none; }
  .sec-head.has-sub > .sub-btn .ico { width: 20px; height: 20px; }
  .sec-head.has-sub > .sub-btn > span.sub-lab { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* O‘qituvchi kartasi: video kartasi bilan bir xil matn uslubi, butun karta bosiladi, zich oraliq */
.tcard { position: relative; gap: 0; }
.tcard-media { margin-bottom: 1.2rem; }
.tcard-avatar { bottom: -1.2rem; }
.tcard-avatar .avatar { width: 52px; height: 52px; font-size: 1.05rem; }
.tcard .vbody { margin-top: 0.55rem; }
.tcard .vlink { color: inherit; text-decoration: none; }
.tcard .vlink::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.tcard .vlink:focus-visible { outline: 0; }
.tcard:has(.vlink:focus-visible) .thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.tcard:hover .vtitle { color: var(--accent); }
.tcard .sub-btn { position: relative; z-index: 2; }
.tcard-avatar { z-index: 1; }

/* ---------- Obunalar: o‘qituvchilar va fanlar alohida guruhlarda ---------- */
.sub-groups { display: grid; gap: 0.7rem; margin: 0 0 1.5rem; }
.sub-group { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.sub-group-label { display: inline-flex; align-items: center; gap: 0.45rem; min-width: 8.2rem; color: var(--muted); font-size: 0.78rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; }
.sub-group-label .ico { width: 16px; height: 16px; }
.chip.chip-teacher { padding-left: 0.35rem; }
.chip .mini-av { width: 24px; height: 24px; flex: none; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; font-style: normal;
  background: var(--accent-soft); color: var(--accent); font-size: 0.62rem; font-weight: 700; }
.chip.chip-subject { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip.chip-subject:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.chip.chip-subject .ico { width: 16px; height: 16px; flex: none; }
@media (max-width: 640px) { .sub-group-label { min-width: 100%; } }

/* ---------- «Obuna bo‘lish»: tezkor va silliq o‘tish (2026-11-18) ---------- */
/* ranglar keskin almashmaydi; bosilganda tugma biroz «botadi» */
.btn.sub-btn { transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1); }
.btn.sub-btn:active:not([aria-busy]) { transform: scale(0.94); transition-duration: 0.3s, 0.3s, 0.3s, 0.08s; }
.btn.sub-btn[aria-busy] { cursor: progress; }
/* kenglik o‘zgarishi (JS boshqaradi): yozuv tugmadan toshib chiqmaydi */
.btn.sub-btn.morphing { transition: width 0.34s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
.btn.sub-btn.morphing > span.sub-lab { min-width: 0; overflow: hidden; white-space: nowrap; }
/* qo‘ng‘iroqdagi ✓: obuna bo‘lganda chizilib chiqadi, bekor qilinganda o‘chadi */
.btn.sub-btn .bell-k { stroke-dasharray: 1; stroke-dashoffset: 1; }
.btn.sub-btn.on .bell-k { stroke-dashoffset: 0; }
.btn.sub-btn.sub-live .bell-k { transition: stroke-dashoffset 0.22s ease-in; }
.btn.sub-btn.sub-live.on .bell-k { transition: stroke-dashoffset 0.4s cubic-bezier(0.3, 0.7, 0.3, 1) 0.32s; }
/* server xato qaytarsa: tugma ortga qaytadi va qisqa «bosh chayqaydi» */
.btn.sub-btn.sub-err { animation: sub-shake 0.42s ease-in-out; }
@keyframes sub-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-5px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@media (prefers-reduced-motion: reduce) {
  .btn.sub-btn, .btn.sub-btn.morphing, .btn.sub-btn.sub-live .bell-k, .btn.sub-btn.sub-live.on .bell-k { transition: none; }
  .btn.sub-btn:active:not([aria-busy]) { transform: none; }
  .btn.sub-btn.sub-err { animation: none; }
}

/* ---------- «Obuna bo‘lish»: doira va halqasiz, scroll chiqarmaydigan effektlar (2026-11-18, 2-tahrir) ---------- */
/* umumiy «ripple» doirasi bu tugmadan tashqariga chiqib kattalashardi — o‘chirildi */
.btn.sub-btn .ripple { display: none !important; }
/* tugma atrofida kengayadigan halqa olib tashlandi; «sakrash» ham yumshoqroq */
.btn.sub-btn.just-on { animation: sub-pop-soft 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.1); }
.btn.sub-btn.just-off { animation: sub-deflate 0.6s ease-out; }
@keyframes sub-pop-soft { 0% { transform: scale(0.97); } 45% { transform: scale(1.03); } 100% { transform: none; } }
/* zarrachalar va nishon ekran qatlamida (JS joylashtiradi) */
.sub-fx { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 1000; }
.sub-fx .sub-spark { left: var(--x); top: var(--y); }
.sub-fx .sub-badge { right: auto; }

/* ---------- «Obuna bo‘lish»: yangi animatsiya (2026-11-18, 3-tahrir) ---------- */
/* Ikki yozuv bir katakda: tugma eni doim kattasiga teng, holat almashganda o‘zgarmaydi — qator qayta o‘ralmaydi, scroll chiqmaydi */
.btn.sub-btn > span.sub-lab { display: inline-grid; }
.btn.sub-btn > span.sub-lab > span { grid-area: 1 / 1; text-align: center; white-space: nowrap; }
.btn.sub-btn:not(.on) > span.sub-lab > .sl-on { opacity: 0; transform: translateY(0.6em); }
.btn.sub-btn.on > span.sub-lab > .sl-off { opacity: 0; transform: translateY(-0.6em); }
.btn.sub-btn.sub-live > span.sub-lab > span { transition: opacity 0.2s ease, transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1); }
.btn.sub-btn .ico { overflow: visible; }
/* fon tez, yozuv/ikonka rangi sekinroq o‘zgaradi: o‘rtada matn «yo‘qolib» qolmaydi (kontrast saqlanadi) */
.btn.sub-btn { transition: background-color 0.28s ease-out, border-color 0.28s ease-out, color 0.28s ease-in, transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1); }
.btn.sub-btn:active:not([aria-busy]) { transform: scale(0.95); transition-duration: 0.28s, 0.28s, 0.28s, 0.08s; }
/* tugma: yengil «sakrash» (halqa va doira yo‘q) */
.btn.sub-btn.just-on { animation: sub-bounce 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.25); }
.btn.sub-btn.just-on .ico { animation: bell-swing 0.8s ease-in-out 0.05s; }
.btn.sub-btn.just-off { animation: sub-sink 0.35s ease-out; }
.btn.sub-btn.just-off .ico { animation: bell-tilt 0.5s ease-in-out; }
@keyframes sub-bounce { 0% { transform: scale(0.96); } 40% { transform: scale(1.04); } 70% { transform: scale(0.99); } 100% { transform: none; } }
@keyframes sub-sink { 0% { transform: scale(1); } 35% { transform: scale(0.965); } 100% { transform: none; } }
@keyframes bell-swing { 0% { transform: rotate(0) scale(1); } 12% { transform: rotate(-20deg) scale(1.12); } 30% { transform: rotate(16deg) scale(1.12); } 48% { transform: rotate(-10deg) scale(1.06); } 66% { transform: rotate(6deg); } 84% { transform: rotate(-2deg); } 100% { transform: rotate(0) scale(1); } }
@keyframes bell-tilt { 0%, 100% { transform: rotate(0); } 35% { transform: rotate(16deg); } 65% { transform: rotate(-6deg); } }
/* ✓ qo‘ng‘iroq ichida chiziladi (qo‘ng‘iroq silkinishi bilan uyg‘un) */
.btn.sub-btn.sub-live .bell-k { transition: stroke-dashoffset 0.2s ease-in; }
.btn.sub-btn.sub-live.on .bell-k { transition: stroke-dashoffset 0.35s cubic-bezier(0.3, 0.7, 0.3, 1) 0.2s; }
/* konfetti va emoji: .sub-spark / .sub-badge qoidalari yuqorida; ular ekran qatlamida (.sub-fx) — kesiladi, scroll chiqmaydi */
@media (prefers-reduced-motion: reduce) {
  .btn.sub-btn.just-on, .btn.sub-btn.just-off, .btn.sub-btn.just-on .ico, .btn.sub-btn.just-off .ico { animation: none; }
  .btn.sub-btn.sub-live > span.sub-lab > span, .btn.sub-btn.sub-live .bell-k { transition: none; }
  .sub-fx { display: none; }
}

/* ---------- Obunachilar soni; o‘qituvchi kartasida «qavat» (2026-11-19) ---------- */
/* Videosi ko‘p o‘qituvchi (2 va undan ko‘p): muqova orqasida ikki qavat — YouTube pleylistiga o‘xshab.
   Qavatlar muqovaning tepasidan ko‘rinib turadi; joy qatorlar oralig‘idan olinadi, shuning uchun kartalar o‘lchami o‘zgarmaydi.
   Muqova ustida sichqoncha effekti yo‘q. */
.tcard-media > .tcard-thumb { z-index: 1; }
.tcard-media.stack { --stack-1: var(--line-strong); --stack-2: var(--line); }
.tcard-media.stack::before, .tcard-media.stack::after { content: ""; position: absolute; z-index: 0; top: 0; height: 45%; border-radius: var(--r-l) var(--r-l) 0 0; pointer-events: none; }
.tcard-media.stack::after { left: 4%; right: 4%; transform: translateY(-7px); background: var(--stack-1); }
.tcard-media.stack::before { left: 8%; right: 8%; transform: translateY(-14px); background: var(--stack-2); }
.grid:has(> .tcard) { padding-top: 21px; }   /* birinchi qatordagi qavatlar qidiruv maydoniga tegmasin */
@media (max-width: 760px) { .tcard-media.stack::before, .tcard-media.stack::after { border-top-left-radius: 18px; border-top-right-radius: 18px; } }
/* o‘qituvchi sahifasi: «videodars» va «obunachi» ko‘rsatkichlari yonma-yon */
.ph-count + .ph-count { border-left: 1px solid var(--line); }

/* roppa-rosa 2 ta video: muqova orqasida bitta qavat (muqova bilan jami 2); 3 va undan ko‘p: ikki qavat (jami 3) */
.tcard-media.stack-1::before { display: none; }

/* Yig‘ilgan (ikonkali) yon panel: soni belgisi ikonka burchagida kichik nishon bo‘lib turadi (uzoqda emas) */
@media (min-width: 1001px) {
  html.side-collapsed .side-nav a { position: relative; }
  html.side-collapsed .side-nav .nav-badge {
    position: absolute; top: 0.3rem; left: calc(50% + 0.35rem); margin: 0; min-width: 18px; height: 18px; padding: 0 0.28rem;
    font-size: 0.64rem; line-height: 18px; border-radius: 9px; box-shadow: 0 0 0 2px var(--bg);
  }
}
