/* chess64.uz — chess.com uslubidagi interfeys (dark / light) */

:root {
  /* Asosiy rang — ko'k (chess64) */
  --accent: #4a7fa5;
  --accent-2: #5f95ba;
  --accent-3: #36607f;
  --accent-soft: rgba(74, 127, 165, .18);

  /* eski nomlar (kod bo'ylab ishlatiladi) */
  --green: var(--accent);
  --green-2: var(--accent-2);
  --green-3: var(--accent-3);
  --green-soft: var(--accent-soft);

  --bg: #302e2b;
  --bg-2: #262522;
  --surface: #262522;
  --surface-2: #3a3937;
  --surface-3: #4b4947;
  --line: rgba(255, 255, 255, .08);
  --text: #e9e7e4;
  --muted: #a09e9b;
  --muted-2: #7c7a77;

  --ok: #6fa650;          /* muvaffaqiyat (yechildi, g'alaba) */
  --danger: #e0574a;
  --warn: #e8b84b;
  --info: #5b9fd6;
  --gold: #f0c24b;

  --shadow-s: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 4px 14px rgba(0, 0, 0, .34);
  --shadow-l: 0 18px 44px rgba(0, 0, 0, .5);
  --inset: inset 0 1px 0 rgba(255, 255, 255, .05);

  --r-s: 5px;
  --r: 6px;
  --r-l: 8px;
  --side: 190px;
  --content: 1100px;
  --nav-text: #e3e1de;
  --btn-2: #3c3a37;
  --btn-2-hover: #484643;
  --btn-2-shadow: rgba(0, 0, 0, .28);
  --chart: #6aa6d4;

  --board-light: #dee3e6;
  --board-dark: #4a7fa5;
  /* Shriftlar: Manrope — interfeys, Onest — sarlavhalar va katta raqamlar (ikkalasi ham OFL, lotin + kirill) */
  --sans: "Manrope", "Segoe UI", system-ui, -apple-system, "Noto Sans", Arial, sans-serif;
  --display: "Onest", "Manrope", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

html[data-theme="light"] {
  --bg: #f6f5f4;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #eeedec;
  --surface-3: #e2e1df;
  --line: rgba(0, 0, 0, .09);
  --text: #312e2b;
  --muted: #6b6762;
  --muted-2: #8d8983;
  --shadow-s: 0 1px 2px rgba(0, 0, 0, .07);
  --shadow: 0 4px 14px rgba(31, 29, 26, .10);
  --shadow-l: 0 18px 44px rgba(31, 29, 26, .16);
  --inset: inset 0 1px 0 rgba(255, 255, 255, .9);
  --nav-text: #312e2b;
  --btn-2: #ebeae8;
  --btn-2-hover: #dfdedc;
  --btn-2-shadow: rgba(0, 0, 0, .12);
  --chart: #3f7fb0;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
/* telefon brauzerlari matnni o'zicha kattalashtirmasin (Chrome Android "text autosizing") — kartochkalar ichiga sig'sin */
html { -webkit-text-size-adjust: 100%; -moz-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
html[dir="rtl"] body { font-family: "Manrope", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif; }

/* Sarlavhalar, katta raqamlar va asosiy tugmalar — display shrift */
h1, h2, h3, .pf-name, .hh-name, .pc-title, .streak, .btn.xl, .btn.lg, .rp-v, .st-v, .pk-v, .ms-v,
.stat .v, .cmp-v, .run-time, .run-score, .run-combo, .coord-target, .clock, .b.lg, .side-card .b.lg {
  font-family: var(--display);
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { font-family: "Noto Sans Arabic", var(--display); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 20px; border: 2px solid var(--bg); }

.ic { width: 22px; height: 22px; display: block; }
.ic-wrap { display: inline-flex; align-items: center; justify-content: center; }
.lbl { display: inline-flex; align-items: center; gap: 6px; }
.chip .lbl .ic, .chip .ic { width: 15px; height: 15px; }
h1.page .lbl .ic, h3 .lbl .ic { width: 22px; height: 22px; }

/* ================= Layout ================= */
#app { min-height: 100vh; display: flex; }

.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 60;
  background: var(--bg-2); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 8px 8px 10px; overflow-y: auto;
}
html[data-theme="light"] .side { background: #fff; }
html[dir="rtl"] .side { inset: 0 0 0 auto; border-right: 0; border-left: 1px solid var(--line); }

/* logotip: mavzuga qarab ikki variant, yig'ilgan panelda — toj */
.side-logo { display: flex; align-items: center; padding: 8px 10px 14px; }
.side-logo img { display: block; }
.side-logo .logo-full { height: 46px; width: auto; max-width: 100%; }
.side-logo .logo-mark { display: none; width: 40px; height: 40px; }
html[data-theme="light"] .logo-on-dark, html:not([data-theme="light"]) .logo-on-light { display: none !important; }

.side-nav { display: flex; flex-direction: column; gap: 1px; }
.side-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px;
  padding: 7px 10px; border-radius: 6px; border: 0; background: none; cursor: pointer;
  color: var(--nav-text); font-weight: 800; font-size: 17px; letter-spacing: -.01em;
  text-align: left; transition: background .12s, color .12s;
}
.side-item .si-ic { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; }
.side-item .si-ic .ic { width: 30px; height: 30px; }
.side-item .si-ic .ic-img { width: 32px; height: 32px; }
.side-item:hover, .side-item.active { background: rgba(255, 255, 255, .07); color: #fff; }
html[data-theme="light"] .side-item:hover, html[data-theme="light"] .side-item.active { background: var(--surface-2); color: var(--text); }
.side-item.sm { font-size: 15px; min-height: 38px; font-weight: 700; color: var(--muted); }
.side-item.sm .si-ic .ic { width: 22px; height: 22px; }
.side-item.danger { color: var(--danger); }
.side-item.danger:hover { background: rgba(224, 87, 74, .12); }

.side-foot { margin-top: auto; padding-top: 10px; display: grid; gap: 2px; }
.side-user {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 6px;
  font-weight: 800; font-size: 15px; color: var(--text); overflow: hidden;
}
.side-user:hover, .side-user.active { background: rgba(255, 255, 255, .07); }
html[data-theme="light"] .side-user:hover { background: var(--surface-2); }
.side-user .si-tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-icons { display: flex; gap: 2px; padding: 2px 4px; }
.side-mini {
  position: relative; width: 38px; height: 36px; display: grid; place-items: center;
  border: 0; background: none; color: var(--muted-2); cursor: pointer; border-radius: 6px;
}
.side-mini:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.side-mini .ic { width: 21px; height: 21px; }
.badge {
  position: absolute; top: 2px; right: 2px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 800; border-radius: 9px; padding: 0 4px; line-height: 15px;
}

.more-pop {
  position: fixed; z-index: 120; width: 250px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l);
  box-shadow: var(--shadow-l); display: grid; gap: 2px;
  animation: pop .14s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.more-sep { height: 1px; background: var(--line); margin: 6px 4px; }

.main { margin-left: var(--side); flex: 1; min-width: 0; }
html[dir="rtl"] .main { margin-left: 0; margin-right: var(--side); }
.view { padding: 22px 28px 64px; max-width: var(--content); margin: 0 auto; }

/* Telefon paneli (faqat kichik ekranda ko'rinadi) */
.m-top, .m-tabs { display: none; }

/* ================= Komponentlar ================= */
.card {
  background: var(--surface); border-radius: var(--r-l); padding: 16px;
}
html[data-theme="light"] .card { border: 1px solid var(--line); box-shadow: var(--shadow-s); }
.card.flush { padding: 0; overflow: hidden; }
.card-head.pad { padding: 14px 16px 4px; margin-bottom: 4px; }
.card.tight { padding: 12px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
html[dir="rtl"] .card-head .right { margin-left: 0; margin-right: auto; }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.b { font-weight: 700; }
.center { text-align: center; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }
.hidden { display: none !important; }

h1.page { margin: 0 0 14px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
h1.page .ic { width: 26px; height: 26px; }

/* Tugmalar — chess.com: qalin matn, pastki "3D" soya */
.btn {
  border: 0; border-radius: 6px; padding: 8px 16px; min-height: 40px; font-weight: 800; font-size: 15px;
  cursor: pointer; background: var(--btn-2); color: var(--text); transition: background .12s, transform .06s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.2;
  box-shadow: 0 3px 0 var(--btn-2-shadow); -webkit-tap-highlight-color: transparent;
}
.btn .ic { width: 20px; height: 20px; }
.btn:hover { background: var(--btn-2-hover); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--btn-2-shadow); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-3); }
.btn.primary:hover { background: var(--green-2); }
.btn.primary:active { box-shadow: 0 1px 0 var(--green-3); transform: translateY(3px); }
.btn.ghost { background: transparent; border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger); color: #fff; box-shadow: 0 3px 0 #a93a30; }
.btn.block { width: 100%; }
.btn.lg { padding: 12px 20px; min-height: 50px; font-size: 18px; }
.btn.xl { padding: 12px 22px; min-height: 58px; font-size: 22px; border-radius: 8px; letter-spacing: -.01em; }
.btn.sm { padding: 5px 11px; min-height: 32px; font-size: 13.5px; border-radius: 5px; box-shadow: 0 2px 0 var(--btn-2-shadow); }
.btn.sm.ghost { box-shadow: none; }
.btn.big-btn { min-height: 50px; font-size: 18px; padding: 8px 14px; gap: 10px; }
.btn.big-btn .ic { width: 30px; height: 30px; }
.btn.big-btn .ic-img { width: 32px; height: 32px; }

.input, select.input, textarea.input {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 12px; min-height: 42px; outline: none; transition: .12s;
}
.input.lg { min-height: 50px; font-size: 16px; padding: 12px 14px; }
html[data-theme="light"] .input { background: #fff; }
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
textarea.input { min-height: 90px; resize: vertical; }
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; font-weight: 700; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 6px;
  background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--muted);
}
.chip .ic { width: 15px; height: 15px; }
.chip.green { background: var(--green-soft); color: var(--green-2); }
.chip.gold { background: rgba(240, 194, 75, .15); color: var(--gold); }
.chip.red { background: rgba(224, 87, 74, .15); color: var(--danger); }
.chip.blue { background: rgba(91, 159, 214, .15); color: var(--info); }
.chip.active { background: var(--green); color: #fff; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab {
  border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--muted);
  font-weight: 700; font-size: 14px; border-bottom: 3px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--text); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted-2); padding: 8px 10px; border-bottom: 1px solid var(--line); font-weight: 800;
}
html[dir="rtl"] table.tbl th { text-align: right; }
table.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.tbl tbody tr:hover td { background: var(--surface-2); }
table.tbl tr:last-child td { border-bottom: 0; }

.avatar {
  width: 34px; height: 34px; border-radius: 4px; background: var(--surface-3);
  display: grid; place-items: center; font-weight: 800; color: var(--green-2); flex: none;
  overflow: hidden; font-size: 13px;
}
.avatar.lg { width: 60px; height: 60px; border-radius: 6px; font-size: 22px; }
.avatar.md { width: 42px; height: 42px; border-radius: 4px; font-size: 15px; }
.avatar.sm { width: 30px; height: 30px; border-radius: 4px; font-size: 12px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.stat { background: var(--surface-2); border-radius: var(--r); padding: 12px 14px; }
.stat .v { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.stat .k { font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 700; }
.stat .ic { width: 20px; height: 20px; opacity: .9; }

.progress { height: 7px; background: var(--surface-3); border-radius: 20px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--green); border-radius: 20px; transition: width .4s; }

.list-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; transition: .12s; cursor: pointer; }
.list-item:hover { background: var(--surface-2); }
.list-item + .list-item { border-top: 1px solid var(--line); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ico { font-size: 34px; opacity: .5; margin-bottom: 8px; }

.toast-wrap { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: grid; gap: 8px; }
.toast {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green);
  padding: 11px 15px; border-radius: var(--r); box-shadow: var(--shadow-l); min-width: 230px;
  animation: slideIn .2s ease; font-size: 14px;
}
.toast.err { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } }

.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .66); z-index: 150; display: grid; place-items: center; padding: 18px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-l); width: min(560px, 100%); max-height: 88vh; overflow: auto; border: 1px solid var(--line); animation: pop .16s ease; }
.modal .m-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal .m-head h3 { margin: 0; font-size: 17px; }
.modal .m-body { padding: 18px; }
.modal .m-foot { padding: 13px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 0; background: var(--surface-2); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }

.spinner { width: 26px; height: 26px; border: 3px solid var(--surface-3); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; margin: 34px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= Taxta ================= */
.board-wrap { position: relative; width: 100%; }
.board {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 6px; overflow: hidden;
  box-shadow: var(--shadow-l); user-select: none; touch-action: none;
  display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr);
}
.sqr { position: relative; }
.sqr.l { background: var(--board-light); }
.sqr.d { background: var(--board-dark); }
/* Koordinatalar katak o'lchamiga (--sq, board.js) qarab: katakning ~1/5 qismi */
.sqr .coord { position: absolute; z-index: 3; font-size: 12px; font-size: max(10px, calc(var(--sq, 60px) * .2)); line-height: 1; font-weight: 700; pointer-events: none; }
.sqr .coord.f { right: 4%; bottom: 3%; }
.sqr .coord.r { left: 6%; top: 5%; }
.sqr.l .coord { color: var(--board-dark); }
.sqr.d .coord { color: var(--board-light); }

.pc { position: absolute; inset: 0; z-index: 2; cursor: grab; will-change: transform; }
.pc svg { width: 100%; height: 100%; display: block; pointer-events: none;
  filter: drop-shadow(0 2px 1.5px rgba(0, 0, 0, .28)); }
.pc .cp-shadow { display: none; }
.pc.dragging { cursor: grabbing; }
@keyframes pcIn { from { transform: scale(.82); opacity: .4; } }
.pc.fresh { animation: pcIn .16s ease; }

.hl { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.hl.sel { background: rgba(255, 255, 51, .5); }
.hl.last { background: rgba(255, 255, 51, .42); }
.hl.check { background: radial-gradient(circle, rgba(232, 60, 40, .9) 10%, rgba(232, 60, 40, .55) 45%, rgba(232, 60, 40, 0) 72%); }
.hl.good { background: rgba(116, 186, 122, .55); }
.hl.bad { background: rgba(224, 87, 74, .6); }
.hl.hint { box-shadow: inset 0 0 0 5px rgba(91, 159, 214, .9); animation: hintPulse 1.1s ease-in-out infinite; }
@keyframes hintPulse { 50% { box-shadow: inset 0 0 0 5px rgba(91, 159, 214, .35); } }
.dot { position: absolute; left: 50%; top: 50%; width: 30%; height: 30%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, .16); border-radius: 50%; pointer-events: none; z-index: 3; }
.dot.cap { width: 100%; height: 100%; background: none; box-shadow: inset 0 0 0 7px rgba(0, 0, 0, .16); }

.promo { position: absolute; z-index: 30; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-l); display: grid; padding: 3px; }
.promo button { border: 0; background: none; cursor: pointer; padding: 2px; border-radius: 6px; aspect-ratio: 1; }
.promo button:hover { background: var(--green-soft); }
.promo svg { width: 100%; height: 100%; }

/* O'yin paneli */
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.game-layout .board-wrap, .puzzle-layout .board-wrap { max-width: min(76vh, 640px); margin-inline: auto; }
.game-layout .player-bar { max-width: min(76vh, 640px); margin-inline: auto; }
.player-bar { display: flex; align-items: center; gap: 10px; padding: 6px 2px; }
.player-bar .name { font-weight: 700; }
.clock {
  margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 800; font-size: 21px;
  background: var(--surface-2); padding: 3px 13px; border-radius: 6px; min-width: 92px; text-align: center;
}
html[dir="rtl"] .clock { margin-left: 0; margin-right: auto; }
.clock.run { background: #f6f5f4; color: #262522; }
.clock.low { background: var(--danger); color: #fff; }
.captured { display: flex; gap: 0; min-height: 18px; }
.captured span { width: 18px; height: 18px; margin-right: -6px; opacity: .9; display: block; }
.captured span svg { width: 100%; height: 100%; }

.moves { max-height: 260px; overflow: auto; font-size: 14px; font-variant-numeric: tabular-nums; background: var(--bg); border-radius: 8px; padding: 4px; }
html[data-theme="light"] .moves { background: var(--surface-2); }
.moves .mv-row { display: grid; grid-template-columns: 32px 1fr 1fr; gap: 2px; }
.moves .mv-row:nth-child(odd) { background: var(--surface-2); }
html[data-theme="light"] .moves .mv-row:nth-child(odd) { background: rgba(0, 0, 0, .04); }
.moves .n { color: var(--muted-2); padding: 4px 6px; font-size: 12px; }
.moves .m { padding: 4px 6px; border-radius: 5px; cursor: pointer; font-weight: 700; }
.moves .m:hover { background: var(--surface-3); }
.moves .m.cur { background: var(--green); color: #fff; }

/* ================= Home ================= */
.home { max-width: 1060px; margin: 0 auto; }
.home-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; min-height: 44px; }
.hh-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hh-name { font-size: 20px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-head .streak { margin-left: auto; display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; white-space: nowrap; }
html[dir="rtl"] .home-head .streak { margin-left: 0; margin-right: auto; }
.flag { display: inline-flex; flex: none; }
.flag-ic { width: 26px; height: 17px; border-radius: 2px; display: block; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }

.hero { display: grid; grid-template-columns: 252px repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.hero-boards { display: contents; }
.play-card { display: grid; gap: 10px; align-content: start; padding: 12px; }
.play-card .pc-title { margin: 0; font-size: 19px; font-weight: 800; }
.big-btns { display: grid; gap: 10px; margin-top: 8px; }
.tc-row { display: flex; gap: 6px; }
.tc {
  flex: 1; min-height: 44px; padding: 6px 4px; border-radius: 6px; border: 2px solid transparent; cursor: pointer;
  background: var(--btn-2); font-weight: 700; text-align: center; font-size: 15px; transition: .12s; color: var(--text);
}
.tc:hover { background: var(--btn-2-hover); }
.tc.active { border-color: var(--green-2); background: var(--surface); }

.board-card {
  background: var(--surface); border-radius: var(--r-l); overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; transition: transform .16s;
}
html[data-theme="light"] .board-card { border: 1px solid var(--line); }
.board-card:hover { transform: translateY(-2px); }
.bc-board .mini-board { border-radius: 0; }
.bc-foot { padding: 12px; display: grid; gap: 12px; margin-top: auto; }
.bc-who { display: flex; align-items: center; gap: 10px; min-height: 42px; }
.bc-tx { min-width: 0; flex: 1; display: grid; gap: 6px; }
.bc-title { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-sub { font-size: 13px; color: var(--muted); }

.mini-board { display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; width: 100%; border-radius: 4px; overflow: hidden; }
.mini-board > div > div svg { width: 100%; height: 100%; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; margin-top: 16px; align-items: start; }
.home-main > * + *, .home-side > * + * { margin-top: 16px; }
.daily-pz { cursor: pointer; }
.count-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--surface-3); font-size: 12px; vertical-align: middle; }
.task-row { display: grid; gap: 10px; }
.task-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r); background: var(--surface-2); transition: .12s; }
.task-card:hover { background: var(--surface-3); }
.tk-tx { flex: 1; min-width: 0; }
.mt-s { margin-top: 6px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* O'yinlar tarixi jadvali (chess.com "Game History") */
.tbl-scroll { overflow-x: auto; }
.gh-tbl th { padding: 10px 12px; }
.gh-tbl td { padding: 10px 12px; vertical-align: middle; }
.gh-row { cursor: pointer; }
.gh-tc { white-space: nowrap; width: 90px; }
.gh-tc > * { vertical-align: middle; }
.gh-tc .ic-wrap { margin-right: 6px; }
.gh-tc span:last-child { font-size: 13px; color: var(--muted); }
.gh-players { min-width: 160px; }
.gh-player { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; line-height: 1.7; }
.gh-player.me .gh-name { color: var(--text); }
.gh-player:not(.me) .gh-name { color: var(--muted); }
.gh-color { width: 12px; height: 12px; border-radius: 2px; flex: none; }
.gh-color.w { background: #f0f0f0; }
.gh-color.b { background: #4b4947; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.gh-res { white-space: nowrap; }
.gh-res > * { display: inline-grid; vertical-align: middle; }
.gh-score { grid-template-rows: 1fr 1fr; font-size: 13px; font-weight: 800; line-height: 1.7; margin-right: 10px; text-align: center; min-width: 10px; }
.gh-moves, .gh-date { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.res-mark { width: 18px; height: 18px; border-radius: 3px; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800; line-height: 1; }
.res-mark.win { background: var(--ok); }
.res-mark.loss { background: var(--danger); }
.res-mark.draw { background: var(--muted-2); }

/* ================= Puzzle ================= */
.puzzle-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 18px; align-items: start; }
.puzzle-status { padding: 11px 13px; border-radius: 8px; font-weight: 700; display: flex; align-items: center; gap: 9px; background: var(--surface-2); }
.puzzle-status.good { background: var(--green-soft); color: var(--green-2); }
.puzzle-status.bad { background: rgba(224, 87, 74, .15); color: var(--danger); }
.hint-btns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }

/* ================= Settings ================= */
.settings-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); background: var(--surface); border-radius: var(--r-l); overflow: hidden; border: 1px solid var(--line); }
.settings-nav { background: var(--bg-2); padding: 12px; border-right: 1px solid var(--line); }
html[data-theme="light"] .settings-nav { background: var(--surface-2); }
html[dir="rtl"] .settings-nav { border-right: 0; border-left: 1px solid var(--line); }
.settings-nav .s-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 700; font-size: 14px; }
.settings-nav .s-item .ic { width: 20px; height: 20px; }
.settings-nav .s-item:hover { background: var(--surface-2); color: var(--text); }
.settings-nav .s-item.active { background: var(--surface); color: var(--text); box-shadow: inset 3px 0 0 var(--green); }
html[data-theme="light"] .settings-nav .s-item.active { background: #fff; }
.settings-body { padding: 22px 24px; min-height: 520px; }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 9px; max-height: 320px; overflow: auto; padding-right: 6px; }
.theme-sw { aspect-ratio: 1; border-radius: 6px; overflow: hidden; cursor: pointer; position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; border: 2px solid transparent; }
.theme-sw.active { border-color: var(--accent); }
.theme-sw.active::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m5 13 4 4 10-11'/%3E%3C/svg%3E") center/50% no-repeat; }
.preview-board { width: 100%; max-width: 300px; display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.preview-board .p-sq { aspect-ratio: 1; display: grid; place-items: center; position: relative; }
.preview-board .p-sq svg { width: 86%; height: 86%; }
.preview-board .pv-coord { position: absolute; left: 6%; top: 5%; line-height: 1; font-weight: 700; font-size: 12px; font-size: max(10px, calc(var(--sq, 90px) * .2)); }

.switch { position: relative; width: 44px; height: 25px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--surface-3); border-radius: 20px; cursor: pointer; transition: .18s; }
.switch i::before { content: ""; position: absolute; width: 19px; height: 19px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .18s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::before { transform: translateX(19px); }
.toggle-row { display: flex; align-items: flex-start; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.toggle-row .t-text { flex: 1; }
.toggle-row .t-text b { display: block; font-size: 15px; }
.toggle-row .t-text span { font-size: 13px; color: var(--muted); }

/* ================= Video ================= */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.video-card { background: var(--surface); border-radius: var(--r); overflow: hidden; cursor: pointer; border: 1px solid var(--line); transition: .16s; }
.video-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.video-card .thumb { aspect-ratio: 16/9; background: var(--surface-3) center/cover; display: grid; place-items: center; color: var(--muted); position: relative; }
.video-card .thumb .play { position: absolute; width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 0, 0, .6); display: grid; place-items: center; }
.video-card .thumb .play .ic { width: 22px; height: 22px; color: #fff; }
.video-card .meta { padding: 10px 11px; }
.video-card .meta b { display: block; font-size: 14px; line-height: 1.3; }
.player-box { background: #000; border-radius: var(--r); overflow: hidden; aspect-ratio: 16/9; }
.player-box iframe, .player-box video { width: 100%; height: 100%; border: 0; display: block; }

/* ================= Grafiklar ================= */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 110px; }
.bars .bar { flex: 1; background: var(--green); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.bars .bar:hover { opacity: 1; }
.spark { width: 100%; height: 70px; }

/* ================= Ochilish sahifasi: kirish / ro'yxatdan o'tish ================= */
/* Avval telefon (bitta ustun), 1000px dan keyin — chapda taxta, o'ngda forma */
.ld {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(74, 127, 165, .24), transparent 62%),
    radial-gradient(640px 420px at -12% 105%, rgba(240, 194, 75, .09), transparent 60%),
    var(--bg);
}
.ld-top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  background: var(--bg); background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.ld-top .side-logo { padding: 0; }
.ld-top .side-logo .logo-full { height: 34px; }
.ld-lang {
  position: relative; display: inline-flex; align-items: center; height: 40px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
}
.ld-lang-ic { position: absolute; left: 11px; display: flex; color: var(--muted); pointer-events: none; }
.ld-lang select {
  -webkit-appearance: none; appearance: none; height: 100%; border: 0; background: transparent; color: inherit;
  padding: 0 30px 0 35px; font-weight: 700; font-size: 14px; border-radius: 999px; cursor: pointer; outline: none;
  max-width: 150px; text-overflow: ellipsis;
}
.ld-lang select option { background: var(--bg-2); color: var(--text); }
.ld-lang::after {
  content: ""; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; pointer-events: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg);
}
.ld-lang:focus-within { border-color: var(--accent); }
html[dir="rtl"] .ld-lang-ic { left: auto; right: 11px; }
html[dir="rtl"] .ld-lang select { padding: 0 35px 0 30px; }
html[dir="rtl"] .ld-lang::after { right: auto; left: 13px; }
.ld-icon-btn {
  width: 40px; height: 40px; flex: none; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); display: grid; place-items: center; cursor: pointer;
}
.ld-icon-btn .ic { width: 20px; height: 20px; }

.ld-main {
  flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 18px 16px 24px;
  display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "copy" "card" "feats" "board" "stats";
}
.ld-copy { grid-area: copy; }
.ld-card { grid-area: card; }
.ld-feats { grid-area: feats; }
.ld-board { grid-area: board; }
.ld-stats { grid-area: stats; }

.ld-kicker {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-2); font-weight: 800; font-size: 13px;
}
html[data-theme="light"] .ld-kicker { color: var(--accent-3); }
.ld-kicker .ic { width: 18px; height: 18px; }
.ld-copy h1 { font-size: clamp(26px, 7.2vw, 46px); line-height: 1.1; margin: 12px 0 8px; font-weight: 800; letter-spacing: -.02em; }
.ld-copy p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 520px; }

.ld-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 6px 16px 12px; box-shadow: var(--shadow-l);
}
html[data-theme="light"] .ld-card { background: #fff; }
.ld-tabs {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin: 10px 0 16px;
  background: var(--surface-2); border-radius: 12px;
}
.ld-tab {
  position: relative; z-index: 1; min-height: 44px; border: 0; background: none; border-radius: 9px; cursor: pointer;
  font-weight: 800; font-size: 15px; color: var(--muted); transition: color .2s; -webkit-tap-highlight-color: transparent;
}
.ld-tab[aria-selected="true"] { color: var(--text); }
.ld-tab-ind {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 9px;
  background: var(--bg-2); box-shadow: var(--shadow-s); transition: transform .28s cubic-bezier(.3, .7, .2, 1);
}
html[data-theme="light"] .ld-tab-ind { background: #fff; }
.ld-tabs[data-active="register"] .ld-tab-ind { transform: translateX(100%); }
html[dir="rtl"] .ld-tab-ind { left: auto; right: 4px; }
html[dir="rtl"] .ld-tabs[data-active="register"] .ld-tab-ind { transform: translateX(-100%); }

.ld-form { display: grid; gap: 12px; animation: ld-in .25s ease; }
@keyframes ld-in { from { opacity: 0; transform: translateY(6px); } }
.ld-field { position: relative; display: block; }
.ld-fi { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); display: flex; color: var(--muted-2); pointer-events: none; transition: color .15s; }
.ld-field .input.lg { min-height: 52px; padding: 12px 14px 12px 46px; font-size: 16px; border-radius: 12px; }
.ld-field:focus-within .ld-fi { color: var(--accent-2); }
.ld-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0;
  background: none; color: var(--muted-2); border-radius: 10px; cursor: pointer; display: grid; place-items: center;
}
.ld-eye:hover { background: var(--surface-2); }
.ld-eye.on { color: var(--accent-2); }
.ld-field .input.has-eye { padding-right: 52px; }
html[dir="rtl"] .ld-fi { left: auto; right: 15px; }
html[dir="rtl"] .ld-field .input.lg { padding: 12px 46px 12px 14px; }
html[dir="rtl"] .ld-field .input.has-eye { padding-left: 52px; }
html[dir="rtl"] .ld-eye { right: auto; left: 6px; }
.ld-form .btn.xl { min-height: 54px; border-radius: 12px; margin-top: 2px; font-size: 19px; }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite;
}
.ld-note {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px;
  background: var(--surface-2); color: var(--muted); font-size: 13px; line-height: 1.45;
}
.ld-note > span:first-child { display: flex; flex: none; }
.ld-note .ic { width: 22px; height: 22px; }
.ld-switch {
  display: block; width: 100%; margin-top: 10px; padding: 11px; border: 0; background: none; border-radius: 10px;
  font-size: 14px; color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ld-switch b { color: var(--accent-2); }
html[data-theme="light"] .ld-switch b { color: var(--accent); }
.ld-switch:hover { background: var(--surface-2); }

.ld-feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ld-feats li {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); font-weight: 800; font-size: 14px; line-height: 1.2;
}
html[data-theme="light"] .ld-feats li { background: #fff; }
.ld-feat-ic { display: flex; flex: none; }
.ld-feat-ic .ic { width: 30px; height: 30px; }

.ld-board { position: relative; justify-self: center; width: min(100%, 440px); }
.ld-board-in { border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-l); }
.ld-live {
  display: flex; align-items: center; gap: 7px; width: fit-content; margin: 12px auto 0;
  padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 800;
}
.ld-live i { width: 8px; height: 8px; border-radius: 50%; background: #e0574a; animation: ld-pulse 1.6s infinite; }
@keyframes ld-pulse { 0% { box-shadow: 0 0 0 0 rgba(224, 87, 74, .6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(224, 87, 74, 0); } }

.ld-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ld-stats li { text-align: center; padding: 12px 4px; border-radius: 14px; background: var(--surface-2); min-width: 0; }
.ld-stats b { display: block; font-family: var(--display); font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.ld-stats span { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.25; color: var(--muted); overflow-wrap: anywhere; }
.ld-foot { text-align: center; padding: 12px 16px calc(18px + env(safe-area-inset-bottom)); color: var(--muted-2); font-size: 12px; }

@media (max-width: 380px) {
  .ld-top { padding-left: 12px; padding-right: 12px; }
  .ld-top .side-logo .logo-full { height: 28px; }
  html:not([dir="rtl"]) .ld-lang select { padding-right: 26px; }
  html:not([dir="rtl"]) .ld-lang::after { right: 11px; }
  .ld-main { padding-left: 12px; padding-right: 12px; }
  .ld-card { padding-left: 12px; padding-right: 12px; }
  .ld-stats { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 640px) and (max-width: 999px) {
  .ld-main { max-width: 580px; padding-top: 28px; }
  .ld-card { padding: 8px 22px 16px; }
}
@media (min-width: 1000px) {
  .ld-top { padding: 14px 32px; }
  .ld-top .side-logo .logo-full { height: 40px; }
  .ld-main {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 430px);
    grid-template-areas: "board copy" "board card" "board feats" "stats stats";
    column-gap: 56px; row-gap: 18px; padding: 36px 40px 40px; align-items: start;
  }
  .ld-board { align-self: center; justify-self: end; width: min(100%, 560px); }
  .ld-card { padding: 8px 22px 16px; }
  .ld-stats { width: 100%; max-width: 780px; justify-self: center; margin-top: 12px; }
  .ld-stats b { font-size: 24px; }
  .ld-stats span { font-size: 13px; }
}

/* ================= Responsive ================= */
/* Laptop (kichikroq ekran): yon panel ixcham, faqat ikonkalar */
@media (max-width: 1100px) {
  :root { --side: 76px; }
  .side { padding: 8px 6px; }
  .side-item .si-tx, .side-user .si-tx, .side-item .si-caret { display: none; }
  .side-item { justify-content: center; padding: 8px 0; min-height: 50px; }
  .side-item .si-ic, .side-item .si-ic .ic, .side-item .si-ic .ic-img { width: 32px; height: 32px; }
  .side .side-logo { justify-content: center; padding: 8px 0 12px; }
  .side .side-logo .logo-full { display: none !important; }
  .side .side-logo .logo-mark { display: block; }
  .side-user { justify-content: center; padding: 6px 0; }
  .side-icons { flex-direction: column; align-items: center; }
  .view { padding: 18px 20px 56px; }
  .game-layout, .puzzle-layout { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
}

/* Planshet */
@media (max-width: 1000px) {
  .hero { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero .play-card { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; align-items: start; }
  .hero .play-card .pc-title, .hero .play-card .tc-row, .hero .play-card > .btn { grid-column: 1; }
  .hero .play-card .big-btns { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; grid-template-columns: 1fr 1fr; }
  .home-grid { grid-template-columns: 1fr; }
}

/* Telefon: yuqori panel + pastki tab-panel */
@media (max-width: 860px) {
  :root { --side: 0px; }
  #app { display: block; }
  .side { display: none; }
  .main { margin: 0 !important; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

  .m-top {
    display: flex; align-items: center; gap: 4px; position: sticky; top: 0; z-index: 70;
    height: 56px; padding: 0 8px; background: var(--bg-2); border-bottom: 1px solid var(--line);
  }
  html[data-theme="light"] .m-top { background: #fff; }
  .m-top .side-logo { padding: 0 4px; }
  .m-top .side-logo .logo-full { height: 32px; }
  .m-icon {
    position: relative; width: 44px; height: 44px; border: 0; background: none; color: var(--text);
    display: grid; place-items: center; border-radius: 8px; cursor: pointer;
  }
  .m-icon .ic { width: 24px; height: 24px; }
  .m-icon:active { background: var(--surface-2); }
  .m-ava { padding: 0 4px 0 6px; }

  .m-tabs {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    height: calc(64px + env(safe-area-inset-bottom)); padding: 4px 4px env(safe-area-inset-bottom);
    background: var(--bg-2); border-top: 1px solid var(--line);
  }
  html[data-theme="light"] .m-tabs { background: #fff; }
  .m-tab {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; background: none; color: var(--muted); font-weight: 800; font-size: 11px; border-radius: 8px;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .m-tab .m-tab-ic { display: flex; }
  .m-tab .ic, .m-tab .ic-img { width: 28px; height: 28px; }
  .m-tab-tx { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-tab.active { color: var(--text); background: var(--surface-2); }

  .view { padding: 14px 12px 24px; }
  .home-head { margin-bottom: 12px; }
  .hh-name { font-size: 17px; }
  .home-head .streak { font-size: 16px; }
  .home-head .streak .ic, .home-head .streak .ic-img { width: 26px !important; height: 26px !important; }

  .hero { display: block; }
  .hero .play-card { display: grid; grid-template-columns: 1fr; }
  .hero .play-card .big-btns { grid-column: auto; grid-row: auto; grid-template-columns: 1fr 1fr; margin-top: 2px; }
  .hero-boards {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; align-items: flex-start;
    margin: 12px -12px 0; padding: 0 12px 4px; scroll-padding: 0 12px; scrollbar-width: none;
  }
  .hero-boards::-webkit-scrollbar { display: none; }
  .hero .board-card { flex: 0 0 68%; scroll-snap-align: start; }
  .btn.big-btn { font-size: 15px; min-height: 48px; padding: 6px 8px; }

  .btn { min-height: 44px; }
  .btn.sm { min-height: 36px; }
  .btn.xl { min-height: 54px; font-size: 20px; }
  .input { min-height: 46px; font-size: 16px; }

  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .grid[style*="300px"], .grid[style*="330px"], .grid[style*="350px"] { grid-template-columns: 1fr !important; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 6px; overflow-x: auto; }
  .settings-nav .s-item { white-space: nowrap; }
  .settings-body { padding: 16px 14px; min-height: 0; }
  h1.page { font-size: 19px; }
  .modal { width: 100%; }
  table.tbl { font-size: 13px; }
  table.tbl th, table.tbl td { padding: 8px 6px; }
  .hide-sm { display: none; }
  .more-pop .side-item { min-height: 46px; }
  .toast-wrap { bottom: calc(76px + env(safe-area-inset-bottom)); right: 12px; left: 12px; }
}

@media (max-width: 420px) {
  .tc { font-size: 14px; }
  .m-tab { font-size: 10px; }
  .gh-tbl td, .gh-tbl th { padding: 8px 6px; }
  .gh-date { display: none; }
}

/* ================= Yangi bo'limlar ================= */

/* --- yon panel submenyu --- */
.side-item .si-caret { margin-left: auto; opacity: .45; }
.side-item .si-caret .ic { width: 15px; height: 15px; }
html[dir="rtl"] .side-item .si-caret { margin-left: 0; margin-right: auto; transform: scaleX(-1); }
.side-user .si-tx { display: flex; flex-direction: column; line-height: 1.15; }
.side-user .su-lvl { font-size: 11px; color: var(--green-2); font-weight: 700; }

/* --- Play tanlov sahifasi --- */
.play-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.play-layout .board-wrap { max-width: min(70vh, 560px); margin-inline: auto; }
.play-panel { padding: 14px; }
.pp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pp-head h2 { margin: 0; font-size: 20px; }
.pp-head .ic { width: 28px; height: 28px; }
.play-opt {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px;
  background: var(--surface-2); margin-bottom: 8px; transition: .12s; cursor: pointer;
}
.play-opt:hover { background: var(--surface-3); transform: translateX(2px); }
.play-opt.primary { background: linear-gradient(90deg, rgba(74,127,165,.26), var(--surface-2)); }
.play-opt .po-ic { display: flex; }
.play-opt .po-ic .ic { width: 30px; height: 30px; }
.play-opt .po-title { display: block; font-weight: 800; font-size: 16px; }
.play-opt .po-sub { display: block; font-size: 12.5px; color: var(--muted); }

/* --- botlar --- */
.bot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.bot-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; text-align: center; }
.bot-ava { width: 62px; height: 62px; margin: 0 auto 8px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; }
.bot-ava .ic { width: 34px; height: 34px; }

/* --- o'yin paneli --- */
.game-panel { display: flex; flex-direction: column; gap: 10px; }
.game-status { padding: 9px 12px; border-radius: 8px; background: var(--surface-2); font-weight: 700; font-size: 14px; }
.game-status.good { background: var(--green-soft); color: var(--green-2); }
.game-status.bad { background: rgba(224,87,74,.15); color: var(--danger); }
.panel-body { display: flex; flex-direction: column; gap: 10px; }
.nav-row { display: flex; gap: 4px; width: 100%; }
.nav-btn { flex: 1; font-size: 16px; font-weight: 800; padding: 7px 0; }
.chat-box { display: flex; flex-direction: column; gap: 8px; }
.chat-list { max-height: 230px; overflow: auto; display: grid; gap: 5px; font-size: 13.5px; }
.chat-msg { background: var(--surface-2); padding: 6px 9px; border-radius: 7px; }
.info-box .tbl td { padding: 6px 8px; }
.tiny-input { font-size: 11.5px; font-family: ui-monospace, Menlo, Consolas, monospace; }

/* --- mavzular --- */
.theme-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.theme-card {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); transition: .12s;
}
.theme-card:hover { background: var(--surface-2); transform: translateY(-2px); }
.theme-card .tc-ic .ic { width: 24px; height: 24px; }

/* --- storm / streak / racer --- */
.run-head { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.run-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-2); font-weight: 800; }
.run-time, .run-score { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.run-time.low { color: var(--danger); }
.run-combo { font-size: 22px; font-weight: 800; color: var(--green-2); min-height: 28px; }
.run-list { display: flex; gap: 3px; flex-wrap: wrap; max-height: 62px; overflow: auto; }
.run-dot { width: 11px; height: 11px; border-radius: 3px; background: var(--surface-3); }
.run-dot.ok { background: var(--ok); }
.run-dot.no { background: var(--danger); }

/* --- barcha masalalar --- */
.puzzle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.puzzle-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: .14s; }
.puzzle-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.puzzle-card .pc-foot { display: flex; align-items: center; gap: 5px; padding: 7px 8px; }

/* --- learn hub --- */
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.learn-card {
  display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--r-l);
  background: var(--surface); border: 1px solid var(--line); transition: .14s;
}
.learn-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.learn-card .lc-ic .ic { width: 34px; height: 34px; }

/* --- practice --- */
.prac-group { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); margin: 16px 0 8px; }
.prac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.prac-card {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); transition: .12s;
}
.prac-card:hover { background: var(--surface-2); }
.prac-card.done { border-color: var(--ok); }
.prac-card .pc-ic .ic { width: 24px; height: 24px; }
.prac-prog { width: 74px; display: grid; gap: 3px; justify-items: end; }
.prac-prog .progress { width: 100%; }
.prac-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.prac-layout .board-wrap { max-width: min(68vh, 560px); margin-inline: auto; }
.prac-list { max-height: 520px; overflow: auto; display: grid; gap: 2px; }
.prac-item { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.prac-item:hover { background: var(--surface-2); }
.prac-item.cur { background: var(--surface-3); font-weight: 700; }
.prac-item.done .pi-ic { color: var(--ok); }
.prac-item .pi-ic .ic { width: 16px; height: 16px; }
.prac-desc { margin-top: 10px; display: grid; gap: 2px; }

/* --- koordinatalar --- */
.coord-board .sqr { display: grid; place-items: center; cursor: pointer; }
.coord-board .coord-lbl { font-size: 12px; font-size: max(9px, calc(var(--sq, 60px) * .22)); font-weight: 800; opacity: .65; }
.coord-board .sqr.l .coord-lbl { color: var(--board-dark); }
.coord-board .sqr.d .coord-lbl { color: var(--board-light); }
.coord-board .sqr.ask { box-shadow: inset 0 0 0 4px var(--info); }
.coord-board .sqr.ok { box-shadow: inset 0 0 0 4px var(--ok); }
.coord-board .sqr.no { box-shadow: inset 0 0 0 4px var(--danger); }
.coord-target { font-size: 44px; font-weight: 800; text-align: center; padding: 8px 0; letter-spacing: .04em; }
.coord-names { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.coord-side .tabs { margin-bottom: 10px; }

/* --- coaches --- */
.coach-card { display: flex; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }

/* --- ota-ona paneli --- */
.lvl-bar { max-width: 420px; }
.lvl-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.chart { display: grid; gap: 4px; }
.bars.tall { height: 150px; align-items: flex-end; }
.bars .bar { position: relative; }
.bar-val { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); font-size: 9.5px; color: var(--muted); }
.chart-x { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted-2); }
.chart-x .hide-sm { display: none; }
.src-row { display: grid; grid-template-columns: 140px 1fr 40px; gap: 8px; align-items: center; padding: 4px 0; }
.src-bar { height: 8px; background: var(--surface-3); border-radius: 20px; overflow: hidden; }
.src-bar > i { display: block; height: 100%; background: var(--green); }
.cmp-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cmp-v { font-size: 22px; font-weight: 800; text-align: center; }
.cmp-k { font-size: 11px; color: var(--muted); text-align: center; }
.cmp-mid { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); font-weight: 800; }
.note { padding: 10px 12px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; }
.note.warn { background: rgba(232,184,75,.14); color: var(--warn); }
.fb-item { padding: 11px 12px; border-radius: 10px; background: var(--surface-2); margin-bottom: 8px; border-left: 3px solid var(--ok); }
.fb-item.advice { border-left-color: var(--info); }
.fb-item.warn { border-left-color: var(--danger); }
.fb-media { width: 100%; max-height: 260px; object-fit: cover; border-radius: 8px; margin-top: 8px; }
.donut { width: 84px; height: 84px; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 3.6; }
.donut .d-bg { stroke: var(--surface-3); }
.donut .d-fg { stroke: var(--green); }
.donut-wrap { display: flex; align-items: center; gap: 10px; }
.donut-tx b { display: block; font-size: 18px; }
.donut-tx span { font-size: 12px; color: var(--muted); }

@media (max-width: 1180px) {
  .play-layout { grid-template-columns: 1fr; }
  .prac-layout { grid-template-columns: 1fr; }
  .prac-list { max-height: 220px; }
}
@media (max-width: 860px) {
  .src-row { grid-template-columns: 110px 1fr 34px; }
  .theme-cards, .learn-grid, .prac-grid { grid-template-columns: 1fr 1fr; }
  .puzzle-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .coord-target { font-size: 34px; }
}

/* --- vazifa: mavzu tanlagich --- */
.theme-pick { max-height: 190px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; }
.theme-pick-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer; font-size: 13.5px; }
.theme-pick-item:hover { background: var(--surface-2); }
.theme-pick-item.on { background: var(--green-soft); color: var(--green-2); font-weight: 700; }

/* --- izoh variantlari --- */
.fb-opts { display: grid; gap: 5px; max-height: 230px; overflow: auto; }
.fb-opt { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); cursor: pointer; border: 2px solid transparent; }
.fb-opt:hover { background: var(--surface-3); }
.fb-opt.on { border-color: var(--green); }
.fb-opt .ic { width: 18px; height: 18px; }
.fb-opt.warn .ic { color: var(--danger); }
.fb-opt.advice .ic { color: var(--info); }

.home-lvl { min-width: 150px; display: grid; gap: 4px; }
.home-lvl .progress { height: 6px; }

/* Ochiluvchi menyuda matn doim ko'rinsin (ikonka-rejimda ham) */
.more-pop .side-item { justify-content: flex-start; padding: 9px 10px; width: 100%; }
.more-pop .side-item .si-tx { display: block !important; font-size: 14px; }
.more-pop .side-item .si-caret { display: none; }

/* ================= Profil (chess.com uslubi) ================= */
.pf-page { max-width: 1060px; margin: 0 auto; }
.back-btn { margin-bottom: 10px; }
.pf-card { padding: 24px 24px 0; }
.pf-top { display: flex; gap: 24px; align-items: flex-start; }
.pf-ava {
  width: 160px; height: 160px; flex: none; border-radius: 4px; overflow: hidden;
  background: #e8e6e3; display: grid; place-items: center;
}
.pf-ava img { width: 100%; height: 100%; object-fit: cover; }
.pf-ava svg { width: 84%; height: 84%; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .18)); }
.pf-info { flex: 1; min-width: 0; padding-top: 4px; }
.pf-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-name { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; word-break: break-word; }
.pf-lvl { font-size: 13px; }
.pf-user { color: var(--muted); font-size: 14px; margin-top: 2px; }
.pf-status { margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; max-width: 100%; }
.pf-status.editable { cursor: pointer; border-radius: 4px; padding: 2px 4px; margin-left: -4px; }
.pf-status.editable:hover { background: var(--surface-2); }
.pf-info > .input { margin-top: 10px; max-width: 420px; }
.pf-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 18px; font-size: 14.5px; color: var(--muted); }
.pf-meta b { color: var(--text); font-weight: 800; }
.pf-online { color: var(--text); font-weight: 800; }
.pf-online::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: middle; }
.pf-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; flex: none; }
.pf-tabs { display: flex; gap: 8px; margin: 22px -24px 0; padding: 0 24px; border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.pf-tabs::-webkit-scrollbar { display: none; }
.pf-tab {
  padding: 15px 12px 12px; font-weight: 800; font-size: 15.5px; color: var(--muted); white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.pf-tab:hover { color: var(--text); }
.pf-tab.active { color: var(--text); border-bottom-color: var(--text); }
.pf-body { margin-top: 16px; }
.pf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.pf-main > * + *, .pf-side > * + * { margin-top: 16px; }

/* reyting kartasi */
.pf-rating { padding: 14px 16px 16px; }
.rating-pills { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; }
.rating-pill {
  display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: 6px; border: 0;
  background: none; cursor: pointer; color: var(--text); text-align: left; flex: none;
}
.rating-pill:hover { background: var(--surface-2); }
.rating-pill.active { background: var(--surface-2); }
.rp-tx { display: grid; line-height: 1.15; }
.rp-k { font-size: 13px; color: var(--muted); font-weight: 700; }
.rp-v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.rc-box { position: relative; }
.rc-wrap { position: relative; border-top: 2px solid var(--chart); background: linear-gradient(180deg, rgba(106, 166, 212, .06), transparent); border-radius: 0 0 4px 4px; }
.rating-chart { display: block; width: 100%; height: 150px; }
.rating-chart .rc-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rc-axis { position: absolute; right: 6px; top: 4px; bottom: 4px; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--muted-2); font-weight: 700; pointer-events: none; }
.rc-empty { height: 110px; display: grid; place-items: center; border-radius: 6px; background: var(--surface-2); }
.pf-none { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 18px 8px; color: var(--muted); font-size: 16px; }

/* o'ng ustun */
.side-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.side-card.col { display: block; }
.side-card .b.lg { font-size: 19px; }
a.side-card:hover { background: var(--surface-2); }
.league .ic-img, .league .ic { width: 44px; height: 44px; }
.theme-strip { justify-content: space-between; overflow: hidden; padding: 0 0 0 16px; min-height: 64px; }
.ts-board { display: grid; grid-template-columns: repeat(3, 32px); grid-template-rows: repeat(2, 32px); flex: none; }
.ts-sq { display: grid; place-items: center; }
.ts-sq svg { width: 90%; height: 90%; }
.mini-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ms > div { min-width: 0; }
.ms { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 6px; background: var(--surface-2); min-width: 0; }
.ms-v { font-size: 18px; font-weight: 800; line-height: 1.1; }
.ms-k { font-size: 11.5px; color: var(--muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* statistika tab: katta plitalar */
.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-tile { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-l); background: var(--surface); }
html[data-theme="light"] .stat-tile { border: 1px solid var(--line); }
.st-k { font-size: 13px; color: var(--muted); font-weight: 700; }
.st-v { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat .ic-img { width: 26px; height: 26px; }

/* ================= Ota-ona bo'limi ================= */
.lock-wrap { display: grid; place-items: center; min-height: 64vh; padding: 12px 0; }
.lock-card { width: min(420px, 100%); text-align: center; padding: 28px 24px; }
.lock-card h2 { margin: 10px 0 4px; font-size: 24px; font-weight: 800; }
.lock-card p { margin: 0 0 18px; font-size: 14.5px; }
.lock-ic { display: grid; place-items: center; }
.lock-ic .ic, .lock-ic .ic-img { width: 64px; height: 64px; }
.lock-form { display: grid; gap: 12px; text-align: left; }
.lock-form label.field { margin: 0; }
.pin-input { text-align: center; font-size: 24px; letter-spacing: 8px; min-height: 56px; font-weight: 800; }
.pin-input::placeholder { letter-spacing: 2px; font-size: 15px; font-weight: 600; }
.lock-err { color: var(--danger); font-size: 13.5px; min-height: 18px; font-weight: 700; text-align: center; }
.parent-head .pf-ava { width: 120px; height: 120px; }
.parent-head .lvl-bar { max-width: 420px; margin-top: 12px; }
.parent-kpi {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
  margin: 20px -24px 0; padding: 16px 24px; border-top: 1px solid var(--line);
}
.parent-kpi .pk { display: flex; align-items: center; gap: 10px; }
.parent-kpi .pk-v { font-size: 24px; font-weight: 800; text-align: left; line-height: 1.1; }
.parent-kpi .pk-k { font-size: 12px; color: var(--muted); text-align: left; font-weight: 700; }

/* Rasm-ikonkalar umumiy */
.ic-img { object-fit: contain; flex: none; user-select: none; -webkit-user-drag: none; }
.chip .ic-img { width: 16px; height: 16px; }
.lbl .ic-img { width: 22px; height: 22px; }

/* Yig'ilgan panel — yuqoridagi umumiy qoidalardan keyin qayta yoziladi */
@media (max-width: 1100px) {
  .side-user .si-tx { display: none; }
  .pf-grid { grid-template-columns: minmax(0, 1fr) 280px; }
  .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .pf-grid { grid-template-columns: 1fr; }
  .pf-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .pf-side > * + * { margin-top: 0; }
}
@media (max-width: 860px) {
  .pf-card { padding: 16px 16px 0; }
  .pf-top { gap: 14px; flex-wrap: wrap; }
  .pf-ava, .parent-head .pf-ava { width: 88px; height: 88px; }
  .pf-name { font-size: 22px; }
  .pf-meta { margin-top: 10px; gap: 4px 14px; font-size: 13.5px; }
  .pf-actions { flex-direction: row; width: 100%; }
  .pf-actions > * { flex: 1; }
  .pf-tabs { margin: 16px -16px 0; padding: 0 8px; }
  .pf-tab { padding: 13px 10px 10px; font-size: 14.5px; }
  .pf-side { grid-template-columns: 1fr; }
  .rp-v { font-size: 21px; }
  .rating-chart { height: 120px; }
  .stat-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-tile { padding: 12px; gap: 10px; }
  .st-v { font-size: 22px; }
  .parent-kpi { grid-template-columns: 1fr 1fr; margin: 16px -16px 0; padding: 14px 16px; }
  .lock-card { padding: 22px 16px; }
}

/* ================= O'yin sahifasi (chess.com uslubi) ================= */
.view.view-game { max-width: none; padding: 16px 20px; }
.gp { display: flex; gap: 20px; justify-content: center; align-items: stretch; }
.gp-left {
  flex: 0 1 auto; display: flex; flex-direction: column; min-width: 300px;
  width: min(calc(100vh - 136px), calc(100% - 460px));
}
.gp .board-wrap { max-width: none; margin: 0; }
.gp .board { border-radius: 3px; }

/* o'yinchi qatori */
.gp-bar { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 0; }
.gp-ava { width: 40px; height: 40px; border-radius: 3px; font-size: 14px; }
.gp-ava .ic-img { width: 34px; height: 34px; }
.gp-who { flex: 1; min-width: 0; display: grid; gap: 2px; }
.gp-name { display: flex; align-items: center; gap: 6px; font-size: 14.5px; white-space: nowrap; overflow: hidden; }
.gp-name b { font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.gp-rating { color: var(--muted); font-weight: 600; }
.gp-name .flag-ic { width: 20px; height: 13px; }
.gp .captured { display: flex; align-items: center; gap: 4px; min-height: 18px; }
.gp .captured > span { width: auto; height: auto; margin: 0; opacity: 1; }
.gp .cap-grp { display: flex; }
.gp .cap-grp > span { width: 18px; height: 18px; margin-right: -8px; display: block; }
.gp .cap-grp > span:last-child { margin-right: 0; }
.gp .cap-grp svg { width: 100%; height: 100%; display: block; }
.gp .cap-adv { font-size: 12px; color: var(--muted); font-weight: 700; margin-left: 4px; }

/* soat: oq o'yinchi — oq, qora — qora; navbati kelmagani xira */
.gp .clock {
  margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  min-width: 140px; height: 44px; padding: 0 14px; border-radius: 4px; flex: none;
  font-family: var(--display); font-size: 27px; font-weight: 700; font-variant-numeric: tabular-nums;
  opacity: .55; transition: opacity .15s;
}
.gp .clock.white { background: #fff; color: #312e2b; }
.gp .clock.black { background: #262421; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
html[data-theme="light"] .gp .clock.white { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.gp .clock.run { opacity: 1; }
.gp .clock .clock-ic { display: none; }
.gp .clock.run .clock-ic { display: flex; }
.gp .clock .clock-ic .ic { width: 22px; height: 22px; }
.gp .clock.low.run { background: #e0574a; color: #fff; }

/* o'ng panel */
.gp-panel {
  flex: 0 0 440px; display: flex; flex-direction: column; min-height: 480px;
  background: var(--surface); border-radius: 6px; overflow: hidden;
}
html[data-theme="light"] .gp-panel { border: 1px solid var(--line); }
.gp-top { display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(0, 0, 0, .16); }
html[data-theme="light"] .gp-top { background: var(--surface-2); }
.gp-top-tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 11px 4px 9px;
  font-size: 12.5px; font-weight: 600; color: var(--muted); transition: .12s;
}
.gp-top-tab:first-child { background: var(--surface); color: var(--text); }
.gp-top-tab:hover { color: var(--text); }
.gp-top-tab .ic { width: 22px; height: 22px; }
.gp-tabs { display: flex; border-bottom: 1px solid var(--line); }
.gp-tab {
  flex: 1; padding: 12px 6px 10px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-weight: 700; font-size: 14px; border-bottom: 3px solid transparent;
}
.gp-tab:hover { color: var(--text); }
.gp-tab.active { color: var(--text); border-bottom-color: var(--text); }
.gp-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
.gp-status-row .game-status {
  border-radius: 0; background: transparent; border-bottom: 1px solid var(--line);
  padding: 10px 16px; font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.gp-status-row .game-status.good { color: var(--ok); }
.gp-status-row .game-status.bad { color: var(--danger); }

/* yurishlar ro'yxati */
.gp-moves { flex: 1; overflow: auto; padding: 4px 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.mv-row { display: grid; grid-template-columns: 44px 80px 80px 1fr; align-items: center; min-height: 30px; padding: 1px 14px 1px 16px; }
.mv-row.odd { background: rgba(255, 255, 255, .025); }
html[data-theme="light"] .mv-row.odd { background: rgba(0, 0, 0, .03); }
.mv-n { color: var(--muted-2); font-size: 13px; }
.mv {
  justify-self: start; padding: 2px 7px; border-radius: 3px; font-weight: 700; cursor: pointer;
  border-bottom: 2px solid transparent; line-height: 1.35;
}
.mv:hover { background: var(--surface-3); }
.mv.cur { background: var(--surface-3); border-bottom-color: rgba(255, 255, 255, .28); }
html[data-theme="light"] .mv.cur { border-bottom-color: rgba(0, 0, 0, .2); }
.mv.empty { cursor: default; background: none; }
.mv-times { justify-self: end; display: grid; gap: 1px; }
.mv-t { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 10.5px; color: var(--muted-2); line-height: 1.25; }
.mv-t i { width: 3px; border-radius: 1px; display: block; }
.mv-t i.w { background: #e8e6e3; }
.mv-t i.b { background: #7c7a77; }
html[data-theme="light"] .mv-t i.w { background: #c9c7c4; }
.gp-empty { padding: 22px; text-align: center; color: var(--muted); font-size: 14px; }
.gp .chat-box, .gp .info-box { padding: 12px 16px; }

/* pastki qism: xulosa, navigatsiya, amallar */
.gp-foot { border-top: 1px solid var(--line); padding: 12px 12px 8px; display: grid; gap: 10px; }
.gp-summary { text-align: center; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.gp-summary b { color: var(--text); font-weight: 700; }
.gp-nav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.gp-nb {
  height: 48px; border: 0; border-radius: 5px; cursor: pointer; display: grid; place-items: center;
  background: var(--btn-2); color: var(--text); box-shadow: 0 3px 0 var(--btn-2-shadow); transition: background .12s;
}
.gp-nb:hover { background: var(--btn-2-hover); }
.gp-nb:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--btn-2-shadow); }
.gp-nb .ic { width: 22px; height: 22px; }
.gp-nb.dim { color: var(--muted-2); }
.gp-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 34px; }
.gp-act {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-weight: 700; font-size: 14px; padding: 6px 4px; border-radius: 4px;
}
.gp-act:hover { color: var(--text); }
.gp-act .ic { width: 18px; height: 18px; }
.gp-act .half { font-size: 17px; font-weight: 800; line-height: 1; }
.gp-act.hl { color: var(--green-2); }
.gp-flip { border: 0; background: none; color: var(--muted); padding: 6px; cursor: pointer; border-radius: 4px; }
.gp-flip:hover { color: var(--text); }
.gp-flip .ic { width: 20px; height: 20px; }

@media (max-width: 1100px) {
  .gp-panel { flex-basis: 360px; }
  .gp-left { width: min(calc(100vh - 136px), calc(100% - 380px)); }
  .mv-row { grid-template-columns: 38px 72px 72px 1fr; }
}
/* planshet: taxta tepada, panel pastda */
@media (max-width: 900px) {
  .gp { flex-direction: column; align-items: center; gap: 12px; }
  .gp-left { width: min(100%, calc(100vh - 200px)); min-width: 0; }
  .gp-panel { flex: none; width: 100%; max-width: 720px; min-height: 0; }
  .gp-moves { max-height: 220px; }
}
/* telefon */
@media (max-width: 860px) {
  .view.view-game { padding: 0 0 12px; }
  .gp-left { width: 100%; }
  .gp-bar { padding: 4px 8px; min-height: 48px; }
  .gp .board { border-radius: 0; }
  .gp-ava { width: 34px; height: 34px; }
  .gp .clock { min-width: 96px; height: 38px; font-size: 21px; padding: 0 10px; gap: 6px; }
  .gp .clock .clock-ic .ic { width: 17px; height: 17px; }
  .gp-panel { border-radius: 0; }
  .gp-top-tab { font-size: 11px; padding: 9px 2px 7px; }
  .gp-nb { height: 46px; }
  .mv-row { padding: 1px 10px; }
}

/* ================= Katak belgilari (✓ ✗ # kubok) ================= */
.sq-badge {
  position: absolute; top: -13%; right: -13%; width: 40%; height: 40%; z-index: 6; pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); animation: badgeIn .24s cubic-bezier(.3, 1.6, .5, 1);
}
.sq-badge.edge-t { top: 3%; }
.sq-badge.edge-r { right: 3%; }
.sq-badge svg { width: 100%; height: 100%; display: block; }
.sq-badge.good circle { fill: #4caf50; }
.sq-badge.bad circle { fill: #e0574a; }
.sq-badge.mate circle { fill: #e2676f; }
.sq-badge.win circle { fill: #2e9d6a; }
.sq-badge.draw circle { fill: #8b8987; }
.sq-badge.best circle { fill: #5b9fd6; }
@keyframes badgeIn { from { transform: scale(.2); opacity: 0; } }
.hl.good { background: rgba(21, 140, 90, .62); }

/* ================= Masala tarixi (lichess uslubidagi katakchalar) ================= */
.pz-hist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pz-h {
  width: 44px; height: 30px; border-radius: 8px; border: 0; cursor: pointer; display: grid; place-items: center;
  background: #629924; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); transition: transform .1s;
}
.pz-h:hover { transform: translateY(-2px); }
.pz-h svg { width: 18px; height: 18px; }
.pz-h.fail { background: #cc3333; }
.pz-h.hint { background: #d59120; }
.pz-h.cur { background: #3692e7; }
.pz-h.cur svg { display: none; }

/* lichess uslubidagi masala ma'lumoti */
.pz-meta { display: grid; gap: 14px; }
.pz-meta-row { display: flex; gap: 14px; align-items: flex-start; }
.pz-meta-row .ic-img { width: 44px; height: 44px; }
.pz-meta-row b { font-size: 17px; }
.pz-meta-row .pz-id { color: var(--info); font-weight: 800; }
.pz-themes { display: grid; gap: 4px; margin-top: 4px; }
.pz-themes a { color: var(--info); font-size: 14px; font-weight: 600; }
.pz-themes a:hover { text-decoration: underline; }

/* ================= Practice (lichess.org/practice uslubi) ================= */
.lp-page { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; max-width: 1060px; margin: 0 auto; }
.lp-side {
  position: sticky; top: 16px; background: var(--surface); border-radius: 6px; padding: 22px 18px;
  text-align: center; display: grid; gap: 8px; justify-items: center;
}
html[data-theme="light"] .lp-side { border: 1px solid var(--line); }
.lp-side-ic .ic-img, .lp-side-ic .ic { width: 96px; height: 96px; }
.lp-side h1 { margin: 4px 0 0; font-size: 30px; font-weight: 500; letter-spacing: -.01em; }
.lp-side p { margin: 0; color: var(--muted); font-size: 14px; }
.lp-progress {
  position: relative; width: 100%; height: 30px; border-radius: 4px; overflow: hidden; margin-top: 8px;
  background: #3692e7; color: #fff; font-weight: 800; font-size: 13.5px; display: grid; place-items: center;
}
.lp-progress i { position: absolute; inset: 0 auto 0 0; background: #629924; }
.lp-progress span { position: relative; }

.lp-group { margin-bottom: 26px; }
.lp-group-title {
  margin: 0 0 14px; text-align: center; font-family: var(--sans); font-weight: 500; font-size: 17px;
  letter-spacing: .22em; text-transform: uppercase; color: #9fb4c9;
}
html[data-theme="light"] .lp-group-title { color: #5a6f85; }
.lp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lp-card {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 8px 14px 8px 10px;
  background: #33293f; border: 1px solid #7a53ad; border-radius: 4px; overflow: hidden;
  transition: background .12s, border-color .12s, transform .12s;
}
.lp-card:hover { background: #3f3150; border-color: #9a6fd6; transform: translateY(-1px); }
.lp-card.started { border-color: #8f7bbf; }
.lp-card.done { background: #2c3a26; border-color: #629924; }
.lp-card.done:hover { background: #34462c; }
html[data-theme="light"] .lp-card { background: #f1eafb; border-color: #a785d8; }
html[data-theme="light"] .lp-card:hover { background: #e8dcf8; }
html[data-theme="light"] .lp-card.done { background: #e8f3dd; border-color: #629924; }
.lp-ic { flex: none; display: grid; place-items: center; width: 48px; height: 48px; }
.lp-ic .ic-img, .lp-ic .ic { width: 44px; height: 44px; }
.lp-tx { flex: 1; min-width: 0; display: grid; gap: 1px; }
.lp-title { font-size: 16px; font-weight: 700; color: #f2eefa; line-height: 1.25; }
.lp-sub { font-size: 12.5px; color: #b9aecb; }
html[data-theme="light"] .lp-title { color: #2e2440; }
html[data-theme="light"] .lp-sub { color: #6c5f80; }
.lp-count { flex: none; font-size: 12px; font-weight: 800; color: #cdbfe3; }
.lp-card.done .lp-count { color: #9ed36a; }
html[data-theme="light"] .lp-count { color: #6c5f80; }
.lp-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: #629924; }

/* mashq oynasi */
.prac-item .pi-num {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--surface-3); font-size: 11px; font-weight: 800;
}
.prac-item .pi-num.ok { background: #629924; color: #fff; }
.prac-counter { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; color: var(--muted); }
.prac-counter b { font-family: var(--display); font-size: 22px; color: var(--text); }
.prac-counter b.low { color: var(--danger); }
.hl.target { box-shadow: inset 0 0 0 4px rgba(54, 146, 231, .9); background: rgba(54, 146, 231, .22); }

@media (max-width: 1000px) {
  .lp-page { grid-template-columns: 1fr; }
  .lp-side { position: static; grid-template-columns: auto 1fr; text-align: left; justify-items: start; align-items: center; }
  .lp-side-ic { grid-row: 1 / span 4; }
  .lp-side-ic .ic-img, .lp-side-ic .ic { width: 64px; height: 64px; }
}
@media (max-width: 700px) {
  .lp-grid { grid-template-columns: 1fr; }
  .lp-group-title { font-size: 15px; letter-spacing: .16em; }
}

/* ================= Asboblar: tahlil taxtasi ================= */
.gp.an .an-left { flex: 0 1 auto; display: flex; gap: 10px; min-width: 300px; width: min(calc(100vh - 40px), calc(100% - 460px)); }
.an-board { flex: 1; min-width: 0; }
.an-evalbar {
  position: relative; flex: none; width: 24px; border-radius: 3px; overflow: hidden;
  background: #403d39; display: flex; align-items: flex-end;
}
.an-evalbar i { display: block; width: 100%; height: 50%; background: #f0efec; transition: height .6s cubic-bezier(.22, .61, .36, 1); }
.an-evalbar::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(128, 128, 128, .55); pointer-events: none; }
.an-evalbar.off { opacity: .25; }
.an-evalbar.off .an-eval-tx { visibility: hidden; }
.an-evalbar.loading i { animation: evalPulse 1.4s ease-in-out infinite; }
@keyframes evalPulse { 50% { opacity: .55; } }
.an-eval-tx {
  position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-size: 9.5px; font-weight: 800;
  color: #403d39; writing-mode: horizontal-tb;
}
.an-evalbar.black-better .an-eval-tx { bottom: auto; top: 4px; color: #f0efec; }
.an-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.an-head b { font-size: 16px; }
.an-opening { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 600; min-height: 38px; }
.an-opening:empty { display: none; }
.an-opening.big { padding: 0 0 8px; border: 0; font-size: 16px; }
.an-eco { font-size: 11px; font-weight: 800; color: var(--muted); background: var(--surface-2); padding: 1px 6px; border-radius: 4px; }
.an-engine { border-bottom: 1px solid var(--line); padding: 8px 16px; display: grid; gap: 4px; }
.an-eng-head { display: flex; align-items: center; gap: 10px; }
.an-eng-head .switch { transform: scale(.85); transform-origin: left center; }
.an-line { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 3px 6px; border-radius: 4px; cursor: pointer; }
.an-line:hover { background: var(--surface-2); }
.an-line.best { background: var(--surface-2); }
.an-score { min-width: 52px; font-weight: 800; font-family: var(--display); }
.an-moves { min-height: 120px; }
.an-io { display: grid; gap: 6px; }
.an-io textarea { min-height: 64px; }

/* ================= Taxta muharriri ================= */
.ed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; max-width: 1100px; margin: 0 auto; }
.ed-board { display: grid; gap: 8px; max-width: min(78vh, 640px); width: 100%; margin: 0 auto; }
.ed-palette { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; background: var(--surface); border-radius: 6px; padding: 4px; }
.ed-pc { aspect-ratio: 1; border: 2px solid transparent; border-radius: 6px; background: none; cursor: pointer; padding: 2px; display: grid; place-items: center; color: var(--muted); }
.ed-pc svg { width: 100%; height: 100%; }
.ed-pc:hover { background: var(--surface-2); }
.ed-pc.on { border-color: var(--green-2); background: var(--green-soft); }
.ed-pc.trash .ic { width: 60%; height: 60%; }
.ed-palette:first-child .ed-pc.trash { display: none; }
.ed-side { display: grid; gap: 6px; }
.ed-cbs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ed-cb { display: flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }

/* ================= Debyut tadqiqotchisi ================= */
.ex-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; max-width: 1150px; margin: 0 auto; }
.ex-layout .board-wrap { max-width: min(78vh, 640px); margin: 0 auto; }
.ex-line { display: flex; flex-wrap: wrap; gap: 4px; }
.ex-line .chip { border: 0; cursor: pointer; }
.ex-row { cursor: pointer; }
.ex-wdl { display: flex; height: 20px; border-radius: 3px; overflow: hidden; font-size: 10.5px; font-weight: 800; }
.ex-wdl i { display: grid; place-items: center; font-style: normal; }
.ex-wdl .w { background: #f0efec; color: #333; }
.ex-wdl .d { background: #8b8987; color: #fff; }
.ex-wdl .b { background: #2b2927; color: #eee; }

/* ================= Hamjamiyat ================= */
.on-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); flex: none; display: inline-block; }
.on-dot.on { background: #629924; box-shadow: 0 0 0 3px rgba(98, 153, 36, .25); }
.pl-rating { font-family: var(--display); font-size: 17px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.team-card { display: flex; gap: 14px; align-items: flex-start; }
.team-ava { width: 56px; height: 56px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px; flex: none; }
.forum-tbl td { vertical-align: middle; }
.forum-post { margin-bottom: 12px; }
.fp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.fp-body { white-space: pre-wrap; word-break: break-word; line-height: 1.6; font-size: 15px; }

/* ================= Kuzatish ================= */
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.live-card { background: var(--surface); border-radius: 6px; overflow: hidden; display: grid; transition: transform .12s; }
.live-card:hover { transform: translateY(-2px); }
.lc-p { display: flex; align-items: center; gap: 4px; padding: 7px 10px; font-size: 13.5px; }
.tv-info { padding: 12px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.tv-live { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #e0574a; text-transform: uppercase; font-size: 12.5px; letter-spacing: .06em; }
.gp-opening { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.gp-opening .ic-img { width: 18px; height: 18px; }
.pz-h.small { width: 34px; height: 24px; display: inline-grid; box-shadow: none; }
.pz-h.small svg { width: 14px; height: 14px; }

@media (max-width: 1100px) {
  .ex-layout { grid-template-columns: minmax(0, 1fr) 360px; }
  .gp.an .an-left { width: min(calc(100vh - 40px), calc(100% - 380px)); }
}
@media (max-width: 900px) {
  .gp.an .an-left { width: min(100%, calc(100vh - 160px)); min-width: 0; }
  .ed-layout, .ex-layout { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .gp.an .an-left { width: 100%; padding: 0 6px; }
  .an-evalbar { width: 16px; }
  .an-eval-tx { font-size: 8px; }
  .team-grid { grid-template-columns: 1fr; }
}

/* ================= Game Review (chess.com uslubi) ================= */
.sq-badge .cls-ic { width: 100% !important; height: 100% !important; display: block; }
.cls-ic { display: inline-block; vertical-align: middle; flex: none; }
.gp.rv .an-left { width: min(calc(100vh - 150px), calc(100% - 460px)); }
.gp.rv .an-board { display: flex; flex-direction: column; }
.rv-panel { background: var(--surface); }
html:not([data-theme="light"]) .rv-panel { background: #262421; }
.rv-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-height: 52px; }
.rv-head b { font-size: 17px; }
.rv-scroll { flex: 1; min-height: 0; overflow: auto; padding: 14px 16px; display: grid; gap: 10px; align-content: start; }
.rv-foot { padding: 12px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.rv-start { gap: 12px; }
.rv-start .cls-ic circle { fill: #fff; }
.rv-start .cls-ic path { fill: var(--green); }

.coach { display: flex; gap: 12px; align-items: flex-start; }
.coach-ava { flex: none; width: 60px; height: 60px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; }
.coach-ava .ic-img { width: 52px; height: 52px; }
.coach-bubble {
  position: relative; flex: 1; background: #fff; color: #312e2b; border-radius: 10px; padding: 12px 14px;
  font-size: 14.5px; font-weight: 600; line-height: 1.45;
}
.coach-bubble::before { content: ""; position: absolute; left: -8px; top: 18px; border: 8px solid transparent; border-left: 0; border-right-color: #fff; }

.rv-graph { cursor: pointer; border-radius: 4px; overflow: hidden; }
.rv-graph-svg { display: block; width: 100%; height: 90px; }

.rv-row { display: grid; grid-template-columns: 1fr 70px 44px 70px; align-items: center; gap: 6px; min-height: 34px; }
.rv-row.players, .rv-row.accrow { grid-template-columns: 1fr 110px 10px 110px; }
.rv-label { font-weight: 700; font-size: 14px; color: var(--muted); }
.rv-row.cls .rv-label { color: var(--text); font-weight: 600; }
.rv-v { text-align: center; font-weight: 800; font-size: 16px; font-family: var(--display); }
.rv-mid { display: grid; place-items: center; }
.rv-pcol { display: grid; gap: 6px; justify-items: center; }
.rv-pname { font-size: 12.5px; font-weight: 700; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-pava { width: 64px; height: 64px; border-radius: 4px; background: #e8e6e3; display: grid; place-items: center; box-shadow: 0 0 0 2px transparent; }
.rv-pava.dark { box-shadow: 0 0 0 2px #81b64c; }
.rv-pava svg { width: 80%; height: 80%; }
.rv-acc { display: inline-grid; place-items: center; min-width: 72px; height: 42px; padding: 0 10px; border-radius: 5px; font-size: 20px; font-weight: 800; font-family: var(--display); }
.rv-acc.sm { font-size: 17px; height: 36px; }
.rv-acc.light { background: #fff; color: #312e2b; }
.rv-acc.dark { background: #1e1c1a; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.rv-sep { height: 1px; background: var(--line); margin: 4px 0; }
.rv-sub { text-align: center; font-weight: 800; font-size: 15px; margin-top: 6px; }
.rv-loading { padding: 18px 16px; display: grid; gap: 12px; }
.rv-prog { height: 10px; border-radius: 10px; background: var(--surface-3); overflow: hidden; }
.rv-prog i { display: block; height: 100%; width: 0; background: var(--green); transition: width .25s; }
.rv-say { display: flex; gap: 10px; align-items: flex-start; }
.rv-say-h { font-weight: 800; margin-bottom: 2px; }
.mv-cls { display: inline-flex; margin-right: 3px; vertical-align: -3px; }

/* ================= O'yin tugaganda (chess.com modal) ================= */
.go-card {
  position: absolute; z-index: 40; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(380px, 92%); background: #262421; color: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6); animation: pop .2s ease;
}
.go-close { position: absolute; right: 10px; top: 8px; border: 0; background: none; color: #9e9c9a; font-size: 22px; cursor: pointer; }
.go-head { text-align: center; padding: 18px 16px 10px; }
.go-head h2 { margin: 0; font-size: 26px; font-weight: 800; font-family: var(--display); }
.go-head div { color: #b3b1ae; font-size: 13.5px; font-weight: 600; margin-top: 2px; }
.go-rating { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 4px 0 12px; }
.go-rating .ic-img { width: 34px; height: 34px; }
.go-rating b { font-size: 26px; font-family: var(--display); }
.go-rating .delta { font-size: 14px; font-weight: 700; color: #b3b1ae; }
.go-rating .delta.up { color: #81b64c; }
.go-rating .delta.down { color: #e0574a; }
.go-rating small { display: block; font-size: 12px; color: #b3b1ae; text-align: center; }
.go-body { padding: 0 14px 14px; display: grid; gap: 10px; }
.go-body .coach-bubble { font-size: 13.5px; }
.go-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.go-stat { background: #312e2b; border-radius: 6px; padding: 8px 4px; text-align: center; display: grid; gap: 2px; justify-items: center; }
.go-stat b { font-size: 18px; display: flex; align-items: center; gap: 6px; }
.go-stat span { font-size: 12.5px; font-weight: 700; }
.go-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.go-card .btn:not(.primary) { background: #3c3a37; color: #fff; }
.go-wait { text-align: center; font-size: 12.5px; color: #b3b1ae; }

/* O'yin paneli: tahlil holati */
.gp-review-sum { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; font-weight: 800; font-size: 13.5px; }
.gp-review-sum span { display: inline-flex; align-items: center; gap: 6px; }
.gp-eng-row { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.gp-eng-row .switch { transform: scale(.8); transform-origin: left center; }
.gp-eng-line { padding: 6px 16px; border-bottom: 1px solid var(--line); font-size: 13px; display: flex; gap: 10px; }
.gp-eng-line b { min-width: 46px; font-family: var(--display); }
.gp .an-evalbar { width: 20px; }
.gp-left.with-eval { display: grid; grid-template-columns: 20px 1fr; column-gap: 8px; }
.gp-left.with-eval > .an-evalbar { grid-row: 2; }
.gp-left.with-eval > .gp-bar { grid-column: 2; }
.gp-left.with-eval > .board-wrap { grid-column: 2; grid-row: 2; }

@media (max-width: 1100px) {
  .gp.rv .an-left { width: min(calc(100vh - 150px), calc(100% - 380px)); }
}
@media (max-width: 900px) {
  .gp.rv .an-left { width: min(100%, calc(100vh - 220px)); }
}
@media (max-width: 860px) {
  .gp.rv .an-left { width: 100%; }
  .rv-row.players, .rv-row.accrow { grid-template-columns: 1fr 90px 4px 90px; }
}

/* ================= Practice mashq oynasi (lichess uslubi) ================= */
.lr {
  display: grid; grid-template-columns: 300px minmax(0, auto) 340px; gap: 14px; justify-content: center;
  align-items: stretch; height: calc(100vh - 32px); min-height: 520px;
}
.lr-side, .lr-panel { background: #262421; border-radius: 4px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
html[data-theme="light"] .lr-side, html[data-theme="light"] .lr-panel { background: #fff; border: 1px solid var(--line); }
.lr-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px; background: #3692e7; color: #fff; }
.lr-head .ic-img { width: 44px; height: 44px; }
.lr-title { font-size: 18px; font-weight: 500; line-height: 1.2; }
.lr-sub { font-size: 12.5px; font-weight: 700; opacity: .92; }
.lr-list { flex: 1; overflow: auto; }
.lr-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; font-size: 14px;
  border-bottom: 1px solid var(--line); color: var(--text);
}
.lr-item:hover { background: rgba(255, 255, 255, .04); }
.lr-ic { width: 22px; height: 22px; display: grid; place-items: center; font-size: 15px; color: #6b6966; flex: none; }
.lr-item.done .lr-ic { color: #3692e7; font-weight: 900; }
.lr-item.cur { background: rgba(54, 146, 231, .16); }
.lr-item.cur .lr-ic { background: #3692e7; color: #fff; border-radius: 2px; font-size: 11px; }
.lr-tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-r { font-size: 11.5px; color: var(--muted); }
.lr-bottom { display: flex; gap: 8px; align-items: center; padding: 10px; border-top: 1px solid var(--line); }
.lr-back { width: 34px; height: 34px; display: grid; place-items: center; color: #3692e7; border-radius: 4px; flex: none; }
.lr-back:hover { background: var(--surface-2); }
.lr-back .ic { width: 22px; height: 22px; }
.lr-select { min-height: 36px; padding: 6px 10px; font-size: 13.5px; }

.lr-board { display: flex; align-items: flex-start; justify-content: center; min-width: 0; }
.lr-board .board-wrap { width: min(calc(100vh - 32px), calc(100vw - var(--side) - 720px)); max-width: none; margin: 0; }
.lr-board .board { border-radius: 2px; }

.lr-eng { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.lr-eval { font-family: var(--display); font-size: 26px; font-weight: 800; min-width: 64px; }
.lr-eng-meta { flex: 1; min-width: 0; }
.lr-eng-info { font-size: 11.5px; color: #81b64c; font-weight: 700; }
.lr-eng .switch { flex: none; }
.lr-lines { border-bottom: 1px solid var(--line); }
.lr-line { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; padding: 5px 14px; font-size: 13.5px; border-bottom: 1px solid var(--line); align-items: center; }
.lr-line:last-child { border-bottom: 0; }
.lr-ln { color: var(--muted-2); font-size: 12px; }
.lr-pv { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lr-line b { font-family: var(--display); font-size: 13px; }
.lr-moves { flex: 1; min-height: 80px; overflow: auto; }

.lr-box { border-top: 1px solid var(--line); }
.lr-box-title { background: #3f5e22; color: #d9ecc2; font-size: 12.5px; font-weight: 700; padding: 6px 14px; }
.lr-box-body { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; }
.lr-turn { display: flex; align-items: center; gap: 12px; }
.lr-turn b { display: block; font-size: 17px; font-weight: 500; }
.lr-king { width: 46px; height: 46px; display: block; }
.lr-king svg { width: 100%; height: 100%; }
.lr-hint { color: #3692e7; font-size: 14px; font-weight: 600; }
.lr-hint:hover { text-decoration: underline; }
.lr-box .prac-counter { margin: 0; flex-direction: column; gap: 0; align-items: flex-end; font-size: 11.5px; }
.lr-feed { display: flex; align-items: center; gap: 10px; padding: 8px 14px; font-size: 14px; font-weight: 600; }
.lr-feed.good { background: rgba(98, 153, 36, .22); color: #9fd66a; }
.lr-feed.warn { background: rgba(240, 193, 92, .18); color: #f0c15c; }
.lr-feed.bad { background: rgba(224, 87, 74, .2); color: #ff8a7d; }
html[data-theme="light"] .lr-feed.good { color: #3d7a12; }
html[data-theme="light"] .lr-feed.bad { color: #b3261e; }
.lr-feed-ic { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 3px; font-weight: 900; color: #fff; }
.lr-feed.good .lr-feed-ic { background: #629924; }
.lr-feed.warn .lr-feed-ic { background: #d59120; }
.lr-feed.bad .lr-feed-ic { background: #cc3333; }
.lr-btns { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.lr-btns .btn { flex: 1; }

@media (max-width: 1250px) {
  .lr { grid-template-columns: 250px minmax(0, auto) 300px; }
  .lr-board .board-wrap { width: min(calc(100vh - 32px), calc(100vw - var(--side) - 610px)); }
}
@media (max-width: 1000px) {
  .lr { grid-template-columns: 1fr; height: auto; }
  .lr-board { order: -1; }
  .lr-board .board-wrap { width: min(100%, calc(100vh - 140px)); }
  .lr-side { max-height: 260px; }
  .lr-panel { min-height: 0; }
  .lr-moves { max-height: 180px; }
}
@media (max-width: 860px) {
  .lr { gap: 8px; }
  .lr-board .board-wrap { width: 100%; }
  .lr-side, .lr-panel { border-radius: 0; }
}

/* ================= Katta taxta (barcha bo'limlarda) =================
   Taxtali sahifalar oddiy kontent kengligi (1100px) bilan cheklanmaydi —
   taxta ekran balandligiga qarab kattalashadi. */
.view:has(> .puzzle-layout, > div > .puzzle-layout, > .game-layout, > div > .game-layout, > .play-layout, > .prac-layout, > .ex-layout, > .ed-layout) {
  max-width: 1640px;
}
.puzzle-layout, .game-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; }
.game-layout .board-wrap, .puzzle-layout .board-wrap,
.game-layout .player-bar { max-width: min(calc(100vh - 118px), 980px); }
.play-layout .board-wrap { max-width: min(calc(100vh - 70px), 900px); }
.prac-layout .board-wrap { max-width: min(calc(100vh - 110px), 860px); }
.ex-layout, .ed-layout { max-width: 1560px; }
.ex-layout .board-wrap { max-width: min(calc(100vh - 80px), 900px); }
.ed-layout .ed-board { max-width: min(calc(100vh - 190px), 860px); }
.puzzle-layout .pz-hist { max-width: min(calc(100vh - 118px), 980px); margin-inline: auto; }
@media (max-width: 1100px) {
  .puzzle-layout, .game-layout { grid-template-columns: 1fr; }
  .game-layout .board-wrap, .puzzle-layout .board-wrap, .game-layout .player-bar,
  .puzzle-layout .pz-hist, .play-layout .board-wrap, .prac-layout .board-wrap,
  .ex-layout .board-wrap, .ed-layout .ed-board { max-width: min(100%, calc(100vh - 118px)); }
}

/* Masala sahifasida tanlangan mavzu */
.pz-topic {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-l, 12px);
  background: var(--surface); border: 1px solid var(--line); color: inherit; transition: .12s;
}
.pz-topic:hover { background: var(--surface-2); }
.pz-topic .ic { width: 20px; height: 20px; }
.pz-topic .b { font-size: 16px; }

/* ================= Masalalar katalogi (lichess.org/training/themes kabi) =================
   Bo'limlar pastga qarab ketadi (PgDn / g'ildirak bilan), har birida 2 ustunli ro'yxat. */
.pzt-page { max-width: 1180px; margin: 0 auto; background: var(--surface); border-radius: var(--r-l, 12px); padding: 30px 40px 40px; }
.pzt-title-main { font-size: 36px; font-weight: 400; margin: 0 0 6px; }
.pzt-sec { margin-top: 34px; }
.pzt-h { font-size: 28px; font-weight: 400; margin: 0 0 14px; }
.pzt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; }

.pzt-card {
  position: relative; display: flex; align-items: center; gap: 22px; padding: 14px 12px;
  border-radius: 8px; color: inherit; transition: background .12s;
}
.pzt-card:hover { background: var(--surface-2); }
.pzt-card:hover .pzt-name { color: var(--blue, #3d8fd8); }
.pzt-card.big { padding: 22px 26px; background: var(--green-soft); border: 1px solid var(--green); }
.pzt-card.big .pzt-name { font-size: 30px; }
.pzt-card.big .pzt-desc { font-size: 16px; }
.pzt-card.big .pzt-ic { flex-basis: 72px; width: 72px; height: 72px; }
.pzt-card.empty .pzt-ic { opacity: .45; }
.pzt-ic { flex: 0 0 58px; width: 58px; height: 58px; display: grid; place-items: center; }
.pzt-ic img { width: 100%; height: 100%; object-fit: contain; }
.pc-num {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  background: var(--danger); color: #fff; font-weight: 900; font-size: 20px;
}
.pzt-body { min-width: 0; }
.pzt-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pzt-name { font-size: 22px; font-weight: 400; transition: color .12s; }
.pzt-count { font-size: 15px; font-weight: 300; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.pzt-desc { font-size: 14px; color: var(--muted); margin-top: 2px; line-height: 1.4; }

.pzt-dl {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer;
  display: grid; place-items: center; opacity: 0; transition: opacity .12s;
}
html[dir="rtl"] .pzt-dl { right: auto; left: 8px; }
.pzt-dl .ic { width: 16px; height: 16px; }
.pzt-card:hover .pzt-dl, .pzt-op:hover .pzt-dl, .pzt-card.empty .pzt-dl, .pzt-op.empty .pzt-dl { opacity: 1; }
.pzt-dl:hover { background: var(--green); color: #fff; }

.pzt-h-row { display: flex; align-items: baseline; gap: 12px; }
.pzt-h-row .pzt-h { flex: 1; }
.pzt-more { border: 0; background: none; color: var(--blue, #3d8fd8); cursor: pointer; font-size: 14px; }
.pzt-more:hover { text-decoration: underline; }
.pzt-ops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 20px; }
.pzt-op {
  position: relative; display: flex; align-items: baseline; gap: 8px; padding: 7px 40px 7px 12px;
  border-radius: 6px; color: inherit; min-width: 0;
}
.pzt-op:hover { background: var(--surface-2); }
.pzt-op .pzt-dl { top: 3px; width: 26px; height: 26px; }
.pzt-op-name { color: var(--blue, #3d8fd8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pzt-op .pzt-count { font-size: 12.5px; flex: 0 0 auto; }
@media (hover: none) { .pzt-dl { opacity: 1; } }
@media (max-width: 900px) {
  .pzt-page { padding: 20px 16px 28px; }
  .pzt-grid { grid-template-columns: 1fr; }
  .pzt-ops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pzt-title-main { font-size: 28px; }
  .pzt-h { font-size: 23px; }
  .pzt-name { font-size: 19px; }
}
@media (max-width: 560px) {
  .pzt-ops { grid-template-columns: 1fr; }
  .pzt-card { gap: 14px; }
  .pzt-ic { flex-basis: 46px; width: 46px; height: 46px; }
}

/* Taxtadagi strelkalar (lichess uslubida) */
.board > svg.arrows { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; overflow: visible; }
.board > svg.arrows .arrow { fill: #15781b; opacity: .8; }
.board > svg.arrows .arrow.hint { fill: #15781b; }
.board > svg.arrows .arrow.blue { fill: #003088; }
.board > svg.arrows .arrow.red { fill: #882020; }

/* Admin: tartiblanadigan ro'yxat */
.ord-list { display: grid; gap: 4px; }
.ord-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line); cursor: grab; user-select: none;
}
.ord-item.dragging { opacity: .45; }
.ord-item .ord-name { flex: 1; font-weight: 600; }
.ord-item .ord-grip { color: var(--muted-2); letter-spacing: -2px; }
.ord-item .si-ic .ic, .ord-item .si-ic img { width: 22px; height: 22px; }
.ord-item .icon-btn { width: 28px; height: 28px; }

/* ================= Varaqlanadigan sahifa (pager) ================= */
html.spg-lock, html.spg-lock body { overflow: hidden; overscroll-behavior: none; }
.view.view-pager { padding-bottom: 0; max-width: 1480px; }
.spg { position: relative; display: flex; gap: 20px; }
.spg-aside { flex: 0 0 220px; align-self: flex-start; }
.spg-main { position: relative; flex: 1; min-width: 0; height: 100%; }
.spg-viewport { position: relative; height: 100%; overflow: hidden; border-radius: inherit; }
.spg-track { transition: transform .42s cubic-bezier(.22,.8,.26,1); will-change: transform; }
.spg-slide { box-sizing: border-box; overflow: hidden; }
.spg-h { font-size: 28px; font-weight: 400; margin: 6px 0 14px; display: flex; align-items: baseline; gap: 10px; }
.spg-part { font-size: 14px; color: var(--muted-2); }
.spg-head { margin-bottom: 8px; }
.spg-dots { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: grid; gap: 9px; z-index: 3; }
html[dir="rtl"] .spg-dots { right: auto; left: 14px; }
.spg-dot { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--surface-3); transition: .15s; }
.spg-dot:hover { background: var(--muted-2); }
.spg-dot.on { background: var(--green); transform: scale(1.35); }
.spg-ctrl { position: absolute; right: 8px; bottom: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 3; }
html[dir="rtl"] .spg-ctrl { right: auto; left: 8px; }
.spg-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); cursor: pointer; display: grid; place-items: center;
}
.spg-btn .ic { width: 18px; height: 18px; }
.spg-btn.up .ic { transform: rotate(-90deg); }
.spg-btn.down .ic { transform: rotate(90deg); }
.spg-btn:disabled { opacity: .3; cursor: default; }
.spg-btn:not(:disabled):hover { background: var(--green); color: #fff; }
.spg-counter { font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .spg { flex-direction: column; gap: 10px; }
  .spg-aside { flex: none; align-self: stretch; }
  .spg-dots { right: 6px; }
}

/* Masala mavzulari — pager ichida */
.pzt-page { padding: 0 !important; }
.pzt-page .spg-slide { padding: 26px 64px 26px 40px; }
.pzt-one { display: block; }
@media (max-width: 900px) { .pzt-page .spg-slide { padding: 16px 44px 16px 14px; } }

/* ================= Shaxmat asoslari (lichess.org/learn kabi) ================= */
.lb-page .spg-slide { padding: 8px 56px 16px 4px; }
.lb-page .spg-h {
  justify-content: center; font-size: 22px; letter-spacing: .35em; text-transform: uppercase; color: var(--muted);
  font-weight: 400; margin: 10px 0 18px;
}
.lb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 900px; margin: 0 auto; }
.lb-aside {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px 16px;
  text-align: center; display: grid; justify-items: center; gap: 6px;
}
.lb-logo { width: 110px; height: 110px; object-fit: contain; }
.lb-aside-t { font-size: 28px; line-height: 1.1; }
.lb-aside-s { font-size: 20px; color: var(--muted); margin-bottom: 8px; }
.lb-prog { position: relative; width: 100%; height: 26px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.lb-prog i { position: absolute; inset: 0 auto 0 0; background: #3692e7; }
.lb-prog span { position: relative; display: grid; place-items: center; height: 100%; color: #fff; font-size: 12.5px; font-weight: 700; }
.lb-reset { border: 0; background: none; color: var(--muted); font-size: 12.5px; cursor: pointer; margin-top: 6px; }
.lb-reset:hover { color: var(--danger); }

.lb-card {
  position: relative; display: flex; align-items: center; gap: 18px; padding: 14px 20px; min-height: 76px;
  border-radius: 4px; overflow: hidden; color: #fff; background: #4b3a63; border: 1px solid #6b5790;
  box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: filter .15s, transform .15s;
}
.lb-card:hover { filter: brightness(1.15); transform: translateY(-1px); }
.lb-card.active { background: linear-gradient(90deg, #264b75, #2f5f93); border-color: #5aa0e8; box-shadow: 0 0 0 1px #5aa0e8, 0 2px 8px rgba(0,0,0,.3); }
.lb-card.done { background: linear-gradient(90deg, #2d4b2a, #3a6034); border-color: #6aa84f; }
.lb-ic { flex: 0 0 48px; width: 48px; height: 48px; display: grid; place-items: center; }
.lb-ic img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.lb-tx { display: grid; min-width: 0; }
.lb-title { font-size: 22px; line-height: 1.15; }
.lb-sub { font-size: 13.5px; opacity: .85; }
.lb-ribbon {
  position: absolute; top: 12px; right: -34px; width: 130px; padding: 3px 0; transform: rotate(45deg);
  background: #9fcff5; color: #1e3b5a; font-size: 12px; font-weight: 700; text-align: center; letter-spacing: .03em;
}
.lb-card.done .lb-ribbon { background: #b9e39c; color: #243d1a; }
html[dir="rtl"] .lb-ribbon { right: auto; left: -34px; transform: rotate(-45deg); }
.lb-stars { display: inline-flex; gap: 1px; }
.lb-stars i { font-style: normal; color: rgba(0,0,0,.25); }
.lb-stars i.on { color: #f5b700; text-shadow: 0 1px 1px rgba(0,0,0,.25); }
@media (max-width: 700px) {
  .lb-grid { grid-template-columns: 1fr; }
  .lb-page .spg-h { font-size: 17px; letter-spacing: .2em; }
  .lb-title { font-size: 19px; }
}

/* Bosqich sahifasi */
.lb-side { display: grid; gap: 12px; align-content: start; }
.lb-side > * { background: var(--surface); border-radius: 10px; padding: 12px 14px; }
.lb-side .lb-head { display: flex; align-items: center; gap: 12px; background: #4b3a63; color: #fff; }
.lb-side .lb-head .lb-sub { opacity: .8; }
.lb-back { color: #fff; opacity: .8; display: grid; place-items: center; }
.lb-back .ic { width: 20px; height: 20px; }
.lb-intro { font-size: 14px; color: var(--muted); line-height: 1.5; }
.lb-levels { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 14px !important; padding-bottom: 14px !important; }
.lb-lv {
  position: relative; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface-2);
  color: var(--text); font-weight: 800; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
}
.lb-lv:not(:disabled):not(.cur):hover { border-color: var(--accent); transform: translateY(-1px); }
/* bajarilgan daraja — yashil, burchagida ✓ */
.lb-lv.done { background: color-mix(in srgb, var(--ok) 16%, var(--surface-2)); border-color: var(--ok); color: var(--ok); }
.lb-lv.done::after {
  content: "\2713"; position: absolute; right: -6px; top: -6px; width: 17px; height: 17px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ok); color: #fff; font-size: 11px; line-height: 1; box-shadow: 0 0 0 2px var(--surface);
}
/* hozir ishlanayotgan daraja — to'q to'ldirilgan, kattaroq, ikki qavat halqa */
.lb-lv.cur {
  z-index: 1; transform: scale(1.18); background: var(--accent); border-color: #fff; color: #fff;
  box-shadow: 0 0 0 3px var(--accent), 0 6px 18px -4px var(--accent);
}
.lb-lv:disabled { opacity: .4; cursor: default; }
/* bosqich avval to'liq ishlangan */
.lb-passed { display: flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--ok) 14%, var(--surface)) !important; border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); }
.lb-passed[hidden] { display: none; }
.lb-passed-ic { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-weight: 900; }
.lb-passed-tx { display: grid; gap: 1px; line-height: 1.3; }
.lb-passed-tx b { color: var(--ok); }
.lb-passed-tx .lb-stars { font-size: 15px; }
.lb-passed-tx small { color: var(--muted); font-size: 12px; }
.lb-lvl-name { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }
.lb-goal-t { font-size: 20px; font-weight: 700; margin-top: 4px; line-height: 1.3; }
.lb-done-t { font-size: 24px; font-weight: 800; color: var(--ok); }
.lb-goal .lb-stars { font-size: 30px; }
.lb-info { display: flex; gap: 16px; font-weight: 700; color: var(--muted); }
.lb-status { min-height: 48px; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.lb-status:empty { display: none; }
.lb-status.good { background: var(--green-soft); color: var(--green-2); }
.lb-status.good .lb-stars { font-size: 22px; }
.lb-status.bad { background: rgba(224, 87, 74, .15); color: var(--danger); }
.lb-actions { display: flex; flex-wrap: wrap; gap: 8px; background: none !important; padding: 0 !important; }

/* Taxtadagi yig'iladigan yulduzlar */
.hl.apple {
  z-index: 3;
  background: center / 58% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.6 2.9 5.9 6.5.9-4.7 4.6 1.1 6.5L12 17.4l-5.8 3.1 1.1-6.5-4.7-4.6 6.5-.9z' fill='%23f5b700' stroke='%23a06d00' stroke-width='1'/%3E%3C/svg%3E");
}

/* ================= Liquid glass kartochkalar (GlassButton uslubi) =================
   C.glassCard() → .glass-wrap > .glass > .glass-text + .glass-shadow */
@property --angle-1 { syntax: "<angle>"; inherits: false; initial-value: -75deg; }
@property --angle-2 { syntax: "<angle>"; inherits: false; initial-value: -45deg; }

.glass-wrap {
  --anim-time: .4s;
  --anim-ease: cubic-bezier(.25, 1, .5, 1);
  --border-width: clamp(1px, .0625em, 4px);
  --r: 18px;
  --g-hi: 255 255 255;
  --g-lo: 0 0 0;
  position: relative; z-index: 2; display: grid; min-height: 0; min-width: 0;
  transform-style: preserve-3d; transition: transform var(--anim-time) var(--anim-ease);
}
.glass-wrap:has(.glass:active) { transform: rotateX(14deg); }

.glass {
  --tint: 124 96 196;
  all: unset; box-sizing: border-box; position: relative; isolation: isolate;
  display: flex; min-width: 0; cursor: pointer; border-radius: var(--r); color: #fff;
  -webkit-tap-highlight-color: transparent;
  -webkit-backdrop-filter: blur(clamp(1px, .125em, 4px)); backdrop-filter: blur(clamp(1px, .125em, 4px));
  transition: all var(--anim-time) var(--anim-ease);
  /* kartalarning eski fon/chegara qoidalarini bosib o'tish uchun !important */
  background: linear-gradient(-75deg, rgb(var(--tint) / .16), rgb(var(--tint) / .42), rgb(var(--tint) / .16)) !important;
  border: 0 !important; padding: 0 !important; overflow: visible !important; min-height: 0 !important;
  box-shadow:
    inset 0 .125em .125em rgb(var(--g-hi) / .1),
    inset 0 -.125em .125em rgb(var(--g-lo) / .35),
    0 .25em .125em -.125em rgb(var(--g-lo) / .45),
    0 0 .1em .25em inset rgb(var(--g-hi) / .08);
}
.glass:hover {
  -webkit-backdrop-filter: blur(.01em); backdrop-filter: blur(.01em);
  box-shadow:
    inset 0 .125em .125em rgb(var(--g-hi) / .1),
    inset 0 -.125em .125em rgb(var(--g-lo) / .35),
    0 .15em .05em -.1em rgb(var(--g-lo) / .5),
    0 0 .05em .1em inset rgb(var(--g-hi) / .16);
  transform: scale(.985);
}
.glass:focus-visible { outline: 2px solid #9fcff5; outline-offset: 3px; }

.glass-text {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 18px;
  padding: 14px 22px; border-radius: var(--r); user-select: none;
  text-shadow: 0 .2em .05em rgb(var(--g-lo) / .2);
  transition: text-shadow var(--anim-time) var(--anim-ease);  /* "all" emas: o'lcham darhol o'zgarsin */
}
.glass:hover .glass-text { text-shadow: .025em .025em .025em rgb(var(--g-lo) / .25); }
/* yaltiroq chiziq */
.glass-text::after {
  content: ""; position: absolute; z-index: 3; pointer-events: none; display: block; overflow: clip;
  top: calc(var(--border-width) / 2); left: calc(var(--border-width) / 2);
  width: calc(100% - var(--border-width)); height: calc(100% - var(--border-width));
  border-radius: var(--r); box-sizing: border-box; mix-blend-mode: screen;
  background: linear-gradient(var(--angle-2), transparent 0%, rgb(var(--g-hi) / .3) 40% 50%, transparent 55%);
  background-size: 200% 200%; background-position: 0%;
  transition: background-position calc(var(--anim-time) * 1.25) var(--anim-ease), --angle-2 calc(var(--anim-time) * 1.25) var(--anim-ease);
}
.glass:hover .glass-text::after { background-position: 25%; }
.glass:active .glass-text::after { --angle-2: -15deg; background-position: 50% 15%; }
/* shisha chegara */
.glass::after {
  content: ""; position: absolute; z-index: 1; pointer-events: none;
  top: calc(0% - var(--border-width) / 2); left: calc(0% - var(--border-width) / 2);
  width: calc(100% + var(--border-width)); height: calc(100% + var(--border-width));
  padding: var(--border-width); box-sizing: border-box; border-radius: var(--r);
  background:
    conic-gradient(from var(--angle-1) at 50% 50%, rgb(var(--g-hi) / .55) 0%, transparent 5% 40%, rgb(var(--g-hi) / .55) 50%, transparent 60% 95%, rgb(var(--g-hi) / .55) 100%),
    linear-gradient(180deg, rgb(var(--g-hi) / .14), rgb(var(--g-hi) / .14));
  box-shadow: inset 0 0 0 calc(var(--border-width) / 2) rgb(var(--g-hi) / .2);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  transition: all var(--anim-time) var(--anim-ease), --angle-1 .5s ease;
}
.glass:hover::after { --angle-1: -125deg; }
.glass:active::after { --angle-1: -75deg; }
/* soya */
.glass-shadow {
  --shadow-cutoff-fix: 2em;
  position: absolute; pointer-events: none; z-index: -1;
  width: calc(100% + var(--shadow-cutoff-fix)); height: calc(100% + var(--shadow-cutoff-fix));
  top: calc(0% - var(--shadow-cutoff-fix) / 2); left: calc(0% - var(--shadow-cutoff-fix) / 2);
  filter: blur(clamp(2px, .125em, 12px)); transition: filter var(--anim-time) var(--anim-ease);
}
.glass-shadow::after {
  content: ""; position: absolute; box-sizing: border-box; border-radius: var(--r); padding: .125em; opacity: 1;
  width: calc(100% - var(--shadow-cutoff-fix) - .25em); height: calc(100% - var(--shadow-cutoff-fix) - .25em);
  top: calc(var(--shadow-cutoff-fix) - .5em); left: calc(var(--shadow-cutoff-fix) - .875em);
  background: linear-gradient(180deg, rgb(var(--g-lo) / .4), rgb(var(--g-lo) / .2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  transition: all var(--anim-time) var(--anim-ease);
}
.glass-wrap:has(.glass:hover) .glass-shadow { filter: blur(clamp(2px, .0625em, 6px)); }
.glass-wrap:has(.glass:hover) .glass-shadow::after { top: calc(var(--shadow-cutoff-fix) - .875em); }
.glass-wrap:has(.glass:active) .glass-shadow::after { top: calc(var(--shadow-cutoff-fix) - .5em); opacity: .75; }
@media (hover: none) and (pointer: coarse) {
  .glass::after, .glass:hover::after, .glass:active::after { --angle-1: -75deg; }
  .glass .glass-text::after, .glass:active .glass-text::after { --angle-2: -45deg; }
}
html[data-theme="light"] .glass { color: #1f1830; }
html[data-theme="light"] .glass-text { text-shadow: none; }

/* Shisha ko'rinishi uchun rangli fon */
.glass-bg .spg-viewport {
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 18%, rgba(124, 92, 210, .38), transparent 42%),
    radial-gradient(circle at 88% 28%, rgba(54, 146, 231, .30), transparent 46%),
    radial-gradient(circle at 55% 95%, rgba(98, 153, 36, .26), transparent 46%),
    var(--surface);
}
html[data-theme="light"] .glass-bg .spg-viewport {
  background:
    radial-gradient(circle at 12% 18%, rgba(124, 92, 210, .22), transparent 42%),
    radial-gradient(circle at 88% 28%, rgba(54, 146, 231, .2), transparent 46%),
    radial-gradient(circle at 55% 95%, rgba(98, 153, 36, .18), transparent 46%),
    var(--surface);
}

/* ================= Pager: slaydni to'liq to'ldirish ================= */
.pzt-page, .lb-page, .lp-page { background: none !important; max-width: none !important; display: flex !important; }
.spg-slide { display: flex; flex-direction: column; padding: 22px 96px 22px 28px !important; }
.spg-sec { display: flex; flex-direction: column; flex-basis: auto; margin-bottom: 18px; }
.spg-sec:last-child { margin-bottom: 0; }
.spg-grid { flex: 1 1 auto; display: grid; gap: 14px; align-content: stretch; min-height: 0; }
.spg-grid.lb-grid, .spg-grid.pzt-grid, .spg-grid.lp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; margin: 0; }
.spg-grid.pzt-ops { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.spg-grid.pzt-one { grid-template-columns: 1fr; }
.lb-page .spg-h, .lp-page .spg-h {
  justify-content: center; font-size: 22px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; margin: 4px 0 14px;
}
.spg-slide.multi .spg-h { margin-top: 0; }

/* Tepaga / pastga tugmalari va bo'limlar nuqtalari */
.spg-ctrl {
  position: absolute; right: 16px; top: 50%; bottom: auto; transform: translateY(-50%); z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
html[dir="rtl"] .spg-ctrl { right: auto; left: 16px; }
.spg-dots { position: static !important; transform: none !important; display: grid; gap: 9px; }
.glass-wrap.spg-btn-wrap { --r: 999px; }
.glass.spg-btn { --tint: 90 150 230; width: 54px; height: 54px; }
.glass.spg-btn .glass-text { padding: 0; justify-content: center; }
.spg-arrow .ic { width: 22px; height: 22px; }
.spg-btn.up .spg-arrow { transform: rotate(-90deg); }
.spg-btn.down .spg-arrow { transform: rotate(90deg); }
html[dir="rtl"] .spg-btn.up .spg-arrow { transform: rotate(-90deg) scaleY(-1); }
.glass.spg-btn.off { opacity: .3; pointer-events: none; }
.spg-counter { font-size: 11.5px; color: var(--muted); font-weight: 700; }

/* ---- Shaxmat asoslari kartalari ---- */
.glass.lb-card { --tint: 124 96 196; }
.glass.lb-card.active { --tint: 54 146 231; }
.glass.lb-card.done { --tint: 98 170 60; }
.glass.lb-card .glass-text { gap: clamp(16px, 2vw, 28px); padding: 16px clamp(18px, 2.4vw, 34px); }
.glass.lb-card .lb-ic { flex: 0 0 clamp(48px, 5vw, 76px); width: clamp(48px, 5vw, 76px); height: clamp(48px, 5vw, 76px); }
.glass.lb-card .lb-title { font-size: clamp(20px, 2.1vw, 30px); font-weight: 600; }
.glass.lb-card .lb-sub { font-size: clamp(13px, 1.1vw, 16px); opacity: .88; }
.lb-ribbon-box { position: absolute; inset: 0; overflow: hidden; border-radius: var(--r); pointer-events: none; }
.lb-ribbon { top: 16px; right: -36px; width: 140px; }

/* ---- Masala mavzulari kartalari ---- */
.glass.pzt-card { --tint: 110 124 160; }
.glass.pzt-card.big { --tint: 98 170 60; }
.glass.pzt-card.empty { opacity: .62; }
.glass.pzt-card .glass-text { gap: 20px; padding: 12px 22px; }
.glass.pzt-card .pzt-name { color: inherit; }
.glass.pzt-card:hover .pzt-name { color: #9fcff5; }
.glass.pzt-card .pzt-desc, .glass.pzt-card .pzt-count { color: inherit; opacity: .78; }
.glass.pzt-op { --tint: 70 110 180; }
.glass.pzt-op .glass-text { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 8px 44px 8px 16px; }
.glass.pzt-op .pzt-op-name { color: inherit; font-weight: 700; }
.glass.pzt-op.empty { opacity: .6; }

/* ---- Practice kartalari ---- */
.lp-page .spg-aside .lp-side { position: static; }
.glass.lp-card { --tint: 124 96 196; }
.glass.lp-card.started { --tint: 54 146 231; }
.glass.lp-card.done { --tint: 98 170 60; }
.glass.lp-card .glass-text { gap: 16px; padding: 12px 22px 14px 16px; }
.glass.lp-card .lp-title { color: inherit; font-size: clamp(16px, 1.4vw, 20px); }
.glass.lp-card .lp-sub { color: inherit; opacity: .8; }
.glass.lp-card .lp-bar { position: absolute; left: 14px; bottom: 6px; height: 3px; border-radius: 3px; background: #7bd14f; max-width: calc(100% - 28px); }

@media (max-width: 900px) {
  .spg-slide { padding: 14px 70px 14px 10px !important; }
  .spg-grid.pzt-ops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glass.spg-btn { width: 44px; height: 44px; }
  .spg-ctrl { right: 8px; gap: 8px; }
}
@media (max-width: 640px) {
  .spg-grid.lb-grid, .spg-grid.pzt-grid, .spg-grid.lp-grid, .spg-grid.pzt-ops { grid-template-columns: 1fr; }
}
.spg-arrow { display: grid; place-items: center; transition: transform .2s; }
.spg-grid { flex: none; }
.spg-btn .spg-arrow .ic { transform: none !important; }
/* toq sonli kartalar: oxirgisi butun qatorni egallaydi — bo'sh joy qolmaydi */
.spg-grid.lb-grid > :last-child:nth-child(odd),
.spg-grid.pzt-grid > :last-child:nth-child(odd),
.spg-grid.lp-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .spg-grid.lb-grid > :last-child:nth-child(odd),
  .spg-grid.pzt-grid > :last-child:nth-child(odd),
  .spg-grid.lp-grid > :last-child:nth-child(odd) { grid-column: auto; }
}
.pzt-page .pzt-title-main { font-size: 28px; margin: 0; }
.pzt-page .spg-head p { margin: 2px 0 4px; }
.pzt-page .spg-h { font-size: 24px; margin: 4px 0 10px; }

/* ================= Telefon: bitta bo'lim — bitta sahifa (pager phoneSingle) =================
   JS har bir bo'lim uchun ustunlar sonini (data-cols) va kartochka o'lchamini (data-size: xl/l/m/s)
   tanlaydi — bo'limning hamma kartochkasi bitta sahifaga sig'adi. */
.spg-single .spg-sec { flex: 1; }
.spg-single .spg-h { margin: 0 0 8px !important; font-size: 20px; }
.spg-single.lb-page .spg-h, .spg-single.lp-page .spg-h { font-size: 15px; letter-spacing: .16em; }
.spg-single .spg-head .pzt-title-main { font-size: 22px; }
.spg-single .spg-head p { font-size: 11.5px; margin: 0 0 6px; }

/* umumiy: kartochka ichi. Hamma o'lcham em da — JS har bo'lim uchun --fs ni shunday tanlaydiki,
   matn va ikonka kartochkadan chiqmaydi (telefonning tizim shrifti katta bo'lsa ham). */
.spg-single .glass .glass-text {
  font-size: var(--fs, 16px); gap: .6em; padding: .55em .7em; overflow: hidden; min-height: 0;
}
.spg-single .glass .pzt-title { gap: .35em; }
.spg-single .glass .lb-tx, .spg-single .glass .lp-tx { flex: none; min-width: 0; max-width: 100%; }
.spg-single .glass .pzt-body { min-width: 0; max-width: 100%; }
.spg-single .glass .pzt-name, .spg-single .glass .lb-title, .spg-single .glass .lp-title,
.spg-single .glass .pzt-desc, .spg-single .glass .lb-sub, .spg-single .glass .lp-sub { overflow-wrap: anywhere; }
.spg-single .glass .lp-ic .ic, .spg-single .glass .lp-ic .ic-img, .spg-single .glass .lp-ic img, .spg-single .glass .lp-ic svg { width: 100% !important; height: 100% !important; }

/* xl — 1 ustun, katta kartochka: markazda, tavsif bilan */
.spg-single [data-size="xl"] .glass .glass-text { flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: .7em; }
.spg-single [data-size="xl"] .pzt-title { flex-direction: column; align-items: center; gap: .1em; }
.spg-single [data-size="xl"] .lb-tx, .spg-single [data-size="xl"] .lp-tx { justify-items: center; }
.spg-single [data-size="xl"] .pzt-ic, .spg-single [data-size="xl"] .lb-ic, .spg-single [data-size="xl"] .lp-ic { flex: none; width: 4.4em; height: 4.4em; }
.spg-single [data-size="xl"] .pzt-name, .spg-single [data-size="xl"] .lb-title, .spg-single [data-size="xl"] .lp-title { font-size: 1.45em; font-weight: 600; line-height: 1.15; }
.spg-single [data-size="xl"] .pzt-desc, .spg-single [data-size="xl"] .lb-sub, .spg-single [data-size="xl"] .lp-sub { font-size: .88em; max-width: 34ch; }
.spg-single [data-size="xl"] .pzt-count, .spg-single [data-size="xl"] .lp-count { font-size: .95em; }

/* l — 1 ustun, o'rtacha: yonma-yon, tavsif bilan */
.spg-single [data-size="l"] .pzt-ic, .spg-single [data-size="l"] .lb-ic, .spg-single [data-size="l"] .lp-ic { flex: 0 0 3.1em; width: 3.1em; height: 3.1em; }
.spg-single [data-size="l"] .pzt-name, .spg-single [data-size="l"] .lb-title, .spg-single [data-size="l"] .lp-title { font-size: 1.15em; line-height: 1.2; }
.spg-single [data-size="l"] .pzt-desc, .spg-single [data-size="l"] .lb-sub, .spg-single [data-size="l"] .lp-sub { font-size: .78em; }
.spg-single [data-size="l"] .pzt-count, .spg-single [data-size="l"] .lp-count { font-size: .8em; }

/* m / s — 2–3 ustunli plitkalar: ikonka tepada, nom pastda */
.spg-single [data-size="m"] .glass .glass-text, .spg-single [data-size="s"] .glass .glass-text {
  flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: .25em; padding: .4em .35em .7em;
}
.spg-single [data-size="m"] .pzt-title, .spg-single [data-size="s"] .pzt-title { flex-direction: column; align-items: center; gap: 0; }
.spg-single [data-size="m"] .lb-tx, .spg-single [data-size="m"] .lp-tx,
.spg-single [data-size="s"] .lb-tx, .spg-single [data-size="s"] .lp-tx { justify-items: center; gap: .1em; }
.spg-single [data-size="m"] .pzt-desc, .spg-single [data-size="s"] .pzt-desc,
.spg-single [data-size="s"] .lb-sub, .spg-single [data-size="s"] .lp-sub { display: none; }
.spg-single [data-size="m"] .pzt-ic, .spg-single [data-size="m"] .lb-ic, .spg-single [data-size="m"] .lp-ic { flex: none; width: 2.4em; height: 2.4em; }
.spg-single [data-size="s"] .pzt-ic, .spg-single [data-size="s"] .lb-ic, .spg-single [data-size="s"] .lp-ic { flex: none; width: 1.8em; height: 1.8em; }
.spg-single [data-size="m"] .pc-num { width: 2.1em; height: 2.1em; font-size: .9em; }
.spg-single [data-size="s"] .pc-num { width: 1.9em; height: 1.9em; font-size: .75em; }
.spg-single [data-size="m"] .pzt-name, .spg-single [data-size="m"] .lb-title, .spg-single [data-size="m"] .lp-title { font-size: .95em; font-weight: 600; line-height: 1.15; }
.spg-single [data-size="s"] .pzt-name, .spg-single [data-size="s"] .lb-title, .spg-single [data-size="s"] .lp-title { font-size: .8em; font-weight: 600; line-height: 1.12; }
.spg-single [data-size="m"] .lb-sub, .spg-single [data-size="m"] .lp-sub { font-size: .72em; line-height: 1.2; }
.spg-single [data-size="m"] .pzt-count, .spg-single [data-size="m"] .lp-count { font-size: .72em; }
.spg-single [data-size="s"] .pzt-count, .spg-single [data-size="s"] .lp-count { font-size: .66em; }
.spg-single [data-size="m"] .lb-ribbon-box, .spg-single [data-size="s"] .lb-ribbon-box { display: none; }
/* Practice: progress chizig'i kartochka tagida, "1/4" matni ustiga tushmaydi */
.spg-single .glass.lp-card .lp-bar { left: .9em !important; bottom: .3em !important; height: 3px !important; max-width: calc(100% - 1.8em) !important; }

/* debyutlar ro'yxati: faqat matn */
.spg-single .glass.pzt-op .glass-text { padding: .15em .4em !important; justify-content: center; align-items: center; text-align: center; gap: 0; }
.spg-single .glass .pzt-op-name { white-space: normal; font-size: .82em; line-height: 1.05; }
.spg-single .pzt-op .pzt-count { font-size: .7em; }
.spg-single [data-size="s"] .pzt-op .pzt-count { display: none; }
.spg-single .pzt-dl { display: none; }
.spg-single .glass-wrap { --r: 12px; }

/* chap panel telefonda ixcham qator bo'ladi */
.spg-single .spg-aside { flex: none; }
.spg-single .lb-aside, .spg-single .lp-side {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; text-align: left; flex-wrap: wrap;
}
.spg-single .lb-logo, .spg-single .lp-side-ic, .spg-single .lb-aside-s, .spg-single .lp-side p { display: none; }
.spg-single .lb-aside-t, .spg-single .lp-side h1 { font-size: 18px; margin: 0; }
.spg-single .lb-prog, .spg-single .lp-progress { flex: 1; min-width: 120px; height: 24px; margin: 0; }
.spg-single .lb-reset { margin: 0; }
.spg-single .spg-main { flex: 1; min-height: 0; height: auto; }

/* Telefon: sig'maydigan kontent tepadan emas, pastdan qirqilsin; uzun matn — "…" bilan */
.spg-single .glass .glass-text { justify-content: safe center; }
.spg-single [data-size="m"] .glass .glass-text, .spg-single [data-size="s"] .glass .glass-text,
.spg-single [data-size="xl"] .glass .glass-text { justify-content: safe center; }
.spg-single .glass .pzt-name, .spg-single .glass .lb-title, .spg-single .glass .lp-title,
.spg-single .glass .pzt-op-name {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: break-word; hyphens: auto;
}
.spg-single [data-size="l"] .pzt-name, .spg-single [data-size="l"] .lb-title, .spg-single [data-size="l"] .lp-title { -webkit-line-clamp: 2; }
.spg-single .glass .lb-sub, .spg-single .glass .lp-sub {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.spg-single [data-size="s"] .lb-sub, .spg-single [data-size="s"] .lp-sub { display: none; }
.spg-single [data-size="xl"] .pzt-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.spg-single .glass .pzt-count, .spg-single .glass .lp-count { white-space: nowrap; }
/* kichik plitkalarda ikonka kattaroq */
.spg-single [data-size="s"] .pzt-ic, .spg-single [data-size="s"] .lb-ic, .spg-single [data-size="s"] .lp-ic { width: 2.2em; height: 2.2em; }
.spg-single [data-size="m"] .pzt-ic, .spg-single [data-size="m"] .lb-ic, .spg-single [data-size="m"] .lp-ic { width: 2.8em; height: 2.8em; }

/* O'yin sahifasi: o'ng panel taxta balandligidan oshmaydi — yurishlar ro'yxatining o'zi skroll bo'ladi */
.gp-panel { contain: size; }
.gp-body { overflow: hidden; }
.gp-moves { min-height: 0; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.gp-moves::-webkit-scrollbar { width: 8px; }
.gp-moves::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; }
.gp-body > .chat-box, .gp-body > .info-box { overflow: auto; min-height: 0; }
@media (max-width: 900px) {
  .gp-panel { contain: none; }
  .gp-body { overflow: visible; }
}

/* ================= Kompyuter bilan o'ynash (botlar sahifasi) ================= */
.bp-page { max-width: 1120px; margin: 0 auto; }
.bp-head p { margin: -4px 0 18px; }

/* Hasan Master — asosiy karta */
.bp-hero {
  position: relative; display: grid; grid-template-columns: minmax(220px, 330px) 1fr; gap: 34px; align-items: center;
  padding: 26px; border-radius: 22px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(circle at 85% 15%, rgba(245, 183, 0, .22), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(124, 92, 210, .30), transparent 50%),
    linear-gradient(135deg, #2a2522, #1d1a18 60%, #272016);
  border: 1px solid rgba(245, 190, 60, .45);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.bp-hero::before {
  content: ""; position: absolute; inset: -40%; z-index: -1; opacity: .35; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(245, 190, 60, .5) 80%, transparent 90%);
  animation: bp-spin 9s linear infinite;
}
@keyframes bp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bp-hero::before { animation: none; } }
.bp-hero-photo {
  position: relative; aspect-ratio: 5 / 7; border-radius: 18px; padding: 4px;
  background: linear-gradient(145deg, #ffe08a, #c8901a 45%, #fff1b8 70%, #a8740e);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5), 0 0 28px rgba(245, 183, 0, .25);
}
.bp-hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; border-radius: 14px; display: block; }
.bp-crown {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%) rotate(-8deg);
  width: 56px; height: 56px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5));
}
.bp-crown .ic, .bp-crown img { width: 100%; height: 100%; }
.bp-hero-body { display: grid; gap: 12px; justify-items: start; color: #fff; }
.bp-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: linear-gradient(90deg, #f5b700, #ffd766); color: #3a2a00; font-weight: 800; font-size: 13px;
  letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 4px 14px rgba(245, 183, 0, .35);
}
.bp-badge .ic, .bp-badge img { width: 18px; height: 18px; }
.bp-hero-name {
  margin: 0; font-size: clamp(34px, 4.4vw, 54px); line-height: 1.02; font-weight: 800; letter-spacing: -.01em;
  background: linear-gradient(90deg, #fff 30%, #ffd766); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bp-hero-rating { font-size: 15px; color: rgba(255, 255, 255, .75); }
.bp-hero-rating b { font-size: 22px; color: #ffd766; }
.bp-quote {
  margin: 4px 0 0; padding: 10px 16px; border-left: 3px solid #f5b700; border-radius: 0 10px 10px 0;
  background: rgba(255, 255, 255, .06); font-size: 19px; font-style: italic; color: #fff4d0;
}
.bp-listen {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255, 215, 102, .5); background: rgba(255, 215, 102, .08);
  color: #ffe7a3; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 13.5px; transition: .15s;
}
.bp-listen .ic { width: 16px; height: 16px; }
.bp-listen:hover { background: rgba(255, 215, 102, .18); }
.bp-listen.playing { box-shadow: 0 0 0 4px rgba(255, 215, 102, .25); animation: bp-pulse .6s ease-in-out infinite alternate; }
@keyframes bp-pulse { to { box-shadow: 0 0 0 9px rgba(255, 215, 102, .08); } }
.bp-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 6px; }

/* rang tanlash */
.bp-colors { display: inline-flex; gap: 6px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .08); }
.bp-color {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; padding: 6px 8px;
  border: 0; border-radius: 10px; background: none; color: rgba(255, 255, 255, .7); cursor: pointer; font-size: 11.5px; font-weight: 700; transition: .12s;
}
.bp-color img { width: 30px; height: 30px; }
.bp-rand { width: 30px; height: 30px; display: grid; place-items: center; font-size: 20px; font-weight: 900; border-radius: 50%;
  background: linear-gradient(90deg, #fff 50%, #262421 50%); color: #f5b700; text-shadow: 0 1px 2px #000; }
.bp-color:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.bp-color.on { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
html[data-theme="light"] .bp-sub-colors .bp-colors { background: var(--surface-2); border-color: var(--line); }
html[data-theme="light"] .bp-sub-colors .bp-color { color: var(--muted); }
html[data-theme="light"] .bp-sub-colors .bp-color.on { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }

.bp-play {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 30px; border: 0; border-radius: 14px; cursor: pointer;
  font-size: 18px; font-weight: 800; color: #3a2a00; transition: transform .12s, box-shadow .12s;
}
.bp-play.gold { background: linear-gradient(180deg, #ffe07a, #f5b700); box-shadow: 0 5px 0 #b07f00, 0 10px 24px rgba(245, 183, 0, .35); }
.bp-play:hover { transform: translateY(-1px); }
.bp-play:active { transform: translateY(3px); box-shadow: 0 2px 0 #b07f00; }
.bp-play .ic { width: 20px; height: 20px; }

/* qolgan botlar */
.bp-sub-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 30px 0 14px; }
.bp-sub-head h3 { margin: 0; font-size: 20px; }
.bp-sub-colors { display: inline-flex; align-items: center; gap: 10px; }
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.glass.bp-card { --tint: 110 124 160; min-height: 118px !important; }
.glass.bp-card.lv1 { --tint: 98 170 60; }
.glass.bp-card.lv2 { --tint: 54 146 231; }
.glass.bp-card.lv3 { --tint: 124 96 196; }
.glass.bp-card.lv4 { --tint: 220 120 40; }
.glass.bp-card.lv5 { --tint: 210 60 70; }
.glass.bp-card .glass-text { gap: 16px; padding: 16px 18px; }
.bp-ava {
  flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(var(--tint) / .35); box-shadow: 0 0 0 3px rgb(var(--tint) / .6);
}
.glass.bp-card .bp-ava { background: rgba(255, 255, 255, .12); box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.bp-ava .ic, .bp-ava img { width: 40px; height: 40px; }
.bp-info { flex: 1; min-width: 0; display: grid; gap: 4px; }
.bp-name { font-size: 19px; font-weight: 800; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bp-lv { font-size: 11px; font-weight: 700; opacity: .7; text-transform: uppercase; letter-spacing: .05em; }
.bp-rating { font-size: 13px; opacity: .8; font-weight: 700; }
.bp-desc { font-size: 13px; opacity: .85; }
.bp-meter { display: inline-flex; gap: 3px; }
.bp-meter i { width: 16px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .18); }
.bp-meter i.on { background: linear-gradient(90deg, #7bd14f, #f5b700); }
.bp-hero .bp-meter i { width: 26px; height: 8px; }
.bp-hero .bp-meter i.on { background: linear-gradient(90deg, #ffd766, #f5b700); box-shadow: 0 0 8px rgba(245, 183, 0, .5); }
.bp-go { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); }
.bp-go .ic { width: 18px; height: 18px; }

/* o'yin paneli: rasmli avatar */
.gp-ava-photo { padding: 0; overflow: hidden; background: linear-gradient(145deg, #ffe08a, #c8901a); box-shadow: 0 0 0 2px #f5b700; }
.gp-ava-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; display: block; }

@media (max-width: 760px) {
  .bp-hero { grid-template-columns: 1fr; gap: 20px; padding: 18px; text-align: center; }
  .bp-hero-photo { width: min(62vw, 260px); justify-self: center; }
  .bp-hero-body { justify-items: center; }
  .bp-hero-actions { justify-content: center; }
  .bp-quote { font-size: 17px; }
  .bp-grid { grid-template-columns: 1fr; }
  .bp-sub-head { flex-direction: column; align-items: flex-start; }
}
.bp-color img { filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, .85)); }
.bp-crown { top: -20px; left: auto; right: -16px; transform: rotate(20deg); width: 52px; height: 52px; }
.gp-ava-photo img { object-position: 50% 50%; }

/* =====================================================================
   Premium, playlistlar, reyting, vazifalar (yangi bo'limlar)
   ===================================================================== */
.mt-lg { margin-top: 30px; }
.chip.gold { background: rgba(245, 183, 0, .16); color: #e0a800; border-color: rgba(245, 183, 0, .35); }
.chip.orange { background: rgba(230, 140, 40, .16); color: #e08a28; }
html[data-theme="light"] .chip.gold { color: #9a6d00; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; margin: 0; display: inline-block; }

/* ---------- Premium tugma va nishon ---------- */
.btn.premium-btn, a.premium-btn {
  background: linear-gradient(180deg, #ffe07a, #f5b700); color: #3a2a00 !important; border: 0; font-weight: 800;
  box-shadow: 0 4px 0 #b07f00, 0 8px 20px rgba(245, 183, 0, .28);
}
.btn.premium-btn:hover { filter: brightness(1.06); }
.btn.premium-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #b07f00; }
.btn.premium-btn .ic, .btn.premium-btn img { width: 18px; height: 18px; }
.prem-badge { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 5px; vertical-align: -2px; }
.prem-badge .ic, .prem-badge img { width: 16px; height: 16px; }
.side-item.premium-cta {
  background: linear-gradient(90deg, rgba(245, 183, 0, .22), rgba(245, 183, 0, .06)); color: #ffd766; font-weight: 800;
  border: 1px solid rgba(245, 183, 0, .35); margin-bottom: 6px;
}
.side-item.premium-cta:hover { background: linear-gradient(90deg, rgba(245, 183, 0, .32), rgba(245, 183, 0, .12)); }
html[data-theme="light"] .side-item.premium-cta { color: #8a6200; }

/* ---------- Paywall ---------- */
.modal.pw-modal { max-width: 420px; }
.modal.pw-modal .m-head h3:empty { display: none; }
.paywall { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 4px 6px 8px; }
.pw-crown { width: 76px; height: 76px; filter: drop-shadow(0 6px 16px rgba(245, 183, 0, .45)); animation: pw-float 2.4s ease-in-out infinite alternate; }
.pw-crown .ic, .pw-crown img { width: 100%; height: 100%; }
@keyframes pw-float { to { transform: translateY(-6px) rotate(-4deg); } }
.paywall h2 { margin: 4px 0 0; font-size: 22px; }
.paywall p { margin: 0; }
.pw-perks { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 8px; text-align: left; width: 100%; }
.pw-perks li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-weight: 600; font-size: 14px; }
.pw-perks .ic, .pw-perks img { width: 24px; height: 24px; }
.btn.block { display: flex; width: 100%; justify-content: center; }

/* ---------- Premium sahifasi ---------- */
.pr-page { max-width: 1060px; margin: 0 auto; display: grid; gap: 22px; }
.pr-hero {
  position: relative; overflow: hidden; text-align: center; padding: 40px 20px 34px; border-radius: 22px; color: #fff;
  background: radial-gradient(circle at 20% 10%, rgba(255, 215, 102, .35), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(124, 92, 210, .45), transparent 50%),
    linear-gradient(135deg, #2b2310, #1b1714 55%, #231a33);
  border: 1px solid rgba(245, 190, 60, .4);
}
.pr-hero-crown { width: 84px; height: 84px; margin: 0 auto 6px; filter: drop-shadow(0 8px 20px rgba(245, 183, 0, .5)); }
.pr-hero-crown .ic, .pr-hero-crown img { width: 100%; height: 100%; }
.pr-hero h1 { margin: 0; font-size: clamp(30px, 5vw, 48px); font-weight: 800; }
.pr-hero h1 span { background: linear-gradient(90deg, #ffe38a, #f5b700); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pr-hero p { margin: 8px auto 0; max-width: 560px; color: rgba(255, 255, 255, .8); font-size: 16px; }
.pr-active { display: inline-flex; margin-top: 14px; padding: 7px 14px; border-radius: 999px; background: rgba(123, 209, 79, .18); color: #9fe77a; font-weight: 700; }
.pr-off { margin-top: 14px; color: #ffb4a8; font-weight: 700; }
.pr-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.pr-plan {
  position: relative; display: grid; gap: 8px; align-content: start; justify-items: center; text-align: center; padding: 26px 18px 20px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: transform .15s, box-shadow .15s;
}
.pr-plan:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, .25); }
.pr-plan.popular { border-color: #5aa0e8; box-shadow: 0 0 0 2px rgba(90, 160, 232, .35); }
.pr-plan.best { border-color: #f5b700; box-shadow: 0 0 0 2px rgba(245, 183, 0, .35); }
.pr-tag { position: absolute; top: -12px; padding: 4px 12px; border-radius: 999px; background: #3692e7; color: #fff; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.pr-tag.gold { background: linear-gradient(90deg, #f5b700, #ffd766); color: #3a2a00; }
.pr-plan-name { font-size: 18px; font-weight: 800; }
.pr-price { font-size: 30px; font-weight: 900; letter-spacing: -.01em; }
.pr-per { color: var(--muted); font-size: 13.5px; }
.pr-save { color: #7bd14f; font-weight: 800; font-size: 13.5px; min-height: 18px; }
.pr-plan .btn { margin-top: 6px; }
.pr-compare h2 { margin: 0 0 12px; font-size: 20px; }
.pr-compare .tbl th, .pr-compare .tbl td { text-align: center; padding: 11px 10px; }
.pr-compare .tbl td:first-child, .pr-compare .tbl th:first-child { text-align: left; font-weight: 600; }
.pr-compare .gold { color: #e0a800; font-weight: 800; }
.pr-yes { display: inline-grid; width: 22px; height: 22px; }
.pr-yes .ic, .pr-yes img { width: 22px; height: 22px; }
.pr-info h3 { margin: 0 0 10px; }
.pr-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); }
.pr-hist { display: grid; gap: 6px; }
.pr-hist-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pr-hist-row:last-child { border-bottom: 0; }
@media (max-width: 800px) { .pr-plans { grid-template-columns: 1fr; } }

/* ---------- To'lov oynasi ---------- */
.modal.co-modal { max-width: 440px; }
.co { display: grid; gap: 12px; }
.co-plan { font-weight: 800; font-size: 16px; }
.co-step { margin: 0; color: var(--muted); font-size: 14px; }
.co-card {
  position: relative; padding: 18px 18px 16px; border-radius: 16px; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, #1f4e8c, #2f6fc0 55%, #15325c);
  box-shadow: 0 12px 26px rgba(20, 60, 120, .35);
}
.co-card::after { content: ""; position: absolute; width: 180px; height: 180px; right: -60px; top: -80px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.co-card-chip { width: 38px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #f7dc85, #c9a13b); margin-bottom: 12px; }
.co-card-lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.co-card-no { font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 22px; font-weight: 700; letter-spacing: .06em; margin-top: 2px; }
.co-copy {
  position: absolute; right: 12px; bottom: 12px; z-index: 1; border: 0; border-radius: 8px; padding: 6px 12px; cursor: pointer;
  background: rgba(255, 255, 255, .18); color: #fff; font-weight: 700; font-size: 12.5px;
}
.co-copy.done { background: #4caf50; }
.co-amount { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px dashed rgba(245, 183, 0, .55); }
.co-amount .co-copy { position: static; background: var(--surface-3); color: var(--text); }
.co-amount .co-copy.done { background: #4caf50; color: #fff; }
.co-sum { font-size: 26px; font-weight: 900; color: #f5b700; }
.co-warn { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: rgba(245, 183, 0, .1); color: var(--text); font-size: 13px; }
.co-warn .ic, .co-warn img { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.co-wait { display: grid; gap: 8px; }
.co-wait .row { gap: 8px; font-size: 14px; font-weight: 600; }
.co-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.co-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f5b700, #7bd14f); transition: width .5s linear; }
.co-timer { font-variant-numeric: tabular-nums; font-size: 18px; }
.co-test { font-size: 12.5px; color: #9fcff5; background: rgba(54, 146, 231, .12); padding: 8px 10px; border-radius: 8px; }
.co-done, .co-fail { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 10px 0; }
.co-done-ic { width: 90px; height: 90px; animation: pw-float 1.6s ease-in-out infinite alternate; filter: drop-shadow(0 8px 20px rgba(245, 183, 0, .5)); }
.co-done-ic .ic, .co-done-ic img, .co-fail-ic .ic, .co-fail-ic img { width: 100%; height: 100%; }
.co-fail-ic { width: 60px; height: 60px; opacity: .8; }
.co-done h2 { margin: 0; color: #f5b700; }

/* ---------- Admin: obuna ---------- */
.bl-url { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; margin-top: 8px; }
.bl-url span { grid-column: 1 / -1; }
.bl-url code { padding: 7px 10px; border-radius: 8px; background: var(--surface-2); font-size: 12.5px; overflow-x: auto; white-space: nowrap; }
.bl-admin .field { position: relative; }
.bl-admin .field > .btn.sm.ghost { position: absolute; right: 6px; bottom: 6px; }

/* ---------- Playlistlar ---------- */
.pl-section { margin-bottom: 8px; }
.pl-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pl-section-head h2 { margin: 0; font-size: 22px; }
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.pl-card { display: block; color: inherit; border-radius: 14px; transition: transform .15s; }
.pl-card:hover { transform: translateY(-3px); }
.pl-cover {
  position: relative; aspect-ratio: 16 / 9; border-radius: 12px; background: var(--surface-3) center / cover; display: grid; place-items: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .28); margin-top: 10px;
}
/* ustma-ust videolar effekti (YouTube playlist kabi) */
.pl-cover::before, .pl-cover::after { content: ""; position: absolute; left: 8%; right: 8%; height: 8px; border-radius: 8px 8px 0 0; background: var(--surface-3); opacity: .7; }
.pl-cover::before { top: -6px; }
.pl-cover::after { top: -11px; left: 15%; right: 15%; opacity: .4; }
.pl-cover-ic { opacity: .5; }
.pl-count {
  position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 6px;
  background: rgba(0, 0, 0, .78); color: #fff; font-size: 12px; font-weight: 800;
}
.pl-count .ic { width: 12px; height: 12px; }
.pl-premium {
  position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 6px;
  background: linear-gradient(90deg, #f5b700, #ffd766); color: #3a2a00; font-size: 11.5px; font-weight: 900;
}
.pl-premium .ic, .pl-premium img { width: 14px; height: 14px; }
.pl-draft { position: absolute; right: 8px; top: 8px; padding: 3px 8px; border-radius: 6px; background: #c0392b; color: #fff; font-size: 11px; font-weight: 800; }
.pl-prog { position: absolute; left: 0; bottom: 0; height: 4px; border-radius: 0 0 0 12px; background: #e53935; }
.pl-meta { padding: 10px 2px 0; }
.pl-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15.5px; line-height: 1.3; }
.pl-sub { display: flex; gap: 5px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.pl-done { color: #7bd14f; font-weight: 700; }
.pl-card.locked .pl-cover { filter: saturate(.7); }
.pl-thumb-sm { width: 72px; height: 40px; border-radius: 6px; background: var(--surface-3) center / cover; }
.pl-thumb-sm.lg { width: 110px; height: 62px; }
.video-card.locked .thumb { filter: saturate(.6) brightness(.85); }

/* pleyer sahifasi */
.view:has(> .pl-page) { max-width: 1560px; }
.pl-page { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 22px; align-items: start; }
.pl-player { position: relative; }
.pl-player > div, .pl-player iframe { width: 100%; height: 100%; }
.pl-now-title { margin: 14px 0 6px; font-size: 20px; line-height: 1.3; }
.pl-now-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pl-now-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-auto { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.pl-now-actions { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.pl-now-actions .btn .ic { width: 16px; height: 16px; }
.pl-now-desc { white-space: pre-wrap; font-size: 14px; line-height: 1.55; }
.pl-side { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 40px); position: sticky; top: 16px; }
.pl-side-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; background: var(--surface-2); }
.pl-side-title { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.pl-crown { width: 20px; height: 20px; flex: none; }
.pl-crown .ic, .pl-crown img { width: 100%; height: 100%; }
.pl-side-prog { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.pl-list { overflow: auto; padding: 6px; display: grid; gap: 2px; align-content: start; }
.pl-item {
  display: grid; grid-template-columns: 26px 120px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left;
  border: 0; background: none; color: inherit; padding: 6px; border-radius: 10px; cursor: pointer; width: 100%;
}
.pl-item:hover { background: var(--surface-2); }
.pl-item.cur { background: rgba(54, 146, 231, .16); }
.pl-item-n { font-size: 12.5px; color: var(--muted); font-weight: 800; text-align: center; display: grid; place-items: center; }
.pl-item-n .ic { width: 14px; height: 14px; color: #3692e7; }
.pl-item-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 7px; background: var(--surface-3) center / cover; display: grid; place-items: center; overflow: hidden; }
.pl-item-thumb i { position: absolute; left: 0; bottom: 0; height: 3px; background: #e53935; }
.pl-item-thumb em { position: absolute; right: 4px; bottom: 4px; font-style: normal; font-size: 10.5px; font-weight: 800; background: rgba(0, 0, 0, .8); color: #fff; padding: 1px 4px; border-radius: 3px; }
.pl-lock { width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .65); display: grid; place-items: center; color: #ffd766; }
.pl-lock .ic { width: 16px; height: 16px; }
.pl-item-tx { min-width: 0; display: grid; gap: 3px; }
.pl-item-title { font-size: 13.5px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-item-sub { font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.pl-item.locked .pl-item-thumb { filter: brightness(.7); }
.pl-check { width: 18px; height: 18px; }
.pl-check .ic, .pl-check img { width: 18px; height: 18px; }
.pl-locked { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; padding: 20px; color: #fff;
  background: radial-gradient(circle at 50% 40%, rgba(245, 183, 0, .18), transparent 60%), #111; }
.pl-locked-ic { width: 64px; height: 64px; }
.pl-locked-ic .ic, .pl-locked-ic img { width: 100%; height: 100%; }
.pl-locked b { font-size: 20px; }
.pl-locked p { margin: 0; color: rgba(255, 255, 255, .7); max-width: 380px; }
/* muharrir */
.pl-add .card { display: grid; align-content: start; gap: 6px; }
.pl-edit-list { display: grid; gap: 6px; }
.pl-edit-row { display: grid; grid-template-columns: 28px 110px minmax(0, 1fr) auto auto auto auto; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; background: var(--surface-2); }
.pl-edit-tx { display: grid; gap: 3px; min-width: 0; }
.input.sm { padding: 6px 9px; font-size: 13.5px; }
.pl-free { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: #7bd14f; white-space: nowrap; cursor: pointer; }
@media (max-width: 1000px) {
  .pl-page { grid-template-columns: 1fr; }
  .pl-side { position: static; max-height: 520px; }
}
@media (max-width: 600px) {
  .pl-now-actions > * { flex: 1 1 0; }
  .pl-now-actions > .pl-act-main { flex-basis: 100%; order: -1; }
  .pl-item { grid-template-columns: 22px 96px minmax(0, 1fr) auto; }
  .pl-edit-row { grid-template-columns: 22px 80px minmax(0, 1fr) auto auto; }
  .pl-edit-row .pl-free { grid-column: 3; }
}

/* ---------- Reyting ---------- */
.rk-page { max-width: 920px; margin: 0 auto; }
.rk-head p { margin: -6px 0 14px; }
.rk-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.rk-tab { border: 1px solid var(--line); background: var(--surface); color: var(--muted); padding: 8px 14px; border-radius: 999px; font-weight: 700; cursor: pointer; font-size: 13.5px; }
.rk-tab .ic, .rk-tab img { width: 18px; height: 18px; }
.rk-tab:hover { color: var(--text); }
.rk-tab.on { background: var(--green); border-color: var(--green); color: #fff; }
.rk-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; margin: 10px 0 18px; }
.rk-pod { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; padding: 18px 10px 0; border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, var(--surface), transparent); }
.rk-pod .avatar.lg { width: 70px; height: 70px; font-size: 24px; }
.rk-pod-ava { position: relative; border-radius: 50%; padding: 4px; }
.rk-pod.p1 .rk-pod-ava { background: linear-gradient(135deg, #ffe07a, #d99a00); box-shadow: 0 0 24px rgba(245, 183, 0, .45); }
.rk-pod.p2 .rk-pod-ava { background: linear-gradient(135deg, #f1f3f5, #9aa5b1); }
.rk-pod.p3 .rk-pod-ava { background: linear-gradient(135deg, #f0b27a, #a0522d); }
.rk-pod.p1 .avatar.lg { width: 88px; height: 88px; }
.rk-pod-n { position: absolute; bottom: -4px; right: -2px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 13px; background: var(--surface); border: 2px solid var(--line); }
.rk-pod-crown { width: 40px; height: 40px; margin-bottom: -6px; filter: drop-shadow(0 4px 8px rgba(245, 183, 0, .45)); }
.rk-pod-crown .ic, .rk-pod-crown img { width: 100%; height: 100%; }
.rk-pod .rk-name { font-weight: 800; margin-top: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-pod-base { width: 100%; margin-top: 8px; border-radius: 12px 12px 0 0; display: grid; place-items: center; font-size: 30px; font-weight: 900; color: rgba(255, 255, 255, .85); }
.rk-pod.p1 .rk-pod-base { height: 90px; background: linear-gradient(180deg, #f5b700, #a87600); }
.rk-pod.p2 .rk-pod-base { height: 66px; background: linear-gradient(180deg, #b8c2cc, #6b7785); }
.rk-pod.p3 .rk-pod-base { height: 48px; background: linear-gradient(180deg, #d98b4f, #8a4a22); }
.rk-name { color: inherit; font-weight: 700; }
.rk-lvl { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: rgba(54, 146, 231, .16); color: #6fb2f2; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.rk-val { display: inline-flex; align-items: baseline; gap: 2px; font-variant-numeric: tabular-nums; }
.rk-val b { font-size: 16px; }
.rk-val.up b { color: #7bd14f; }
.rk-val .ic, .rk-val img { width: 16px; height: 16px; align-self: center; margin-right: 3px; }
.rk-list { padding: 4px 6px; }
.rk-row, .rk-me { display: grid; grid-template-columns: 40px auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.rk-row:last-child { border-bottom: 0; }
.rk-row.me { background: rgba(123, 209, 79, .1); border-radius: 10px; }
.rk-rank { font-weight: 900; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.rk-who { min-width: 0; display: grid; gap: 3px; }
.rk-who .rk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-sub { display: flex; gap: 8px; align-items: center; }
.rk-me { position: sticky; bottom: 10px; margin-top: 12px; border: 1px solid var(--green); border-radius: 14px; background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.rk-me .rk-rank { color: var(--green-2); }
@media (max-width: 600px) {
  .rk-pod .avatar.lg { width: 54px; height: 54px; }
  .rk-pod.p1 .avatar.lg { width: 66px; height: 66px; }
  .rk-pod .rk-val b { font-size: 13px; }
  .rk-pod .rk-name { font-size: 13px; }
}

/* ---------- Vazifalar ---------- */
.as-page { max-width: 1120px; margin: 0 auto; }
.as-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.as-head p { margin: -6px 0 14px; }
.as-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.as-stat { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.as-stat b { display: block; font-size: 24px; line-height: 1; }
.as-stat span { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.as-stat-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.as-stat-ic .ic, .as-stat-ic img { width: 26px; height: 26px; }
.as-stat.c1 .as-stat-ic { background: rgba(54, 146, 231, .16); }
.as-stat.c2 .as-stat-ic { background: rgba(230, 120, 40, .16); }
.as-stat.c3 .as-stat-ic { background: rgba(123, 209, 79, .16); }
.as-stat.c4 .as-stat-ic { background: rgba(224, 87, 74, .16); }
.as-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.as-filter { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); padding: 7px 14px; border-radius: 999px; font-weight: 700; cursor: pointer; }
.as-filter span { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--surface-3); font-size: 12px; }
.as-filter.on { background: var(--text); color: var(--bg, #1f1e1b); border-color: var(--text); }
.as-filter.on span { background: rgba(0, 0, 0, .15); }
.as-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.as-card {
  --kc: 54 146 231;
  position: relative; display: grid; gap: 12px; padding: 16px 16px 14px 20px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(135deg, rgb(var(--kc) / .10), transparent 55%), var(--surface);
  border: 1px solid var(--line); transition: transform .15s, box-shadow .15s, border-color .15s; overflow: hidden;
}
.as-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: rgb(var(--kc)); }
.as-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, .22); border-color: rgb(var(--kc) / .6); }
.k-puzzles { --kc: 98 170 60; }
.k-lesson { --kc: 54 146 231; }
.k-video { --kc: 224 87 74; }
.k-playlist { --kc: 160 100 220; }
.k-custom { --kc: 230 140 40; }
.as-card.st-done { opacity: .85; }
.as-card.st-overdue::before { background: repeating-linear-gradient(180deg, #e0574a 0 8px, transparent 8px 12px); }
.as-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.as-kind { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgb(var(--kc) / .18); flex: none; }
.as-kind .ic, .as-kind img { width: 28px; height: 28px; }
.as-kind-lbl { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: rgb(var(--kc)); }
.as-title { margin: 2px 0 0; font-size: 17px; line-height: 1.3; }
.as-desc { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.as-ring { position: relative; width: 64px; height: 64px; flex: none; }
.as-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.as-ring circle { fill: none; stroke-width: 6; }
.as-ring .bg { stroke: var(--surface-3); }
.as-ring .fg { stroke: rgb(var(--kc, 54 146 231)); stroke-linecap: round; transition: stroke-dashoffset .6s; }
.as-ring.full .fg { stroke: #7bd14f; }
.as-ring > span { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; line-height: 1.05; text-align: center; }
.as-ring b { font-size: 14px; }
.as-ring small { font-size: 10px; color: var(--muted); font-weight: 700; }
.as-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.as-foot .btn .ic { width: 15px; height: 15px; }
.as-comment { font-size: 13px; color: var(--info, #6fb2f2); padding: 8px 10px; border-radius: 10px; background: rgba(54, 146, 231, .08); }
.as-detail-head { align-items: center; gap: 12px; }
.as-hero { display: grid; gap: 10px; }
.as-hero-ring { display: grid; place-items: center; padding: 6px 0; }
.as-hero-ring .as-ring { width: 120px; height: 120px; }
.as-hero-ring .as-ring b { font-size: 24px; }
.as-hero-ring .as-ring small { font-size: 12px; }
@media (max-width: 800px) {
  .as-grid { grid-template-columns: 1fr; }
  .as-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Botlar: premium qulf ---------- */
.glass.bp-card.locked .bp-ava { filter: grayscale(.6); }
.bp-lock-badge {
  position: absolute; top: 18px; right: 18px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px;
  background: linear-gradient(90deg, #f5b700, #ffd766); color: #3a2a00; font-weight: 900; font-size: 12.5px;
}
.bp-lock-badge .ic, .bp-lock-badge img { width: 16px; height: 16px; }

/* ================= Pullik bo'limlar (Premium) ================= */
/* Menyudagi toj: bo'lim obunasiz foydalanuvchi uchun yopiq */
.side-item .si-lock { margin-left: auto; display: flex; flex: none; }
.side-item .si-lock .ic { width: 18px; height: 18px; }
html[dir="rtl"] .side-item .si-lock { margin-left: 0; margin-right: auto; }
@media (max-width: 1100px) and (min-width: 861px) {
  .side .side-item { position: relative; }
  .side .side-item .si-lock { position: absolute; top: 5px; right: 8px; }
  .side .side-item .si-lock .ic { width: 14px; height: 14px; }
}

/* Yopiq bo'lim sahifasi */
.gate { display: grid; place-items: center; min-height: calc(100vh - 150px); padding: 8px 0 24px; }
.gate-card {
  position: relative; width: min(100%, 520px); display: grid; justify-items: center; gap: 12px; text-align: center;
  padding: 36px 22px 22px; border-radius: 22px; border: 1px solid rgba(240, 194, 75, .35); overflow: hidden;
  background: radial-gradient(420px 220px at 50% -12%, rgba(240, 194, 75, .2), transparent 70%), var(--surface);
  box-shadow: var(--shadow-l);
}
html[data-theme="light"] .gate-card { background: radial-gradient(420px 220px at 50% -12%, rgba(240, 194, 75, .22), transparent 70%), #fff; }
.gate-ic {
  position: relative; width: 108px; height: 108px; border-radius: 30px; display: grid; place-items: center;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
}
.gate-sec { display: flex; }
.gate-sec .ic { width: 68px; height: 68px; }
.gate-crown {
  position: absolute; right: -14px; top: -16px; width: 46px; height: 46px; display: flex;
  filter: drop-shadow(0 6px 10px rgba(240, 194, 75, .45)); animation: pw-float 2.4s ease-in-out infinite alternate;
}
.gate-crown .ic { width: 100%; height: 100%; }
.gate-tag { display: inline-flex; padding: 4px 12px; border-radius: 999px; background: rgba(240, 194, 75, .16); color: #e0a800; font-weight: 800; font-size: 13px; }
.gate-tag .ic { width: 16px; height: 16px; }
.gate-card h1 { margin: 0; font-size: clamp(21px, 5.6vw, 28px); line-height: 1.2; letter-spacing: -.01em; }
.gate-card > p { margin: 0; color: var(--muted); max-width: 420px; font-size: 15px; }
.gate-perks { max-width: 400px; }
.gate-also { width: 100%; display: grid; gap: 8px; margin-top: 2px; }
.gate-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.gate-btns { width: 100%; max-width: 380px; display: grid; gap: 8px; margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .gate-crown { animation: none; } }

/* Kurs / sozlama ogohlantirish qatori */
.lk-banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid rgba(240, 194, 75, .38); background: rgba(240, 194, 75, .09);
}
.lk-banner.warn { border-color: rgba(232, 184, 75, .45); background: rgba(232, 184, 75, .08); }
.lk-banner > div { flex: 1; min-width: 0; }
.lk-banner-ic { display: flex; flex: none; }
.lk-banner-ic .ic { width: 30px; height: 30px; }
@media (max-width: 600px) { .lk-banner { flex-wrap: wrap; } .lk-banner > .btn { width: 100%; } }

/* Practice va Shaxmat asoslari: pullik kartalar */
.glass.lp-card.locked, .glass.lb-card.locked { --tint: 196 146 18; }
.lp-count.lp-lock { color: #ffd766; display: inline-flex; }
html[data-theme="light"] .lp-count.lp-lock { color: #9a6c00; }
.lp-lock .ic, .lp-lock img { width: 16px; height: 16px; }
.lb-card.locked .lb-ribbon { background: linear-gradient(90deg, #ffd766, #e9b200); color: #3a2a00; }
.lb-lock { display: none; position: absolute; top: 8px; left: 8px; z-index: 2; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35)); }
.lb-lock .ic, .lb-lock img { width: 24px; height: 24px; }
.spg-single [data-size="m"] .lb-lock, .spg-single [data-size="s"] .lb-lock { display: flex; }
.lb-ribbon .lbl { justify-content: center; gap: 4px; }
.lb-ribbon .ic, .lb-ribbon img { width: 14px; height: 14px; }
.pr-no { display: inline-flex; opacity: .55; }
.pr-no .ic { width: 18px; height: 18px; }

/* Obuna sozlamalaridan "Pullik bo'limlar"ga havola */
.bl-access-link {
  display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px dashed rgba(240, 194, 75, .55);
}
.bl-access-link:hover { background: var(--surface-3); }
.bl-access-link > span:not(.ic-wrap) { flex: 1; display: grid; min-width: 0; }
.bl-access-link small { color: var(--muted); font-size: 12.5px; }
.bl-access-link .ic { width: 26px; height: 26px; }

/* Dars sahifasi — kurs playlisti */
a.pl-item { text-decoration: none; }
.pl-group { padding: 10px 8px 4px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pl-item-thumb.noimg { background: var(--surface-2); }
.pl-item-thumb.noimg > span { display: flex; }
.pl-item-thumb.noimg .ic { width: 28px; height: 28px; }
.lesson-content { line-height: 1.65; overflow-wrap: anywhere; }
.lesson-content img, .lesson-content video, .lesson-content iframe { max-width: 100%; height: auto; }
.pl-main > .card.lesson-content { margin-top: 4px; }

/* Admin → Pullik bo'limlar */
.ac-page { display: grid; gap: 16px; }
.ac-intro {
  display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line);
  background: radial-gradient(520px 200px at 0% 0%, rgba(240, 194, 75, .14), transparent 70%), var(--surface);
}
.ac-intro h2 { margin: 0 0 2px; font-size: 20px; }
.ac-intro p { margin: 0; font-size: 14px; }
.ac-intro-ic { display: flex; flex: none; }
.ac-intro-ic .ic { width: 44px; height: 44px; }
.ac-card { display: grid; gap: 12px; }
.ac-head { display: flex; align-items: center; gap: 12px; }
.ac-head-ic { display: flex; flex: none; }
.ac-head-ic .ic { width: 34px; height: 34px; }
.ac-head-tx { flex: 1; min-width: 0; }
.ac-head h3 { margin: 0; }
.ac-count { font-variant-numeric: tabular-nums; flex: none; }
.ac-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ac-search { flex: 1 1 180px; max-width: 300px; margin-left: auto; min-height: 36px; }
.ac-covered {
  display: flex; gap: 8px; align-items: center; padding: 9px 12px; border-radius: 10px;
  background: rgba(240, 194, 75, .1); color: #e0a800; font-size: 13px; font-weight: 700;
}
.ac-covered .ic { width: 18px; height: 18px; flex: none; }
.ac-groups { display: grid; gap: 14px; }
.ac-group-head { display: flex; align-items: center; gap: 10px; padding: 0 2px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.ac-group-toggle {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0;
  border: 0; background: none; color: var(--text); cursor: pointer; text-align: left; font-size: 14.5px;
}
.ac-group-toggle b { flex: 1; min-width: 0; }
.ac-chev { display: flex; transform: rotate(90deg); transition: transform .15s; color: var(--muted); }
.ac-group.closed .ac-chev { transform: none; }
html[dir="rtl"] .ac-group.closed .ac-chev { transform: scaleX(-1); }
.ac-group.closed .ac-grid { display: none; }
.ac-group.closed .ac-group-head { margin-bottom: 0; }
.ac-groups.searching .ac-group.closed .ac-grid { display: grid; }
.ac-group-head input, .ac-item input { width: 18px; height: 18px; flex: none; accent-color: #e0a800; cursor: pointer; }
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.ac-grid.compact { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.ac-item {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer;
  transition: border-color .12s, background .12s; -webkit-tap-highlight-color: transparent;
}
.ac-item:hover { border-color: var(--surface-3); }
.ac-item.on { border-color: rgba(240, 194, 75, .6); background: rgba(240, 194, 75, .1); }
.ac-item.hot { border-style: dashed; grid-column: span 2; }
.ac-ic { display: flex; flex: none; width: 28px; height: 28px; align-items: center; justify-content: center; }
.ac-ic .ic, .ac-ic img { width: 26px; height: 26px; }
.ac-tx { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.ac-tx b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-tx small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-hot { font-size: 11px; flex: none; }
.ac-crown { display: none; flex: none; }
.ac-crown .ic { width: 18px; height: 18px; }
.ac-item.on .ac-crown { display: flex; }
.ac-save {
  position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 10px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: var(--shadow-l);
}
html[data-theme="light"] .ac-save { background: #fff; }
.ac-save > .ic-wrap .ic { width: 24px; height: 24px; }
.ac-save-tx { font-weight: 700; font-size: 14px; color: var(--muted); min-width: 0; }
.ac-save.dirty { border-color: rgba(240, 194, 75, .65); }
.ac-save.dirty .ac-save-tx { color: #e0a800; }
@media (max-width: 860px) {
  .ac-save { bottom: calc(72px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .ac-save .spacer { display: none; }
  .ac-save-tx { flex: 1 1 60%; }
  .ac-save .btn { flex: 1; }
  .ac-save:not(.dirty) .btn { display: none; }
  .ac-grid, .ac-grid.compact { grid-template-columns: 1fr; }
  .ac-item.hot { grid-column: auto; }
  .ac-search { max-width: none; margin-left: 0; }
  .ac-intro { padding: 14px; }
}

/* ================= Sozlamalar: taxta va donalar ================= */
.set-board { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
/* "Tayyor to'plam" bo'sh joyi .empty (bo'sh holat) paddingini olmasin */
.pr-save.empty { padding: 0; }

/* ================= Telefon: o'lchamlarni ixchamlashtirish ================= */
@media (max-width: 860px) {
  /* Sozlamalar */
  .settings-layout { border-radius: 12px; grid-template-columns: minmax(0, 1fr); }
  .settings-nav, .settings-body { min-width: 0; }
  .settings-nav { padding: 8px; gap: 4px; scrollbar-width: none; }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav .s-item { padding: 7px 10px; font-size: 13.5px; gap: 7px; flex: none; }
  .settings-nav .s-item .ic, .settings-nav .s-item .ic-img { width: 18px; height: 18px; }
  .settings-nav .s-item.active { box-shadow: inset 0 -2px 0 var(--green); }
  .settings-body { padding: 14px 12px 16px; }
  .settings-body h2 { font-size: 19px; }
  .settings-body > div > p.muted { font-size: 13.5px; margin-bottom: 10px; }
  .settings-body .tabs { margin-bottom: 12px; }
  .set-board { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .set-board > * { min-width: 0; }
  .set-board .preview-board { order: -1; max-width: 220px; justify-self: center; }
  .set-board .theme-grid { max-height: none; overflow: visible; padding-right: 0; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
  .toggle-row { padding: 11px 0; gap: 11px; }
  .toggle-row .t-text b { font-size: 14.5px; }
  .toggle-row .t-text span { font-size: 12.5px; }

  /* Statistika kartochkalari: bittadan emas, ikkitadan */
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid.g3.keep3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { padding: 10px 12px; }
  .stat .v { font-size: 20px; }
  .stat .ic, .stat .ic-img { width: 20px; height: 20px; }
  .card { padding: 14px 12px; }
  .card-head h3 { font-size: 16px; }

  /* Jadvallar sahifani yon tomonga cho'zmasin — o'z konteyneri ichida suriladi */
  #view :has(> table.tbl), .modal :has(> table.tbl) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.tbl th { white-space: nowrap; }

  /* Bir ustunli sahifa gridlari ichidagi keng element (taxtalar karuseli, tablar) ustunni cho'zmasin */
  .home-grid, .pf-grid { grid-template-columns: minmax(0, 1fr); }
  .home-main, .home-side, .pf-main, .pf-side, .pf-side > * { min-width: 0; }

  /* Sahifa sarlavhasi yonidagi tugmalar sig'masa — keyingi qatorga */
  .view .row.mb { flex-wrap: wrap; row-gap: 8px; }

  /* Botlar sahifasi: Hasan Master rasmi ekranni egallamasin */
  .bp-page { overflow-x: clip; }
  .bp-hero { padding: 16px 14px; gap: 12px; border-radius: 18px; }
  .bp-hero-photo { width: min(40vw, 160px); border-radius: 14px; padding: 3px; }
  .bp-hero-photo img { border-radius: 11px; }
  .bp-crown { width: 38px; height: 38px; top: -14px; right: -12px; }
  .bp-hero-name { font-size: 30px; }
  .bp-hero-rating b { font-size: 19px; }
  .bp-quote { font-size: 15px; padding: 8px 12px; }
  .glass.bp-card { min-height: 96px !important; }
  .glass.bp-card .glass-text { padding: 12px 14px; gap: 12px; }

  /* Premium tariflari */
  .pr-plan { padding: 20px 14px 14px; gap: 6px; }
  .pr-price { font-size: 26px; }
  .pr-save.empty { display: none; }
}
@media (max-width: 600px) {
  /* "Darslar" kartalari: siqilgan ikki ustun o'rniga bitta */
  .learn-grid { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 360px) {
  .ld-tab { font-size: 14px; padding: 0 6px; line-height: 1.15; }
  .stat { padding: 9px 10px; }
  .stat .v { font-size: 18px; }
}

/* ================= Practice: lichess.org/practice mashqlari ================= */
.lr-text {
  padding: 10px 14px; font-size: 14px; line-height: 1.55; white-space: pre-line;
  background: var(--surface-2); border-bottom: 1px solid var(--line); max-height: 40vh; overflow: auto;
}
.lr-sep {
  padding: 10px 12px 4px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); border-top: 1px solid var(--line); margin-top: 4px;
}
.lr-src { display: inline-block; margin-top: 2px; font-size: 11.5px; font-weight: 700; opacity: .75; text-decoration: underline; }
.lr-src:hover { opacity: 1; }
/* study dagi strelka va doiralar (lichess ranglari) */
.board > svg.arrows .arrow.green { fill: #15781b; }
.board > svg.arrows .arrow.yellow { fill: #e68f00; }
.hl.c-green { box-shadow: inset 0 0 0 4px rgba(21, 120, 27, .85); }
.hl.c-red { box-shadow: inset 0 0 0 4px rgba(136, 32, 32, .85); }
.hl.c-yellow { box-shadow: inset 0 0 0 4px rgba(230, 143, 0, .9); }
.hl.c-blue { box-shadow: inset 0 0 0 4px rgba(0, 48, 136, .85); }
/* Bir ustunda (planshet/telefon): taxta → maqsad, izoh va tugmalar → mashqlar ro'yxati → tahlil */
@media (max-width: 1000px) {
  .lr-panel { order: 0; }
  .lr-side { order: 1; }
  .lr-panel > .lr-box { order: -1; border-top: 0; }
}
@media (max-width: 860px) {
  .lr-text { max-height: none; font-size: 14.5px; }
}

/* ================= Debyutlar kitobi (video kabi o'ynatgich) ================= */
.view:has(> .ob-page) { max-width: 1640px; }
.ob-top { display: flex; align-items: flex-end; gap: 10px 18px; flex-wrap: wrap; margin-bottom: 14px; }
.ob-top h1.page { margin: 0; }
.ob-tabs { margin: 0; border-bottom: 0; }
.ob-tabs .tab { display: inline-flex; align-items: center; }
.ob-layout { grid-template-columns: minmax(0, 1fr) 440px; }
.ob-main { min-width: 0; }
.ob-main .board-wrap { max-width: min(calc(100vh - 300px), 820px); }
.ob-head { max-width: min(calc(100vh - 300px), 820px); margin: 0 auto 10px; min-height: 50px; }
.ob-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; color: var(--muted); font-weight: 600; }
.ob-crumbs i { font-style: normal; opacity: .6; }
.ob-title { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-family: var(--display); font-size: 19px; font-weight: 700; line-height: 1.25; }
.ob-title .an-eco { flex: none; font-family: var(--sans); }
.ob-controls, .ob-opts { max-width: min(calc(100vh - 300px), 820px); margin: 10px auto 0; }
.ob-controls { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 10px 12px; box-shadow: var(--shadow-s); }
.ob-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 8px; }
.ob-bar-l { display: inline-flex; align-items: center; gap: 6px; justify-self: start; }
.ob-bar-r { justify-self: end; }
.ob-transport { display: flex; justify-content: center; align-items: center; gap: 8px; }
.ob-btn { display: inline-grid; place-items: center; width: 46px; height: 42px; border: 0; border-radius: var(--r); background: var(--btn-2); color: var(--text); cursor: pointer; box-shadow: 0 2px 0 var(--btn-2-shadow); transition: background .12s, transform .06s; }
.ob-btn:hover { background: var(--btn-2-hover); }
.ob-btn:active { transform: translateY(1px); box-shadow: none; }
.ob-btn .ic { width: 22px; height: 22px; }
.ob-btn.ob-pp { width: 62px; height: 48px; background: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-3); }
.ob-btn.ob-pp:hover { background: var(--accent-2); }
.ob-btn.ob-pp .ic { width: 28px; height: 28px; }
.ob-btn.sm { width: 36px; height: 34px; }
.ob-btn.sm .ic { width: 18px; height: 18px; }
.ob-progress { display: flex; align-items: center; gap: 12px; }
.ob-count { flex: none; min-width: 64px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 13.5px; color: var(--muted); }
.ob-slider { --p: 0%; flex: 1; min-width: 0; height: 22px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.ob-slider::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p), var(--surface-3) var(--p)); }
.ob-slider::-moz-range-track { height: 6px; border-radius: 3px; background: var(--surface-3); }
.ob-slider::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }
.ob-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: var(--shadow-s); }
.ob-slider::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.ob-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13px; }
.ob-opt { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.ob-opt input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.ob-speed { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-s); padding: 4px 6px; font: inherit; font-weight: 700; }
.ob-side { display: grid; gap: 12px; align-content: start; min-width: 0; }
.ob-varbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ob-varinfo { font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: center; }
.ob-moves { display: grid; grid-template-columns: 1fr; margin: 12px 0; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); position: relative; }
.ob-mrow { display: grid; grid-template-columns: 44px 1fr 1fr; align-items: stretch; }
.ob-mrow:nth-child(odd) { background: rgba(255, 255, 255, .025); }
.ob-mn { display: grid; place-items: center; font-size: 12.5px; color: var(--muted-2); background: var(--surface); font-weight: 700; }
.ob-mv { border: 0; background: none; color: var(--text); font: inherit; font-weight: 700; font-size: 14px; text-align: left; padding: 6px 10px; cursor: pointer; border-radius: 0; }
.ob-mv:hover { background: var(--surface-2); }
.ob-mv.next { color: var(--muted); font-weight: 600; }
.ob-mv.cur { background: var(--accent); color: #fff; }
.ob-mv.start { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); padding: 6px 12px; }
.ob-mv.start.cur { color: #fff; }
.ob-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ob-search .input { width: 100%; }
.ob-lib > .tiny.muted { margin: 8px 2px 6px; }
.ob-browse { max-height: calc(100vh - 360px); min-height: 280px; overflow-y: auto; margin: 0 -8px; padding: 0 8px; }
.ob-rescount { margin: 4px 2px 8px; }
.ob-part { border-bottom: 1px solid var(--line); }
.ob-part > summary { display: flex; align-items: center; gap: 10px; padding: 10px 4px; cursor: pointer; list-style: none; font-weight: 800; }
.ob-part > summary::-webkit-details-marker { display: none; }
.ob-part > summary::after { content: "▸"; color: var(--muted); transition: transform .15s; }
.ob-part[open] > summary::after { transform: rotate(90deg); }
.ob-roman { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); font-family: var(--display); font-size: 13px; }
.ob-pname { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ob-pname .tiny { font-weight: 600; }
.ob-ch { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: var(--text); font: inherit; font-weight: 700; font-size: 14px; text-align: left; padding: 8px 6px; border-radius: var(--r); cursor: pointer; }
.ob-ch:hover { background: var(--surface-2); }
.ob-ch.open { background: var(--surface-2); }
.ob-chn { flex: none; width: 22px; text-align: center; color: var(--muted-2); font-size: 12.5px; }
.ob-lines { padding: 4px 0 8px 12px; border-left: 2px solid var(--accent-soft); margin: 2px 0 6px 16px; }
.ob-sub { font-size: 12px; font-weight: 800; color: var(--accent-2); text-transform: uppercase; letter-spacing: .02em; padding: 10px 6px 4px; }
.ob-line { display: flex; align-items: flex-start; gap: 8px; width: 100%; border: 0; background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; padding: 7px 6px; border-radius: var(--r); cursor: pointer; text-decoration: none; }
.ob-line:hover { background: var(--surface-2); }
.ob-line.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.ob-line .an-eco { flex: none; margin-top: 1px; }
.ob-lname { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ob-lname b { font-weight: 700; line-height: 1.3; }
.ob-lname .tiny { line-height: 1.35; overflow-wrap: anywhere; }
.ob-play { flex: none; color: var(--accent-2); }
.ob-play .ic { width: 18px; height: 18px; }
.ob-cont { display: grid; gap: 2px; max-height: 420px; overflow-y: auto; }
.ob-next { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.ob-next .chip { border: 0; cursor: pointer; font-size: 13px; }
.ob-next .chip:hover { background: var(--surface-3); }
.ob-src { margin-top: 10px; line-height: 1.4; }
.ob-keys { text-align: center; }
html[data-theme="light"] .ob-mrow:nth-child(odd) { background: rgba(0, 0, 0, .025); }
@media (max-width: 1100px) {
  .ob-layout { grid-template-columns: minmax(0, 1fr) 360px; }
}
@media (max-width: 900px) {
  .ob-layout { grid-template-columns: 1fr; }
  .ob-main .board-wrap, .ob-head, .ob-controls, .ob-opts { max-width: min(100%, calc(100vh - 250px)); }
  .ob-browse { max-height: 70vh; }
}
@media (max-width: 600px) {
  .ob-top { margin-bottom: 10px; }
  .ob-tabs { width: 100%; }
  .ob-tabs .tab { flex: 1; justify-content: center; }
  .ob-main .board-wrap, .ob-head, .ob-controls, .ob-opts { max-width: 100%; }
  .ob-title { font-size: 16px; }
  .ob-head { min-height: 0; margin-bottom: 8px; }
  .ob-controls { padding: 8px; }
  .ob-transport { gap: 6px; }
  .ob-bar { grid-template-columns: 1fr 1fr; grid-template-areas: "t t" "l r"; }
  .ob-transport { grid-area: t; }
  .ob-bar-l { grid-area: l; }
  .ob-bar-r { grid-area: r; }
  .ob-btn { width: 46px; height: 42px; }
  .ob-btn.ob-pp { width: 60px; height: 46px; }
  .ob-opts { gap: 8px 12px; font-size: 12.5px; }
  .ob-varbar .btn.sm { padding: 5px 8px; font-size: 12.5px; }
  .ob-moves { max-height: 200px; }
  .ob-browse { min-height: 0; margin: 0 -4px; padding: 0 4px; }
}
@media (max-width: 360px) {
  .ob-transport { gap: 5px; }
  .ob-btn { width: 40px; }
  .ob-btn.ob-pp { width: 54px; }
}
@media (max-width: 420px) {
  .ob-tabs .tab { padding-inline: 6px; font-size: 14px; }
  .ob-tabs .tab .ic { display: none; }
}

/* ================= Grafiklar (static/js/charts.js) ================= */
:root { --c1: #5b9fd6; --c2: #9b7fd1; --c3: #3fb8a9; --c4: #e8914b; --c5: #d46aa6; --c6: #7fb24a; --c7: #e8b84b; --c8: #6d8cf0; }
html[data-theme="light"] { --c1: #3f84bd; --c2: #7d5fc0; --c3: #229a8c; --c4: #d4762c; --c5: #bd4d8c; --c6: #5f962c; --c7: #c99a1c; --c8: #4d6fe0; }
.cx { position: relative; width: 100%; min-width: 0; }
.cx-svg { display: block; overflow: visible; touch-action: pan-y; }
.cx-ax { fill: var(--muted); font: 600 10.5px var(--sans); }
.cx-grid { stroke: var(--line); stroke-width: 1; }
.cx-hl { fill: var(--text); opacity: .06; pointer-events: none; }
.cx-path { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.cx-dot { fill: var(--surface); stroke-width: 2.2; }
.cx-mark { fill: var(--surface); stroke: var(--ok); stroke-width: 2.5; }
.cx-mark.lo { stroke: var(--danger); }
.cx-mark-t { fill: var(--ok); font: 800 11px var(--sans); }
.cx-mark-t.lo { fill: var(--danger); }
.cx-tip { position: fixed; z-index: 1000; pointer-events: none; background: var(--surface-3); color: var(--text); border-radius: 7px; padding: 7px 10px; font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow); opacity: 0; transition: opacity .1s; max-width: 260px; }
.cx-tip.on { opacity: 1; }
html[data-theme="light"] .cx-tip { background: #2b2927; color: #f2f1ef; }
.cx-tdot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.cx-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.cx-legend.col { flex-direction: column; gap: 7px; margin: 0; flex: 1; min-width: 190px; }
.cx-li { display: inline-flex; align-items: center; gap: 7px; }
.cx-li i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.cx-legend.col .cx-li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 36px; gap: 8px; color: var(--text); }
.cx-li-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-legend.col .tiny { text-align: right; }
.cx-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.cx-cell { fill: var(--surface-2); }
.cx-cell.l1 { fill: color-mix(in srgb, var(--accent) 35%, var(--surface-2)); }
.cx-cell.l2 { fill: color-mix(in srgb, var(--accent) 60%, var(--surface-2)); }
.cx-cell.l3 { fill: color-mix(in srgb, var(--accent) 82%, var(--surface-2)); }
.cx-cell.l4 { fill: var(--accent-2); }
.cx-cell:hover { stroke: var(--text); stroke-width: 1.2; }
.cx-cal-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 8px; }
.cx-cal-legend i { width: 11px; height: 11px; border-radius: 2.5px; background: var(--surface-2); }
.cx-cal-legend i.l1 { background: color-mix(in srgb, var(--accent) 35%, var(--surface-2)); }
.cx-cal-legend i.l2 { background: color-mix(in srgb, var(--accent) 60%, var(--surface-2)); }
.cx-cal-legend i.l3 { background: color-mix(in srgb, var(--accent) 82%, var(--surface-2)); }
.cx-cal-legend i.l4 { background: var(--accent-2); }
.cx-pc { fill: var(--c1); }
.cx-pc:hover { fill: var(--c2); opacity: 1 !important; }
.cx-donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cx-donut { flex: none; }
.cx-donut-bg { fill: none; stroke: var(--surface-2); }
.cx-seg { fill: none; transition: opacity .12s; cursor: pointer; }
.cx-seg:hover { opacity: .8; }
.cx-donut-v { fill: var(--text); font: 800 24px var(--display); }
.cx-web { fill: none; stroke: var(--line); stroke-width: 1; }
.cx-radar-a { fill: color-mix(in srgb, var(--c1) 28%, transparent); stroke: var(--c1); stroke-width: 2; stroke-linejoin: round; }
.cx-rl { font-size: 11px; fill: var(--text); }
.cx-ring-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cx-ring { width: 72px; height: 72px; flex: none; }
.cx-ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 8; }
.cx-ring-fg { fill: none; stroke-width: 8; stroke-linecap: round; }
.cx-ring text { fill: var(--text); font: 800 15px var(--display); }
.cx-ring-tx { display: flex; flex-direction: column; min-width: 0; }
.cx-ring-tx b { font-size: 14px; }
.cx-spark { display: inline-block; width: 96px; height: 28px; }
.cx-spark svg { width: 100%; height: 100%; display: block; }
.cx-spark path { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.cx-hbars { display: grid; gap: 7px; }
.cx-hb { display: grid; grid-template-columns: minmax(80px, 38%) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; }
.cx-hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-hb-t { position: relative; height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.cx-hb-t i { position: absolute; inset: 0 auto 0 0; border-radius: 5px; }
.cx-hb-t em { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--text); }
.cx-hb-v { font-size: 12.5px; min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }

/* ================= Ota-ona: kengaytirilgan statistika ================= */
.pa-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 18px 0 12px; }
.pa-bar h2 { margin: 0; font-size: 20px; }
.pa-seg { display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.pa-seg button { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.pa-seg button:hover { color: var(--text); }
.pa-seg button.on { background: var(--accent); color: #fff; }
.pa-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; align-items: start; transition: opacity .15s; }
.pa-grid.loading { opacity: .45; pointer-events: none; }
.pa-grid > .s12 { grid-column: span 12; }
.pa-grid > .s8 { grid-column: span 8; }
.pa-grid > .s6 { grid-column: span 6; }
.pa-grid > .s4 { grid-column: span 4; }
.pa-card { min-width: 0; margin: 0; }
.pa-card .card-head { flex-wrap: wrap; gap: 8px; }
.pa-head-x { display: flex; flex-wrap: wrap; gap: 6px; }
.pa-note { margin-top: 10px; line-height: 1.45; }
.pa-ins-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.pa-in { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); font-size: 13.5px; line-height: 1.45; }
.pa-in-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(91, 159, 214, .18); color: var(--info); }
.pa-in-ic .ic { width: 15px; height: 15px; }
.pa-in.good .pa-in-ic { background: rgba(111, 166, 80, .18); color: var(--ok); }
.pa-in.warn .pa-in-ic { background: rgba(232, 184, 75, .18); color: var(--warn); }
.pa-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pa-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px; min-width: 0; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-s); }
.pa-kpi-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.pa-kpi-ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); flex: none; }
.pa-kpi-ic .ic { width: 15px; height: 15px; }
.pa-kpi-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-kpi-v { font: 800 26px/1.1 var(--display); letter-spacing: -.01em; }
.pa-kpi-b { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 28px; }
.pa-delta { font-size: 12px; font-weight: 800; padding: 2px 7px; border-radius: 10px; white-space: nowrap; }
.pa-delta.up { color: var(--ok); background: rgba(111, 166, 80, .14); }
.pa-delta.down { color: var(--danger); background: rgba(224, 87, 74, .14); }
.pa-delta.flat { color: var(--muted); background: var(--surface-2); }
.pa-rt { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.pa-rt > div { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border-radius: var(--r); padding: 8px 10px; }
.pa-rt b { font: 800 18px var(--display); }
.pa-rt b.pos { color: var(--ok); }
.pa-rt b.neg { color: var(--danger); }
.pa-wd-acc { display: grid; grid-template-columns: 34px repeat(7, minmax(0, 1fr)); font-size: 11.5px; font-weight: 800; text-align: center; margin-top: 2px; }
.pa-wd-acc::before { content: ""; }
.pa-wd-acc .good { color: var(--ok); }
.pa-wd-acc .bad { color: var(--danger); }
.pa-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pa-rings { display: grid; gap: 14px; }
.pa-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.pa-mini > div { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border-radius: var(--r); padding: 8px 10px; min-width: 0; }
.pa-mini b { font: 800 18px var(--display); }
.pa-wdl-row { display: grid; grid-template-columns: minmax(90px, 30%) minmax(0, 1fr) 40px; align-items: center; gap: 10px; margin-bottom: 8px; }
.pa-wdl { display: flex; height: 20px; border-radius: 5px; overflow: hidden; background: var(--surface-2); }
.pa-wdl i { display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; }
.pa-wdl .w { background: var(--ok); }
.pa-wdl .d { background: var(--muted-2); }
.pa-wdl .l { background: var(--danger); }
.pa-games td { padding: 8px 10px; vertical-align: middle; }
.pa-card.flush { padding-bottom: 6px; }
.pa-color { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line); vertical-align: middle; }
.pa-color.white { background: #f0efec; }
.pa-color.black { background: #2b2927; border-color: #555; }
.pa-runs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pa-run { background: var(--surface-2); border-radius: var(--r-l); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.pa-run-h { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.pa-run-h .ic { width: 18px; height: 18px; }
.pa-run-h b { color: var(--text); }
.pa-run-v { font: 800 28px var(--display); display: flex; align-items: baseline; gap: 6px; }
.pa-learn { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; }
.pa-learn-rings { display: grid; gap: 14px; align-content: start; }
.pa-asg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 22px; align-items: start; }
.pa-cmp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pa-cmp-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
@media (max-width: 1100px) {
  .pa-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pa-grid > .s8, .pa-grid > .s6 { grid-column: span 12; }
  .pa-grid > .s4 { grid-column: span 6; }
  .pa-learn { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pa-learn-rings { grid-column: span 2; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .pa-grid > .s4 { grid-column: span 12; }
  .pa-asg, .pa-cmp-grid, .pa-learn { grid-template-columns: minmax(0, 1fr); }
  .pa-learn-rings { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
  .pa-rt, .pa-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .pa-grid { gap: 10px; }
  .pa-kpis { gap: 8px; }
  .pa-kpi { padding: 10px; }
  .pa-kpi-v { font-size: 21px; }
  .pa-kpi-b { flex-wrap: wrap; }
  .cx-spark { width: 64px; }
  .pa-bar { margin: 14px 0 10px; }
  .pa-bar h2 { font-size: 18px; width: 100%; }
  .pa-seg { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pa-seg button { padding: 7px 4px; }
  .pa-card .pa-head-x { width: 100%; }
  .pa-card .pa-seg { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .pa-card .pa-seg button { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
  .pa-ins-list { grid-template-columns: minmax(0, 1fr); }
  .cx-donut-wrap { gap: 12px; }
  .cx-donut { width: 132px; height: 132px; }
  .pa-wdl-row { grid-template-columns: minmax(70px, 28%) minmax(0, 1fr) 34px; }
  .cx-hb { grid-template-columns: minmax(70px, 36%) minmax(0, 1fr) auto; gap: 8px; }
}

/* ================= Do'stlar, takliflar va onlayn o'yin ================= */
.fr-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); display: inline-block; flex: none; box-shadow: 0 0 0 2px var(--surface); }
.fr-dot.online { background: #62a524; }
.fr-dot.playing { background: var(--warn); }
.gp-name .fr-dot { margin-right: 6px; vertical-align: 1px; box-shadow: none; }
/* o'ng pastdagi kartalar (taklif, do'stlik so'rovi) */
.sx-stack { position: fixed; right: 18px; bottom: 18px; z-index: 900; display: grid; gap: 10px; width: min(360px, calc(100vw - 32px)); }
.sx-card { position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-l); padding: 12px 14px; box-shadow: var(--shadow-l); animation: sxIn .22s ease-out; }
.sx-card.ch { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-l); }
@keyframes sxIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.sx-x { position: absolute; top: 4px; right: 6px; border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; padding: 4px; }
.sx-row { display: flex; align-items: center; gap: 10px; padding-right: 16px; }
.sx-tx { font-size: 14px; line-height: 1.4; min-width: 0; }
.sx-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.sx-ch { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sx-timer { flex-basis: 100%; height: 3px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.sx-timer i { display: block; height: 100%; background: var(--accent); animation: sxBar linear forwards; transform-origin: left; }
@keyframes sxBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* taklif oynasi */
.sx-dialog { display: grid; gap: 6px; min-width: min(420px, 80vw); }
.sx-to { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); background: var(--surface-2); margin-bottom: 6px; }
.sx-tcs { display: grid; gap: 6px; }
.sx-tc-k { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.sx-tc-k .ic { width: 15px; height: 15px; }
.sx-tc-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sx-tc { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 800; font-size: 14px; padding: 9px 4px; border-radius: var(--r); cursor: pointer; }
.sx-tc:hover { background: var(--surface-3); }
.sx-tc.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.sx-colors { background: var(--surface-2); border-color: var(--line); }
.sx-colors .bp-color { color: var(--text); }
.sx-rated { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 13.5px; line-height: 1.4; margin: 10px 0 4px; }
.sx-rated input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.sx-wait { display: grid; justify-items: center; gap: 12px; text-align: center; min-width: min(380px, 80vw); padding: 6px 0; }
.sx-pulse { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; position: relative; }
.sx-pulse::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--accent); animation: sxPulse 1.6s ease-out infinite; }
@keyframes sxPulse { from { transform: scale(.75); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.sx-link { display: flex; gap: 6px; width: 100%; }
.sx-link .input { flex: 1; min-width: 0; font-size: 13px; }
.sx-link-page { max-width: 520px; margin: 30px auto; display: grid; justify-items: center; gap: 14px; text-align: center; padding: 28px 20px; }
.sx-link-page h2 { margin: 0; }
/* profil / o'yinchi kartasidagi tugmalar */
.fr-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fr-actions:empty { display: none; }
/* do'stlar sahifasi */
.fr-page { max-width: 900px; margin: 0 auto; }
.fr-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.fr-list { display: grid; gap: 2px; }
.fr-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: var(--r); }
.fr-row:hover { background: var(--surface-2); }
.fr-ava { position: relative; flex: none; display: inline-block; }
.fr-ava .avatar { width: 46px; height: 46px; font-size: 16px; }
.fr-ava .fr-dot { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; }
.fr-ava.sm .avatar { width: 34px; height: 34px; font-size: 13px; }
.fr-ava.sm .fr-dot { width: 11px; height: 11px; }
.fr-info { flex: 1; min-width: 0; }
.fr-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fr-info .tiny { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-st.online { color: #62a524; font-weight: 700; }
.fr-st.playing { color: var(--warn); font-weight: 700; }
.fr-acts { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.fr-acts .btn.ghost .lbl { gap: 0; }
.fr-sub { font-size: 15px; margin: 14px 0 6px; }
.fr-sub:first-child { margin-top: 0; }
.fr-search { margin-bottom: 12px; }
.fr-search .input { width: 100%; }
.fr-empty { display: grid; justify-items: center; gap: 10px; padding-bottom: 12px; }
.tab.fr-hot { color: var(--danger); }
/* lobbi */
.ol-panel { display: grid; gap: 10px; align-content: start; }
.ol-panel .pp-head { margin-bottom: 0; }
.ol-play { font-size: 18px; min-height: 56px; }
.ol-seek { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-l); background: var(--surface-2); border: 1px solid var(--accent); }
.ol-seek > div:nth-child(2) { flex: 1; min-width: 0; }
.ol-spin { display: flex; gap: 4px; }
.ol-spin i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: olDot 1s infinite ease-in-out; }
.ol-spin i:nth-child(2) { animation-delay: .15s; }
.ol-spin i:nth-child(3) { animation-delay: .3s; }
@keyframes olDot { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.ol-stats { display: flex; gap: 14px; justify-content: center; min-height: 16px; }
.ol-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.ol-or::before, .ol-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ol-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ol-friends { display: grid; gap: 6px; margin-top: 4px; }
.ol-sub { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.ol-fr { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: var(--r); }
.ol-fr:hover { background: var(--surface-2); }
.ol-fr-n { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ol-fr-n b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* o'yin xonasi */
.ol-offer { display: grid; gap: 6px; margin: 6px 0 8px; }
.ol-offer-i { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 9px 11px; border-radius: var(--r); background: var(--accent-soft); border: 1px solid var(--accent); font-size: 13.5px; font-weight: 700; animation: sxIn .2s ease-out; }
.ol-delta { font-size: 12px; font-weight: 800; margin-left: 6px; }
.ol-delta.up { color: var(--ok); }
.ol-delta.down { color: var(--danger); }
.gp-tab.hot { color: var(--accent-2); }
.chat-msg.mine { background: var(--accent-soft); }
.gp-ava-link { flex: none; display: inline-flex; }
.gp-act[disabled] { opacity: .45; pointer-events: none; }
.gp-act.on { color: var(--accent-2); }
@media (max-width: 600px) {
  .sx-stack { right: 10px; left: 10px; width: auto; bottom: calc(72px + env(safe-area-inset-bottom)); }
  .sx-tc-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .sx-tc { font-size: 13px; padding: 8px 2px; }
  .sx-dialog, .sx-wait { min-width: 0; }
  .fr-row { flex-wrap: wrap; padding: 10px 4px; }
  .fr-acts { width: 100%; justify-content: flex-start; padding-left: 58px; }
  .ol-btns { grid-template-columns: 1fr; }
}
html[data-theme="light"] .sx-colors .bp-color.on { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
html[data-theme="light"] .sx-colors .bp-color:hover { background: var(--surface-3); }

/* ================= Oldindan yurish (premove) ================= */
.hl.premove { background: rgba(214, 79, 69, .55); }
.hl.sel.pre { background: rgba(214, 79, 69, .38); }
.dot.pre { background: rgba(214, 79, 69, .32); }
.dot.pre.cap { background: none; box-shadow: inset 0 0 0 7px rgba(214, 79, 69, .34); }

/* strelkalar: kitob nazariyasi (jigarrang) va dvigatel (ko'k), uchida yurish yozuvi (♘f3) */
.board > svg.arrows .arrow.book { fill: #a88764; opacity: .9; }
.board > svg.arrows .arrow.engine { fill: #2f7cc0; opacity: .78; }
.board > svg.arrows .arrow-lbl rect { fill: rgba(28, 26, 24, .86); }
.board > svg.arrows .arrow-lbl.book rect { fill: #7d5f40; }
.board > svg.arrows .arrow-lbl.green rect { fill: #15781b; }
.board > svg.arrows .arrow-lbl text {
  fill: #fff; font-size: .25px; font-weight: 800; text-anchor: middle;
  font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", var(--sans);
}

/* baho chizig'i taxta ag'darilganda */
.an-evalbar.flip { transform: rotate(180deg); }
.an-evalbar.flip .an-eval-tx { transform: rotate(180deg); }

/* figurine belgilar (♘) uchun shrift zaxirasi */
.mv, .op-pv, .op-th, .rv-th-seq, .rv-say, .ob-lname .tiny, .op-lname .tiny, .gp-eng-line {
  font-family: var(--sans), "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif;
}

/* ================= Taxta sozlamalari oynasi (chess.com uslubi) ================= */
.bs-modal { width: min(470px, 100%); background: #262421; color: #e9e7e4; }
html[data-theme="light"] .bs-modal { background: var(--surface); color: var(--text); }
.bs-modal .m-body { padding: 0; }
.bs-modal .m-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bs-modal .m-foot .btn { height: 50px; font-size: 16px; font-weight: 800; }
.bs-modal .m-foot .bs-save { background: #5d9948; box-shadow: 0 4px 0 #456f36; }
.bs-modal .m-foot .bs-save:hover { background: #6aac53; }
.bs-tabs { display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(0, 0, 0, .22); }
html[data-theme="light"] .bs-tabs { background: var(--surface-2); }
.bs-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 8px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.bs-tab .ic { width: 24px; height: 24px; }
.bs-tab:hover { color: var(--text); }
.bs-tab.on { background: #262421; color: #fff; }
html[data-theme="light"] .bs-tab.on { background: var(--surface); color: var(--text); }
.bs-body { padding: 14px 18px 6px; max-height: 62vh; overflow-y: auto; }
.bs-preview { display: grid; grid-template-columns: repeat(8, 1fr); border-radius: 4px; overflow: hidden; margin-bottom: 10px; box-shadow: var(--shadow-s); }
.bs-sq { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.bs-pc { width: 92%; height: 92%; }
.bs-pc svg { width: 100%; height: 100%; display: block; }
.bs-coord { position: absolute; left: 6%; top: 5%; line-height: 1; font-size: 11px; font-size: max(9px, calc(var(--sq, 50px) * .2)); font-weight: 700; }
.bs-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.bs-row:last-child { border-bottom: 0; }
.bs-lbl { display: grid; gap: 2px; font-size: 15px; font-weight: 600; }
.bs-lbl small { font-size: 12px; font-weight: 500; color: var(--muted); }
.bs-sel { width: 52%; max-width: 245px; flex: none; }
.gp-tools { display: inline-flex; align-items: center; gap: 2px; }
.gp-gear .ic { width: 20px; height: 20px; }

/* ================= Debyutlar sahifasi (chess.com Analysis uslubi) ================= */
.gp.op .an-board { display: flex; flex-direction: column; }
.gp.op .an-left { width: min(calc(100vh - 150px), calc(100% - 460px)); }
.op-bar { min-height: 44px; }
.op-side { display: grid; place-items: center; background: var(--surface-2); }
.op-side svg { width: 86%; height: 86%; }
.op-panel { background: var(--surface); }
.op-head { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 16px 10px; }
.op-head b { font-size: 19px; font-family: var(--display); }
.op-head-sub { padding: 1px 6px; border-radius: 4px; background: var(--surface-2); font-weight: 800; }
.op-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.op-tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px 8px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; border-bottom: 3px solid transparent; }
.op-tab .ic { width: 22px; height: 22px; }
.op-tab:hover { color: var(--text); }
.op-tab.on { color: var(--text); border-bottom-color: var(--text); }
.op-body { overflow-y: auto; }
.op-engine { padding: 8px 12px 6px; border-bottom: 1px solid var(--line); display: grid; gap: 3px; }
.op-eng-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.op-eng-head .switch { transform: scale(.82); transform-origin: left center; margin-right: -6px; }
.op-depth { font-variant-numeric: tabular-nums; }
/* Stockfish yuklanishi va ishlamay qolganda ogohlantirish */
.op-eng-load { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin: 8px 2px 6px; }
.op-eng-load i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s ease; }
.op-eng-warn { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; padding: 8px 10px; border-radius: 6px;
  background: rgba(232, 184, 75, .12); color: var(--warn); font-size: 12.5px; font-weight: 700; }
.op-eng-warn span { flex: 1; min-width: 0; }
.op-eline { display: flex; align-items: center; gap: 8px; min-height: 26px; padding: 2px 4px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.op-eline:hover { background: var(--surface-2); }
.op-eline.wait { cursor: default; color: var(--muted); }
.op-chip { flex: none; min-width: 52px; padding: 2px 6px; border-radius: 3px; text-align: center; font-weight: 800; font-size: 13px; font-family: var(--display); font-variant-numeric: tabular-nums; }
.op-chip.w { background: #fff; color: #312e2b; }
.op-chip.b { background: #403d39; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.op-chip.ghost { background: var(--surface-2); color: var(--muted); }
.op-pv { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.op-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 10px 14px 6px; font-size: 14px; font-weight: 700; }
.op-name-ic { display: inline-flex; flex: none; }
.op-name-ic svg, .bk-ic { width: 20px; height: 20px; display: block; }
.op-name-tx { flex: 1; min-width: 0; line-height: 1.3; }
.op-bname { display: inline-block; padding: 1px 7px; border-radius: 10px; background: rgba(168, 135, 100, .2); color: #c9a77f; font-size: 12px; font-weight: 800; }
html[data-theme="light"] .op-bname { color: #7d5f40; }
.op-placebox { margin: 0 14px 8px; padding: 8px 10px; border-radius: 6px; background: var(--surface-2); display: grid; gap: 3px; }
.op-placebox.link { cursor: pointer; }
.op-placebox.link:hover { background: var(--surface-3); }
.op-placebox.compact { margin: 6px 0 0; }
.op-place { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 12.5px; line-height: 1.4; }
.op-place i { font-style: normal; opacity: .55; }
.op-mco { padding: 0 5px; border-radius: 3px; background: #a88764; color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; }
.op-place-meta { font-weight: 600; }
.op-theory { padding: 6px 14px 10px; border-bottom: 1px solid var(--line); }
.op-th-head { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 6px; font-size: 13.5px; }
.op-th-moves { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.op-th { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 8px; border: 0; border-radius: 5px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; box-shadow: inset 3px 0 0 #a88764; }
.op-th:hover { background: var(--surface-3); }
.op-th.static { cursor: default; }
.op-th.sm { padding: 3px 7px; font-size: 13px; }
.op-th b { white-space: nowrap; }
.op-th-n { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.op-th-name { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.op-out { display: grid; gap: 6px; font-size: 13.5px; }
.op-out > b { color: var(--warn); }
.op-mhead { padding: 8px 16px 4px; font-size: 13px; color: var(--muted); }
.op-mhead b { color: var(--text); }
.op-moves { flex: none; min-height: 120px; }
.mv.book { color: #c9a77f; }
html[data-theme="light"] .mv.book { color: #7d5f40; }
.mv-cls svg { display: block; width: 15px; height: 15px; }
.op-lib-top { padding: 10px 12px 6px; display: grid; gap: 6px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.op-lib-top .input { width: 100%; }
.op-lib { padding: 0 10px 6px; }
.op-src { padding: 6px 14px 12px; line-height: 1.4; }
.op-rescount { margin: 4px 2px 8px; }
.op-line { display: flex; align-items: flex-start; gap: 8px; width: 100%; border: 0; background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; padding: 6px 6px; border-radius: var(--r); cursor: pointer; }
.op-line:hover { background: var(--surface-2); }
.op-line .an-eco { flex: none; margin-top: 1px; }
.op-lname { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.op-lname b { font-weight: 700; line-height: 1.3; }
.op-lname .tiny { line-height: 1.35; overflow-wrap: anywhere; }
.op-chbox { padding-left: 8px; }
.op-sec { margin: 4px 0 8px; border-radius: 6px; background: rgba(255, 255, 255, .02); }
html[data-theme="light"] .op-sec { background: rgba(0, 0, 0, .02); }
.op-sec-head { display: flex; align-items: flex-start; gap: 8px; width: 100%; border: 0; background: var(--surface-2); color: var(--text); font: inherit; text-align: left; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
.op-sec-head:hover { background: var(--surface-3); }
.op-sec-head.plain { background: none; cursor: default; }
.op-sec-cols { flex: none; min-width: 42px; padding: 1px 5px; border-radius: 4px; background: #a88764; color: #fff; font-size: 11px; font-weight: 800; text-align: center; margin-top: 1px; }
.op-sec-head.plain .op-sec-cols { background: var(--surface-3); color: var(--muted); }
.op-sec-names { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px 2px; }
.op-nm { border: 0; border-radius: 10px; padding: 2px 8px; background: rgba(168, 135, 100, .18); color: #c9a77f; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.op-nm:hover { background: rgba(168, 135, 100, .32); }
html[data-theme="light"] .op-nm { color: #7d5f40; }
.op-games { padding: 10px 14px; }
.op-intab { gap: 8px; }
.op-intab .op-name { padding: 0; }
@media (max-width: 1100px) {
  .gp.op .an-left { width: min(calc(100vh - 150px), calc(100% - 380px)); }
}
@media (max-width: 900px) {
  .gp.op .an-left { width: min(100%, calc(100vh - 220px)); }
  .op-moves { max-height: 240px; }
}
@media (max-width: 860px) {
  .gp.op .an-left { width: 100%; }
  .op-th-name { max-width: 120px; }
  .bs-sel { width: 50%; }
}

/* ================= Game Review: debyut va nazariya ================= */
.rv-head-c { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }
.rv-head .icon-btn .ic { width: 20px; height: 20px; }
.rv-say { display: grid; gap: 4px; }
.rv-say-top { display: flex; align-items: center; gap: 8px; }
.rv-say-top .cls-ic { flex: none; }
.rv-say-top .rv-say-h { flex: 1; margin: 0; }
.rv-say-top .op-chip.b { background: #403d39; }
.rv-say-tx { font-weight: 600; }
.rv-say-tx .op-bname { color: #7d5f40; background: rgba(168, 135, 100, .18); }
.rv-say-more { margin-top: 4px; padding-top: 6px; border-top: 1px solid rgba(0, 0, 0, .1); display: grid; gap: 3px; font-weight: 600; font-size: 13.5px; }
.rv-left { color: #7d5f40; }
.rv-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.rv-btn { gap: 6px; height: 42px; padding: 0 8px; }
.rv-btn .ic { width: 18px; height: 18px; }
.rv-btn.on { box-shadow: inset 0 0 0 2px var(--accent-2); }
.rv-btn[disabled] { opacity: .5; pointer-events: none; }
.rv-hl { gap: 8px; }
.rv-op { padding: 10px 12px; border-radius: 6px; background: var(--surface-2); display: grid; gap: 4px; }
.rv-op.compact { padding: 8px 10px; }
.rv-op .op-placebox.compact { background: transparent; padding: 0; margin: 2px 0 0; }
.rv-op-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 14px; line-height: 1.3; }
.rv-theory { padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line); display: grid; gap: 6px; }
.rv-theory.compact { padding: 8px 10px; }
.rv-th-head { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; }
.rv-th-seq { font-weight: 700; font-size: 14px; line-height: 1.55; color: #c9a77f; }
html[data-theme="light"] .rv-th-seq { color: #7d5f40; }
.rv-th-out { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13.5px; font-weight: 700; }
.rv-th-out .cls-ic { display: block; }
.rv-th-btn { justify-self: start; }
.coach-bubble .op-chip.w { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); }
.op-engine { grid-template-columns: minmax(0, 1fr); }
.op-eline, .op-eng-head { min-width: 0; }
.op-depth { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.op-panel .gp-body { min-width: 0; }
.op-lib .ob-sub { text-transform: none; letter-spacing: 0; }
.rv-scroll { grid-auto-rows: max-content; }
.rv-graph { flex: none; min-height: 90px; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; margin: 0; flex: none; }
.op-name.muted { color: var(--muted); font-weight: 600; }
.op-err { color: var(--danger); }
.op-err .btn { margin-left: auto; }

/* ================= Telefon: o'yin / tahlil / debyut / review sahifalari ================= */
.m-strip { display: none; }
@media (max-width: 860px) {
  /* gorizontal yurishlar qatori (taxta ostida) */
  .m-strip {
    display: flex; align-items: center; gap: 1px; min-height: 40px; padding: 4px 8px; overflow-x: auto; overflow-y: hidden;
    white-space: nowrap; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
    font-family: var(--sans), "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif;
  }
  .m-strip::-webkit-scrollbar { display: none; }
  .ms-n { flex: none; margin: 0 2px 0 8px; font-size: 12.5px; font-weight: 700; color: var(--muted-2); }
  .ms-n:first-child { margin-left: 2px; }
  .ms-mv { flex: none; border: 0; background: none; color: var(--text); font: inherit; font-size: 15px; font-weight: 700; padding: 5px 7px; border-radius: 5px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .ms-mv.cur { background: var(--surface-3); box-shadow: inset 0 -2px 0 rgba(255, 255, 255, .3); }
  html[data-theme="light"] .ms-mv.cur { box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2); }
  .ms-mv.book { color: #c9a77f; }
  html[data-theme="light"] .ms-mv.book { color: #7d5f40; }
  .ms-mv.c-book { color: #c9a77f; }
  .ms-mv.c-inaccuracy { color: #f0c15c; }
  .ms-mv.c-mistake { color: #e6912c; }
  .ms-mv.c-blunder, .ms-mv.c-miss { color: #ee6b55; }
  .ms-mv.c-brilliant { color: #1baaa6; }
  .ms-mv.c-great { color: #5b9fd6; }
  .ms-empty { font-size: 13px; color: var(--muted); padding: 0 4px; }

  /* o'yin sahifalarida pastki menyu o'rniga qotirilgan boshqaruv: ⏮ ‹ ▶ › ⏭ (menyu — yuqoridagi ☰ da) */
  body.game-view .m-tabs { display: none; }
  body.game-view .main { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  body.game-view .view-game .gp-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; gap: 6px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    background: var(--bg-2); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0, 0, 0, .28);
  }
  html[data-theme="light"] body.game-view .view-game .gp-nav { background: #fff; box-shadow: 0 -4px 14px rgba(0, 0, 0, .08); }
  body.game-view .view-game .gp-nb { height: 50px; }
  body.game-view .toast-wrap { bottom: calc(80px + env(safe-area-inset-bottom)); }

  /* panel: amallar (taslim, qaytarish, ag'darish, ⚙) taxtadan keyin darhol */
  .view-game .gp-panel > .gp-foot { order: -1; border-top: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; }
  .view-game .gp-foot .gp-summary { font-size: 12.5px; }
  .gp-actions { gap: 4px 10px; }
  .gp-act { padding: 8px 4px; }
  .gp-flip { padding: 8px; }

  /* tahlil / debyutlar */
  .gp.op .an-left { gap: 6px; padding: 0 0 0 6px; }
  .gp.op .an-evalbar { width: 16px; }
  .gp.op .an-eval-tx { font-size: 8px; }
  .op-bar { min-height: 38px; padding: 2px 8px !important; }
  .op-bar .gp-ava { width: 28px; height: 28px; }
  .op-head { display: none; }
  .op-tabs { position: sticky; top: 56px; z-index: 5; background: var(--surface); }
  .op-tab { padding: 8px 4px 7px; }
  .op-engine { padding: 6px 10px; }
  .op-eline { font-size: 12.5px; min-height: 30px; }
  .op-chip { min-width: 46px; font-size: 12px; }
  .op-name { padding: 8px 12px 4px; font-size: 13.5px; }
  .op-placebox { margin: 0 12px 6px; }
  .op-theory { padding: 6px 12px 10px; }
  .op-th { padding: 7px 9px; font-size: 14px; }
  .op-th-name { max-width: 140px; }
  .op-moves { max-height: none; }
  .op-lib-top { top: 98px; }
  .op-line, .op-sec-head { padding: 9px 8px; }
  .op-result { margin-left: auto; }

  /* review */
  .gp.rv .an-left { gap: 6px; padding: 0 0 0 6px; }
  .gp.rv .an-evalbar { width: 16px; }
  .rv-panel .rv-scroll { padding: 12px; }
  .rv-btns { gap: 6px; }
  .rv-btn { font-size: 13.5px; height: 46px; padding: 0 4px; }
  .rv-panel .rv-foot .gp-actions { padding-bottom: 4px; }
  .coach-ava { width: 48px; height: 48px; }
  .coach-ava .ic-img { width: 42px; height: 42px; }
  .coach-bubble { font-size: 14px; padding: 10px 12px; }

  /* sozlamalar oynasi — pastdan chiqadigan varaq */
  .modal-bg:has(.bs-modal) { place-items: end center; padding: 0; }
  .bs-modal { width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; }
  .bs-modal .m-foot { padding-bottom: calc(13px + env(safe-area-inset-bottom)); }
  .bs-row { padding: 11px 0; }
  .bs-sel { width: 50%; }
}
@media (max-width: 380px) {
  .ms-mv { font-size: 14px; padding: 5px 5px; }
  .rv-btn { font-size: 12.5px; }
  .gp-act span:last-child { font-size: 13px; }
}
@media (max-width: 860px) {
  /* yopishqoq (sticky) tablar ishlashi uchun panel o'zi aylanmasin — sahifa aylanadi */
  .view-game .op-panel, .view-game .op-panel .op-body { overflow: visible; }
}
/* kompyuterda yurishlar ro'yxati qolgan joyni egallaydi va o'zi aylanadi (joriy yurish doim ko'rinadi) */
@media (min-width: 861px) {
  .op-body > * { flex: none; }
  .op-body > .op-moves { flex: 1 1 auto; min-height: 150px; overflow-y: auto; }
}

/* ================= Profil 2.0: unvon banneri, daraja, yutuqlar, faollik ================= */
.pf-page { --rc: var(--chart); }
.pf-page .m-bronze { --m: #d58f52; }
.pf-page .m-silver { --m: #c6d0db; }
.pf-page .m-gold { --m: #f4cb4f; }
.pf-page .m-diamond { --m: #82e0ff; }
.pf-page .m-none { --m: var(--muted-2); }

/* --- sarlavha --- */
.pf-hero { padding: 0; overflow: hidden; position: relative; }
.pf-banner {
  position: relative; height: 152px; overflow: hidden; isolation: isolate;
  background: linear-gradient(115deg, var(--t2), var(--t1));
  background:
    radial-gradient(90% 160% at 88% 0%, color-mix(in srgb, var(--t1) 70%, #fff 0%) 0%, transparent 62%),
    linear-gradient(115deg, color-mix(in srgb, var(--t2) 80%, #000) 0%, var(--t2) 38%, var(--t1) 100%);
}
.pf-banner::after {   /* pastki qorong'ilik — avatar ajralib tursin */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .28));
}
.pf-banner-board {
  position: absolute; left: -10%; right: -10%; bottom: -30%; height: 170%; z-index: 0;
  background: repeating-conic-gradient(rgba(255, 255, 255, .13) 0 25%, transparent 0 50%) 0 0 / 46px 46px;
  transform: perspective(520px) rotateX(48deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 70%, transparent 100%), linear-gradient(0deg, #000 30%, transparent 95%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  animation: pfBoard 26s linear infinite;
}
@keyframes pfBoard { to { background-position: 0 92px; } }
.pf-banner-piece {
  position: absolute; right: 5%; bottom: -34px; width: 200px; height: 200px; z-index: 1;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .45)); opacity: .96;
}
.pf-banner-piece::before {
  content: ""; position: absolute; inset: 8% 12% 18%; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .55), transparent); filter: blur(6px);
}
.pf-banner-piece svg { width: 100%; height: 100%; }
.pf-banner-piece .cp-shadow { display: none; }
.pf-banner-tier {
  position: absolute; left: 22px; top: 16px; z-index: 3; display: flex; align-items: center; gap: 8px;
  padding: 5px 14px 5px 6px; border-radius: 999px; color: #fff;
  background: rgba(0, 0, 0, .26); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.pf-banner-tier > span:last-child { display: grid; line-height: 1.05; }
.pf-banner-tier small { font-size: 9.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.pf-banner-tier b { font: 800 16px var(--display); letter-spacing: -.01em; }
.pf-tier-ic { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: grid; place-items: center; }
.pf-tier-ic svg { width: 26px; height: 26px; }
.pf-tier-ic .cp-shadow, .pf-rung-ic .cp-shadow { display: none; }

.pf-hero-body { position: relative; z-index: 4; display: flex; gap: 22px; align-items: flex-start; padding: 0 24px; margin-top: -74px; }
.pf-ava-wrap {
  position: relative; flex: none; width: 156px; height: 156px; padding: 5px; border-radius: 24px;
  background: linear-gradient(140deg, var(--t1), var(--t2)); box-shadow: 0 12px 30px rgba(0, 0, 0, .42);
}
.pf-hero .pf-ava { width: 100%; height: 100%; border-radius: 19px; border: 3px solid var(--surface); background: #e8e6e3; }
.pf-ava-lvl {
  position: absolute; right: -12px; bottom: -12px; min-width: 46px; height: 46px; padding: 0 9px; border-radius: 23px;
  display: grid; place-items: center; font: 800 19px/1 var(--display); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  background: linear-gradient(140deg, var(--t1), var(--t2)); border: 4px solid var(--surface);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
}
.pf-ava-wrap.is-online::after {
  content: ""; position: absolute; left: 10px; bottom: 10px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ok); border: 3px solid var(--surface);
}
.pf-hero .pf-info { padding-top: 86px; }
.pf-hero .pf-name { font: 800 30px/1.1 var(--display); letter-spacing: -.02em; }
.pf-prem { color: #f4c84f; }
.pf-hero .pf-actions { padding-top: 88px; min-width: 0; }
.pf-hero .pf-actions .fr-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.pf-hero .pf-actions .fr-actions > .btn { width: 100%; }

.pf-xp { display: flex; align-items: center; gap: 10px; margin-top: 14px; max-width: 480px; }
.pf-xp-lvl { font-size: 12.5px; font-weight: 800; white-space: nowrap; color: var(--t1); }
.pf-xp-bar, .pf-level-bar {
  flex: 1; height: 10px; border-radius: 6px; overflow: hidden; background: var(--surface-2);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25);
}
.pf-xp-bar i, .pf-level-bar i {
  position: relative; display: block; height: 100%; border-radius: inherit; overflow: hidden;
  background: linear-gradient(90deg, var(--t2), var(--t1)); animation: pfGrow 1.1s cubic-bezier(.22, .61, .36, 1) both;
}
.pf-xp-bar i::after, .pf-level-bar i::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: pfShine 3.2s 1.2s ease-in-out infinite;
}
@keyframes pfGrow { from { width: 0; } }
@keyframes pfShine { 60%, 100% { transform: translateX(100%); } }
.pf-xp-tx { font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pf-xp-tx b { color: var(--text); }
.pf-hero .pf-meta { margin-top: 12px; }

.pf-kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 22px 24px 0;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: color-mix(in srgb, var(--surface-2) 40%, transparent);
}
.pf-kpi { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-width: 0; }
.pf-kpi + .pf-kpi { border-left: 1px solid var(--line); }
html[dir="rtl"] .pf-kpi + .pf-kpi { border-left: 0; border-right: 1px solid var(--line); }
.pf-kpi-ic { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--surface-2); }
.pf-kpi-tx { min-width: 0; }
.pf-kpi-k { font-size: 12.5px; color: var(--muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-kpi-v { font: 800 27px/1.08 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pf-kpi-s { font-size: 11.5px; color: var(--muted-2); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-kpi.rank { cursor: pointer; transition: background .15s; }
.pf-kpi.rank:hover { background: var(--surface-2); }
.pf-kpi.rank .pf-kpi-v { color: var(--gold); }
.pf-hero .pf-tabs { margin: 16px 0 0; padding: 0 16px; }

/* --- kartalar: kirib kelish animatsiyasi --- */
.pf-body .card { animation: pfUp .5s cubic-bezier(.22, .61, .36, 1) both; }
.pf-main > :nth-child(2), .pf-side > :nth-child(2) { animation-delay: .06s; }
.pf-main > :nth-child(3), .pf-side > :nth-child(3) { animation-delay: .12s; }
.pf-main > :nth-child(4), .pf-side > :nth-child(4) { animation-delay: .18s; }
.pf-main > :nth-child(n+5), .pf-side > :nth-child(n+5) { animation-delay: .24s; }
@keyframes pfUp { from { opacity: 0; transform: translateY(12px); } }
.pf-side { min-width: 0; }

/* --- daraja va unvonlar --- */
.pf-level { position: relative; overflow: hidden; padding: 18px 20px 20px; }
.pf-level::before {
  content: ""; position: absolute; right: -80px; top: -90px; width: 260px; height: 260px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--t1) 28%, transparent), transparent);
}
.pf-level-top { position: relative; display: flex; align-items: center; gap: 18px; }
.pf-level-badge {
  flex: none; width: 78px; height: 78px; border-radius: 22px; display: grid; place-items: center; align-content: center; color: #fff;
  background: linear-gradient(140deg, var(--t1), var(--t2)); text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--t2) 50%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.pf-level-badge small { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; opacity: .85; }
.pf-level-badge b { font: 800 34px/1 var(--display); }
.pf-level-tx { flex: 1; min-width: 0; }
.pf-level-title { font: 800 20px/1.2 var(--display); letter-spacing: -.01em; }
.pf-level-title .muted { font: 700 14px var(--sans); }
.pf-level-bar { height: 14px; margin: 10px 0 8px; border-radius: 8px; }
.pf-level-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.pf-ladder { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 20px; }
.pf-ladder::before { content: ""; position: absolute; left: 8%; right: 8%; top: 26px; height: 3px; border-radius: 2px; background: var(--surface-2); }
.pf-rung { position: relative; display: grid; justify-items: center; gap: 3px; text-align: center; min-width: 0; }
.pf-rung-ic {
  position: relative; z-index: 1; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); border: 3px solid var(--surface); transition: transform .2s;
}
.pf-rung-ic svg { width: 40px; height: 40px; }
.pf-rung.done .pf-rung-ic, .pf-rung.cur .pf-rung-ic { background: linear-gradient(140deg, var(--t1), var(--t2)); }
.pf-rung.cur .pf-rung-ic { transform: scale(1.14); box-shadow: 0 0 0 4px color-mix(in srgb, var(--t1) 40%, transparent), 0 8px 18px rgba(0, 0, 0, .35); }
.pf-rung:not(.done):not(.cur) .pf-rung-ic svg { opacity: .32; }
.pf-rung b { font-size: 12.5px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pf-rung small { font-size: 10.5px; color: var(--muted-2); font-weight: 800; }
.pf-rung:not(.done):not(.cur) b { color: var(--muted); }
.pf-rung.cur b { color: var(--t1); }

/* --- reyting grafigi --- */
.pf-rating { padding: 16px 16px 14px; }
.pf-rating .card-head { margin-bottom: 8px; }
.rp-d { font: 800 12px var(--sans); margin-left: 6px; vertical-align: 4px; letter-spacing: 0; }
.rp-d.up { color: var(--ok); }
.rp-d.down { color: var(--danger); }
.pf-page .rc-wrap { position: relative; border-top: 0; background: none; cursor: crosshair; touch-action: pan-y; }
.pf-page .rating-chart { height: 170px; }
.pf-page .rc-axis { left: 4px; right: auto; top: 2px; bottom: 6px; }
.rc-dot {
  position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; pointer-events: none;
  background: var(--rc); border: 2px solid var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rc) 30%, transparent);
}
.rc-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--text) 25%, transparent); pointer-events: none; }
.rc-tip {
  position: absolute; top: -6px; transform: translate(-50%, -100%); z-index: 2; pointer-events: none; white-space: nowrap;
  display: flex; gap: 8px; align-items: baseline; padding: 5px 10px; border-radius: 7px; font-size: 12px; color: var(--muted);
  background: var(--bg-2); box-shadow: var(--shadow); border: 1px solid var(--line);
}
.rc-tip b { color: var(--text); font: 800 14px var(--display); }
.pf-page .rc-empty { height: 150px; background: color-mix(in srgb, var(--surface-2) 60%, transparent); border: 1px dashed var(--line); }

/* --- yutuqlar --- */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.ach {
  position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; text-align: center;
  padding: 16px 10px 12px; border-radius: 14px; background: var(--surface-2); overflow: hidden; isolation: isolate;
  transition: transform .18s, box-shadow .18s;
}
.ach:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0, 0, 0, .25); }
.ach::before {
  content: ""; position: absolute; left: 50%; top: -40px; width: 170px; height: 150px; transform: translateX(-50%); z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--m) 38%, transparent), transparent);
}
.ach.m-none::before { display: none; }
.ach-medal {
  position: relative; width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .55), transparent 42%),
    conic-gradient(from 200deg, var(--m), color-mix(in srgb, var(--m) 50%, #000), var(--m), color-mix(in srgb, var(--m) 60%, #fff), var(--m));
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 255, 255, .25);
}
.ach-medal::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .3); }
.ach-medal > span { position: relative; z-index: 1; display: grid; place-items: center; }
.ach-medal .ic-img, .ach-medal .ic { width: 34px; height: 34px; }
.ach.m-none .ach-medal { background: var(--surface-3); box-shadow: none; }
.ach.m-none .ach-medal::after { background: var(--surface-2); box-shadow: none; }
.ach.m-none .ach-medal > span { filter: grayscale(1); opacity: .42; }
.ach.m-diamond .ach-medal { animation: pfGlow 2.6s ease-in-out infinite; }
@keyframes pfGlow { 50% { box-shadow: 0 6px 22px color-mix(in srgb, var(--m) 60%, transparent), inset 0 0 0 2px rgba(255, 255, 255, .4); } }
.ach-name { font-weight: 800; font-size: 13.5px; line-height: 1.2; margin-top: 6px; }
.ach-pips { display: flex; gap: 4px; }
.ach-pips i { width: 14px; height: 5px; border-radius: 3px; background: var(--surface-3); }
.ach-pips i.on { background: var(--m); }
.ach-desc { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--m); }
.ach.m-none .ach-desc { color: var(--muted-2); }
.ach-bar { width: 100%; height: 6px; border-radius: 4px; overflow: hidden; background: var(--surface-3); margin-top: 4px; }
.ach-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); animation: pfGrow 1s .2s cubic-bezier(.22, .61, .36, 1) both; }
.ach-next { font-size: 11.5px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }

/* --- keyingi maqsadlar --- */
.goal { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.goal + .goal { border-top: 1px solid var(--line); }
.goal-ic { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); }
.goal-tx { flex: 1; min-width: 0; }
.goal-name { display: flex; align-items: center; gap: 6px; font-size: 13.5px; flex-wrap: wrap; }
.goal-medal { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--m); }
.goal-d { font-size: 12px; color: var(--muted); margin: 1px 0 6px; }
.goal .ach-bar { margin: 0; }
.goal-left { flex: none; font-size: 12px; font-weight: 800; color: var(--accent-2); white-space: nowrap; }

/* --- seriya --- */
.pf-streak { position: relative; overflow: hidden; }
.pf-streak.lit { background: radial-gradient(120% 90% at 0% 0%, rgba(255, 128, 48, .22), transparent 60%), var(--surface); }
.pf-streak-top { display: flex; align-items: center; gap: 12px; }
.pf-streak-fl { display: grid; place-items: center; }
.pf-streak-fl .ic-img { width: 54px; height: 54px; }
.pf-streak:not(.lit) .pf-streak-fl { filter: grayscale(1); opacity: .5; }
.pf-streak.lit .pf-streak-fl { animation: pfFlick 1.8s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes pfFlick { 50% { transform: scale(1.07) rotate(-3deg); } }
.pf-streak-n { font: 800 40px/1 var(--display); letter-spacing: -.02em; }
.pf-streak.lit .pf-streak-n { color: #ff9a3d; }
.pf-streak-k { font-size: 13px; color: var(--muted); font-weight: 700; }
.pf-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 14px 0 12px; }
.sd { display: grid; justify-items: center; gap: 5px; }
.sd i { width: 100%; max-width: 30px; aspect-ratio: 1; border-radius: 50%; background: var(--surface-2); display: block; }
.sd.on i { background: radial-gradient(circle at 35% 30%, #ffd77e, #ff7a2f 72%); box-shadow: 0 0 12px rgba(255, 122, 47, .45); }
.sd.today i { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.sd small { font-size: 10.5px; color: var(--muted-2); font-weight: 800; }
.pf-streak-msg { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.pf-streak-msg.ok { color: var(--ok); margin-bottom: 0; }

/* --- faollik kalendari --- */
.hm { display: flex; gap: 6px; }
.hm-dow { display: grid; grid-template-rows: repeat(7, minmax(0, 1fr)); gap: 3px; padding-top: 19px; font-size: 10px; color: var(--muted-2); font-weight: 800; }
.hm-dow span { display: flex; align-items: center; line-height: 1; }
.hm-main { flex: 1; min-width: 0; }
.hm-months { position: relative; height: 16px; margin-bottom: 3px; font-size: 10.5px; color: var(--muted-2); font-weight: 800; }
.hm-months span { position: absolute; top: 0; white-space: nowrap; }
.hm-grid { display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); gap: 3px; }
.hm-col { display: grid; gap: 3px; }
.hm-c { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--surface-2); }
.hm-c.l1 { background: rgba(111, 166, 80, .38); }
.hm-c.l2 { background: rgba(111, 166, 80, .62); }
.hm-c.l3 { background: #74b552; }
.hm-c.l4 { background: #9be06e; box-shadow: 0 0 8px rgba(155, 224, 110, .45); }
.hm-c.fut { background: transparent; }
.hm-grid .hm-c:not(.fut):hover { outline: 2px solid var(--text); outline-offset: -1px; }
.hm-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.hm-foot b { color: var(--text); }
.hm-legend { display: flex; align-items: center; gap: 3px; font-size: 11px; }
.hm-legend .hm-c { width: 11px; }

/* --- o'yin natijalari --- */
.pf-res-top { display: flex; align-items: center; gap: 16px; }
.pf-donut { position: relative; flex: none; width: 112px; height: 112px; }
.pf-donut svg { width: 100%; height: 100%; display: block; }
.pf-donut-c { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; }
.pf-donut-c b { font: 800 25px/1 var(--display); }
.pf-donut-c small { font-size: 10px; color: var(--muted); font-weight: 700; max-width: 74px; line-height: 1.15; margin-top: 2px; }
.pf-wdl { flex: 1; min-width: 0; display: grid; gap: 9px; }
.wdl { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.wdl i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.wdl.w i { background: var(--ok); }
.wdl.d i { background: #8b8987; }
.wdl.l i { background: var(--danger); }
.wdl b { margin-left: auto; font-size: 15px; color: var(--text); }
html[dir="rtl"] .wdl b { margin-left: 0; margin-right: auto; }
.pf-form { margin-top: 16px; }
.pf-form small, .pf-sides small { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.pf-form-row { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.fm { width: 23px; height: 23px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 14px; color: #fff; }
.fm.w { background: var(--ok); }
.fm.d { background: #8b8987; }
.fm.l { background: var(--danger); }
.pf-sides { display: grid; gap: 8px; margin-top: 14px; }
.pf-side-row { display: grid; grid-template-columns: 12px auto minmax(0, 1fr) 38px; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.pf-side-bar { height: 8px; border-radius: 5px; overflow: hidden; background: var(--surface-2); }
.pf-side-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ok); animation: pfGrow 1s .2s both; }
.pf-side-row b { text-align: right; color: var(--text); }
.pf-none.col { flex-direction: column; text-align: center; font-size: 14px; }

/* --- masalalar --- */
.pf-acc { margin-bottom: 12px; }
.pf-acc-tx { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.pf-acc-tx b { color: var(--text); font: 800 18px var(--display); }
.pf-acc-bar { height: 8px; border-radius: 5px; overflow: hidden; background: var(--surface-2); }
.pf-acc-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e8b84b, var(--ok)); animation: pfGrow 1s .2s both; }

/* --- yorug' mavzu --- */
html[data-theme="light"] .pf-hero .pf-ava { border-color: #fff; }
html[data-theme="light"] .pf-page .m-bronze { --m: #c27a3c; }
html[data-theme="light"] .pf-page .m-silver { --m: #8d9aaa; }
html[data-theme="light"] .pf-page .m-gold { --m: #d7a312; }
html[data-theme="light"] .pf-page .m-diamond { --m: #22a9d8; }
html[data-theme="light"] .ach { background: #f4f3f1; }
html[data-theme="light"] .ach:hover { box-shadow: 0 10px 22px rgba(31, 29, 26, .12); }
html[data-theme="light"] .rc-tip { background: #fff; }

@media (max-width: 1100px) {
  .pf-kpi { padding: 12px; gap: 10px; }
  .pf-kpi-ic { width: 40px; height: 40px; }
  .pf-kpi-v { font-size: 23px; }
}
/* planshet/telefon: bitta ustun — eng motivatsion kartalar (daraja, seriya, maqsadlar) tepada */
@media (max-width: 1000px) {
  .pf-grid { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
  .pf-main, .pf-side { display: contents; }
  .pf-main > *, .pf-side > * { margin-top: 0 !important; min-width: 0; }
  .pf-level { order: 1; } .pf-streak { order: 2; } .pf-goals { order: 3; } .pf-rating { order: 4; }
  .pf-ach { order: 5; } .pf-res { order: 6; } .pf-heat { order: 7; } .pf-tasks { order: 8; }
  .pf-pz { order: 9; } .pf-hist { order: 10; } .pf-groups { order: 11; } .pf-theme { order: 12; }
}
@media (max-width: 860px) {
  .pf-banner { height: 116px; }
  .pf-banner-piece { width: 140px; height: 140px; right: 2%; bottom: -24px; }
  .pf-banner-tier { left: 14px; top: 12px; }
  .pf-hero-body { flex-wrap: wrap; gap: 12px 14px; padding: 0 16px; margin-top: -50px; }
  .pf-ava-wrap { width: 108px; height: 108px; padding: 4px; border-radius: 20px; }
  .pf-hero .pf-ava { border-radius: 16px; }
  .pf-ava-lvl { min-width: 38px; height: 38px; font-size: 16px; right: -10px; bottom: -10px; border-width: 3px; }
  .pf-hero .pf-info { flex: 1 1 100%; padding-top: 0; }
  .pf-hero .pf-name { font-size: 23px; }
  .pf-hero .pf-actions { padding-top: 0; width: 100%; }
  .pf-hero .pf-actions .fr-actions { flex-direction: row; flex-wrap: wrap; }
  .pf-xp { max-width: none; }
  .pf-kpis { grid-template-columns: 1fr 1fr; margin: 16px 16px 0; }
  .pf-kpi:nth-child(3) { border-left: 0; }
  .pf-kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .pf-kpi-v { font-size: 21px; }
  .pf-kpi-ic { width: 36px; height: 36px; border-radius: 10px; }
  .pf-kpi-ic .ic-img { width: 24px; height: 24px; }
  .pf-hero .pf-tabs { margin-top: 12px; padding: 0 6px; }
  .pf-level { padding: 16px; }
  .pf-level-badge { width: 64px; height: 64px; border-radius: 18px; }
  .pf-level-badge b { font-size: 28px; }
  .pf-level-title { font-size: 17px; }
  .pf-rung-ic { width: 42px; height: 42px; border-width: 2px; }
  .pf-rung-ic svg { width: 32px; height: 32px; }
  .pf-ladder::before { top: 20px; }
  .pf-rung b { font-size: 11px; }
  .pf-page .rating-chart { height: 140px; }
  .ach-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .ach { padding: 12px 6px 10px; border-radius: 12px; }
  .ach-medal { width: 52px; height: 52px; }
  .ach-medal::after { inset: 6px; }
  .ach-medal .ic-img, .ach-medal .ic { width: 26px; height: 26px; }
  .ach-name { font-size: 12.5px; }
  .ach-desc { font-size: 9.5px; }
  .hm-grid, .hm-col, .hm-dow { gap: 2px; }
  .hm-c { border-radius: 2px; }
}
@media (max-width: 420px) {
  .pf-banner-tier b { font-size: 14px; }
  .pf-kpi { padding: 10px; gap: 8px; }
  .pf-kpi-ic { display: none; }
  .pf-res-top { gap: 12px; }
  .pf-donut { width: 96px; height: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-banner-board, .pf-xp-bar i, .pf-level-bar i, .pf-xp-bar i::after, .pf-level-bar i::after, .pf-body .card,
  .ach-bar i, .ach.m-diamond .ach-medal, .pf-streak.lit .pf-streak-fl, .pf-side-bar i, .pf-acc-bar i { animation: none; }
}

/* ================= Premium: oltin profil (Telegram Premium kabi ajralib turadi) ================= */
@property --pf-ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes pfAng { to { --pf-ang: 360deg; } }
.gold-text {
  background: linear-gradient(100deg, #c08a12 0%, #ffe9a3 22%, #f5c542 40%, #fff7da 52%, #e0aa1c 68%, #c08a12 100%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text;
  color: transparent !important; -webkit-text-fill-color: transparent; animation: goldText 5s linear infinite;
}
html[data-theme="light"] .gold-text { background-image: linear-gradient(100deg, #8a5a00 0%, #d49a10 25%, #a87300 42%, #f0b92b 52%, #8a5a00 75%, #8a5a00 100%); }
@keyframes goldText { to { background-position: -220% 0; } }

/* toj nishoni — bosiladi */
.prem-badge { cursor: pointer; transition: transform .15s; filter: drop-shadow(0 0 3px rgba(245, 183, 0, .55)); animation: badgeGlow 2.6s ease-in-out infinite; }
.prem-badge:hover { transform: scale(1.18) rotate(-8deg); }
.prem-badge.big { width: 30px; height: 30px; margin-left: 0; vertical-align: -5px; }
.prem-badge.big .ic, .prem-badge.big img { width: 30px; height: 30px; }
@keyframes badgeGlow { 50% { filter: drop-shadow(0 0 8px rgba(255, 210, 80, .95)); } }

/* --- profil sarlavhasi --- */
.pf-hero.is-prem {
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--pf-ang), var(--p2), var(--p1), #fff6d6, var(--p1), var(--p2), var(--p3), var(--p2)) border-box;
  animation: pfAng 6s linear infinite;
  box-shadow: 0 22px 60px -18px color-mix(in srgb, var(--p2) 70%, transparent);
}
.pf-hero.is-prem .pf-banner, .gp-prev-banner {
  background:
    radial-gradient(70% 150% at 86% 0%, color-mix(in srgb, var(--p1) 80%, #fff) 0%, transparent 58%),
    radial-gradient(55% 130% at 8% 120%, color-mix(in srgb, var(--p2) 75%, transparent), transparent 70%),
    linear-gradient(115deg, var(--p3) 0%, var(--p2) 48%, var(--p1) 100%);
}
.pf-pattern {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='%23fff' fill-opacity='.34'%3E%3Cpath d='M9 27 7 16l6 5 5-8 5 8 6-5-2 11z'/%3E%3Cpath d='m46 38 1.7 4.6 4.6 1.7-4.6 1.7-1.7 4.6-1.7-4.6-4.6-1.7 4.6-1.7z'/%3E%3Ccircle cx='50' cy='13' r='1.7'/%3E%3Ccircle cx='22' cy='51' r='1.3'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 170% at 16% 100%, #000 0%, rgba(0, 0, 0, .55) 40%, transparent 75%);
  mask-image: radial-gradient(120% 170% at 16% 100%, #000 0%, rgba(0, 0, 0, .55) 40%, transparent 75%);
  animation: pfPattern 46s linear infinite;
}
@keyframes pfPattern { to { background-position: 64px -64px; } }
.spk {
  position: absolute; z-index: 2; width: var(--sz, 10px); height: var(--sz, 10px); pointer-events: none; opacity: 0;
  background: #fff; filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 8px rgba(255, 226, 140, .9));
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: spk 3s ease-in-out infinite;
}
@keyframes spk { 0%, 100% { opacity: 0; transform: scale(.2) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(60deg); } }
.pf-hero.is-prem .pf-banner-piece::before { background: radial-gradient(closest-side, rgba(255, 228, 150, .9), transparent); }
.pf-hero.is-prem .pf-banner-piece svg { filter: sepia(1) saturate(3.4) hue-rotate(-10deg) brightness(1.06); }
.pf-banner-pills { position: absolute; left: 22px; top: 16px; z-index: 3; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-banner-pills .pf-banner-tier { position: static; }
.pf-prem-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px 6px 8px; border-radius: 999px; cursor: pointer;
  font: 900 12px/1 var(--sans); letter-spacing: .16em; color: #3a2700; white-space: nowrap;
  background: linear-gradient(180deg, #fff3b8, #f5c542 55%, #d49a10);
  box-shadow: 0 4px 14px rgba(245, 183, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .75);
}
.pf-prem-pill .ic-img, .pf-prem-pill .ic { width: 18px; height: 18px; }
.pf-paint {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px 7px 10px; border: 0; border-radius: 999px; cursor: pointer;
  color: #fff; font-weight: 800; font-size: 12.5px; background: rgba(0, 0, 0, .3);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
}
.pf-paint:hover { background: rgba(0, 0, 0, .45); }
.pf-paint .ic { width: 15px; height: 15px; }
.pf-hero.is-prem .pf-ava-wrap, .gp-prev-ava {
  background: conic-gradient(from var(--pf-ang), #fff3c4, #d4a017, #7a4e00, #ffe27a, #b8860b, #fff3c4);
  animation: pfAng 4s linear infinite;
}
.pf-hero.is-prem .pf-ava-wrap { box-shadow: 0 0 0 4px color-mix(in srgb, var(--p1) 30%, transparent), 0 14px 40px rgba(212, 160, 23, .42); }
.pf-ava-crown {
  position: absolute; z-index: 5; top: -22px; right: -22px; width: 56px; height: 56px; pointer-events: none;
  transform: rotate(22deg); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); animation: crownBob 3.2s ease-in-out infinite;
}
.pf-ava-crown .ic-img, .pf-ava-crown .ic { width: 100%; height: 100%; }
@keyframes crownBob { 50% { transform: rotate(16deg) translateY(-4px); } }
.pf-hero.is-prem .pf-ava-lvl { background: linear-gradient(140deg, #ffe27a, #b8860b); color: #3a2700; text-shadow: none; }
.pf-hero.is-prem .pf-name { padding-bottom: 2px; }
.pf-hero.is-prem .pf-xp-lvl { color: #f5c542; }
.pf-hero.is-prem .pf-xp-bar i { background: linear-gradient(90deg, #a87300, #f5c542, #fff1b0); }
.pf-hero.is-prem .pf-kpis { border-color: rgba(245, 197, 66, .3); background: linear-gradient(180deg, rgba(245, 197, 66, .07), transparent); }
.pf-hero.is-prem .pf-tab.active { border-bottom-color: #f5c542; }
.pf-gold-cta { white-space: nowrap; }

/* --- "Oltin a'zo" medali --- */
.ach.ach-prem { cursor: pointer; background: linear-gradient(160deg, rgba(255, 215, 106, .24), rgba(184, 134, 11, .08)), var(--surface-2); box-shadow: inset 0 0 0 1px rgba(245, 197, 66, .5); }
.ach.ach-prem .ach-medal { animation: pfGlow 2.6s ease-in-out infinite; }
.ach.ach-prem .ach-desc { color: #f5c542; }
.ach.ach-prem.locked { background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(245, 197, 66, .35); }
.ach.ach-prem.locked .ach-desc { color: #c9a24a; }
.ach.ach-prem.locked .btn { margin-top: 6px; min-height: 28px; }

/* --- oltin profil namunasi va taklif kartasi --- */
.gp-prev {
  position: relative; border-radius: 16px; overflow: hidden; border: 2px solid transparent; text-align: left;
  background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
    conic-gradient(from var(--pf-ang), var(--p2), var(--p1), #fff6d6, var(--p1), var(--p2), var(--p3), var(--p2)) border-box;
  animation: pfAng 6s linear infinite;
}
.gp-prev-banner { position: relative; height: 66px; overflow: hidden; }
.gp-prev-banner .pf-prem-pill { position: absolute; right: 10px; top: 10px; z-index: 3; padding: 4px 9px 4px 6px; font-size: 10px; }
.gp-prev-banner .pf-prem-pill .ic-img { width: 14px; height: 14px; }
.gp-prev-body { position: relative; z-index: 3; display: flex; align-items: flex-end; gap: 12px; padding: 0 14px 14px; margin-top: -30px; }
.gp-prev-ava { position: relative; flex: none; width: 70px; height: 70px; padding: 3px; border-radius: 17px; box-shadow: 0 10px 24px rgba(212, 160, 23, .35); }
.gp-prev-ava .pf-ava { width: 100%; height: 100%; border-radius: 14px; border: 2px solid var(--surface-2); background: #e8e6e3; }
.gp-prev-ava .pf-ava-crown { width: 34px; height: 34px; top: -15px; right: -15px; }
.gp-prev-tx { min-width: 0; padding-bottom: 3px; }
.gp-prev-name { display: flex; align-items: center; gap: 4px; font: 800 17px/1.2 var(--display); min-width: 0; }
.gp-prev-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gp-prev-name .prem-badge.big { width: 22px; height: 22px; }
.gp-prev-name .prem-badge.big img { width: 22px; height: 22px; }
.gp-prev.big .gp-prev-banner { height: 116px; }
.gp-prev.big .gp-prev-body { margin-top: -52px; padding: 0 20px 20px; gap: 16px; }
.gp-prev.big .gp-prev-ava { width: 112px; height: 112px; padding: 4px; border-radius: 22px; }
.gp-prev.big .gp-prev-ava .pf-ava { border-radius: 18px; border-width: 3px; }
.gp-prev.big .gp-prev-ava .pf-ava-crown { width: 48px; height: 48px; top: -20px; right: -20px; }
.gp-prev.big .gp-prev-name { font-size: 25px; }
.gp-prev.big .gp-prev-name .prem-badge.big, .gp-prev.big .gp-prev-name .prem-badge.big img { width: 28px; height: 28px; }
.gp-prev.big .gp-prev-banner .pf-prem-pill { padding: 6px 12px 6px 8px; font-size: 11.5px; }

.pf-goldad {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 80% at 100% 0%, rgba(255, 215, 106, .2), transparent 60%), var(--surface);
  box-shadow: inset 0 0 0 1px rgba(245, 197, 66, .38);
}
.ga-kicker { display: inline-flex; align-items: center; gap: 6px; font: 900 11px/1 var(--sans); letter-spacing: .18em; color: #f5c542; }
html[data-theme="light"] .ga-kicker { color: #a87300; }
.ga-kicker .ic-img, .ga-kicker .ic { width: 18px; height: 18px; }
.pf-goldad h3 { margin: 8px 0 12px; font: 800 19px/1.2 var(--display); letter-spacing: -.01em; }
.ga-perks { list-style: none; margin: 14px 0 16px; padding: 0; display: grid; gap: 8px; }
.ga-perks li { position: relative; padding-left: 24px; font-size: 13px; font-weight: 600; line-height: 1.35; }
html[dir="rtl"] .ga-perks li { padding-left: 0; padding-right: 24px; }
.ga-perks li::before { content: "✦"; position: absolute; left: 3px; top: -1px; color: #f5c542; font-size: 15px; }
html[dir="rtl"] .ga-perks li::before { left: auto; right: 3px; }
.ga-price { margin-top: 10px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted); }

/* --- Telegram kabi "Premium a'zo" oynasi --- */
.modal.pi-modal { max-width: 400px; }
.modal.pi-modal .m-head h3:empty, .modal.pf-cpick-modal .m-head h3:empty { display: none; }
.pi { text-align: center; padding: 4px 4px 6px; }
.pi-crown { position: relative; width: 104px; height: 104px; margin: 0 auto 10px; }
.pi-crown > span { display: block; animation: crownBob2 3s ease-in-out infinite; }
.pi-crown .ic-img, .pi-crown .ic { width: 104px; height: 104px; filter: drop-shadow(0 12px 26px rgba(245, 183, 0, .6)); }
@keyframes crownBob2 { 50% { transform: translateY(-5px) rotate(-4deg); } }
.pi-spk { position: absolute; width: 12px; height: 12px; background: #ffe27a; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); animation: spk 2.6s ease-in-out infinite; }
.pi-spk.s0 { left: -14px; top: 18px; } .pi-spk.s1 { right: -16px; top: 6px; animation-delay: .5s; width: 16px; height: 16px; }
.pi-spk.s2 { left: 2px; bottom: -6px; animation-delay: 1s; } .pi-spk.s3 { right: -4px; bottom: 4px; animation-delay: 1.5s; width: 9px; height: 9px; }
.pi-spk.s4 { left: 44%; top: -14px; animation-delay: 2s; width: 9px; height: 9px; } .pi-spk.s5 { left: -30px; top: 60px; animation-delay: .8s; width: 8px; height: 8px; }
.pi h2 { margin: 4px 0 8px; font: 800 21px/1.25 var(--display); }
.pi p { margin: 0 0 18px; font-size: 14px; line-height: 1.45; }
.pi-own { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; font-weight: 800; color: var(--ok); background: rgba(111, 166, 80, .15); }

/* --- profil rangini tanlash --- */
.pf-cpick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.pf-sw {
  display: grid; justify-items: center; gap: 8px; padding: 12px 6px; border-radius: 12px; border: 2px solid transparent;
  background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 13px; cursor: pointer;
}
.pf-sw:hover { background: var(--surface-3); }
.pf-sw.on { border-color: #f5c542; box-shadow: 0 0 0 3px rgba(245, 197, 66, .2); }
.pf-sw i { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--p1), var(--p2) 58%, var(--p3)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25), 0 6px 14px rgba(0, 0, 0, .3); }

/* --- premium sahifasi: ko'rgazma --- */
.pr-showcase {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 26px; align-items: center;
  margin: 0 0 22px; padding: 24px; border-radius: 16px;
  background: radial-gradient(90% 120% at 100% 0%, rgba(255, 215, 106, .16), transparent 60%), var(--surface);
  box-shadow: inset 0 0 0 1px rgba(245, 197, 66, .3);
}
.pr-showcase h2 { margin: 10px 0 4px; font: 800 26px/1.15 var(--display); letter-spacing: -.02em; }
.pr-showcase .ga-perks { margin-bottom: 0; }

/* --- reyting jadvali va boshqa joylar --- */
.rk-row.prem { background: linear-gradient(90deg, rgba(245, 197, 66, .14), transparent 70%); box-shadow: inset 3px 0 0 #f5c542; }
.rk-pod.prem .rk-pod-ava .avatar { box-shadow: 0 0 0 3px #f5c542, 0 0 22px rgba(245, 197, 66, .55); }

@media (max-width: 1000px) {
  .pf-goldad, .pf-goals { order: 3; }
}
@media (max-width: 860px) {
  .pf-banner-pills { left: 14px; top: 12px; gap: 6px; }
  .pf-prem-pill { padding: 5px 10px 5px 6px; font-size: 10.5px; letter-spacing: .12em; }
  .pf-prem-pill .ic-img { width: 15px; height: 15px; }
  .pf-paint { padding: 6px 10px; font-size: 11.5px; }
  .pf-ava-crown { width: 42px; height: 42px; top: -17px; right: -17px; }
  .prem-badge.big, .prem-badge.big img { width: 24px; height: 24px; }
  .pr-showcase { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .pr-showcase h2 { font-size: 21px; }
}
@media (max-width: 420px) {
  .pf-paint span:last-child { display: none; }
  .pf-banner-tier { padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .gold-text, .prem-badge, .pf-hero.is-prem, .pf-hero.is-prem .pf-ava-wrap, .gp-prev, .gp-prev-ava, .pf-pattern, .spk,
  .pf-ava-crown, .pi-crown > span, .pi-spk, .ach.ach-prem .ach-medal { animation: none; }
  .spk { opacity: .8; }
}

/* ================= "Yana" menyusidagi bo'limlar (Kuzatish, Hamjamiyat) ================= */
.more-pop .mp-group .mp-caret { margin-left: auto; display: flex; opacity: .5; transition: transform .15s, opacity .15s; }
.more-pop .mp-group .mp-caret .ic { width: 16px; height: 16px; }
.more-pop .mp-group:hover .mp-caret, .more-pop .mp-group.sub-open .mp-caret { opacity: .9; }
.more-pop .mp-group.sub-open { background: rgba(255, 255, 255, .07); color: #fff; }
html[data-theme="light"] .more-pop .mp-group.sub-open { background: var(--surface-2); color: var(--text); }
html[dir="rtl"] .more-pop .mp-group .mp-caret { margin-left: 0; margin-right: auto; transform: scaleX(-1); }
.more-pop .mp-subs { display: none; }
.more-sub { width: 230px; animation: popSide .14s ease; }
@keyframes popSide { from { opacity: 0; transform: translateX(-6px); } }
@media (max-width: 860px) {
  .more-pop .mp-group.open .mp-caret { transform: rotate(90deg); opacity: .9; }
  .more-pop .mp-group.open + .mp-subs {
    display: grid; gap: 2px; margin: 0 0 4px 22px; padding-left: 8px; border-left: 2px solid var(--line);
  }
  html[dir="rtl"] .more-pop .mp-group.open + .mp-subs { margin: 0 22px 4px 0; padding: 0 8px 0 0; border-left: 0; border-right: 2px solid var(--line); }
  .more-pop .mp-subs .side-item { min-height: 42px; }
}

/* ================= Study (tahlil taxtasi) — boshqaruv paneli ================= */
.st-foot { display: grid; gap: 10px; }
.st-foot .gp-nb { height: 44px; }
.st-foot .gp-nb.dim { cursor: default; }
.st-foot .gp-actions { min-height: 30px; }

/* ================= Kirish: Google tugmasi, login qoidasi, Google bilan ro'yxatdan o'tish ================= */
.ld-google { display: grid; gap: 12px; }
.ld-google-btn { display: flex; justify-content: center; min-height: 44px; }
.ld-google-btn > div { max-width: 100%; }
.ld-or { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ld-or::before, .ld-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ld-hint { margin-top: -6px; padding: 0 4px; font-size: 12.5px; color: var(--muted-2); line-height: 1.4; }
.ld-gs-head { display: grid; gap: 4px; text-align: center; }
.ld-gs-head b { font-size: 18px; }
.ld-gs-email {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; overflow: hidden;
}
.ld-gs-email > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-gs-email .ic { display: block; }
.ld-gs-ok { color: var(--green-2); display: flex; }

/* ================= Coach (shaxsiy murabbiy) ================= */
.gp.cch .an-left { width: min(calc(100vh - 136px), calc(100% - 460px)); }
.cch-panel { background: var(--surface); }
html:not([data-theme="light"]) .cch-panel { background: #262421; }
.cch-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.cch-ava { width: 52px; height: 52px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.cch-ava .ic-img { width: 44px; height: 44px; }
.cch-head-tx { display: grid; gap: 2px; min-width: 0; }
.cch-head-tx b { font-size: 18px; }
.cch-eng { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cch-warn { color: var(--warn, #e6912c); font-weight: 700; }
.cch-tabs { grid-template-columns: repeat(2, 1fr); }
.cch-feed { flex: 1; min-height: 0; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.cch-foot .gp-actions { gap: 4px 12px; }

/* xabarlar */
.cch-msg {
  position: relative; background: var(--surface-2); border-radius: 12px; padding: 11px 13px; font-size: 14px; line-height: 1.5;
  border-inline-start: 4px solid transparent; animation: ld-in .22s ease;
}
html:not([data-theme="light"]) .cch-msg { background: #312e2b; }
.cch-msg p { margin: 0; }
.cch-msg p + p { margin-top: 6px; }
.cch-msg-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 15px; }
.cch-msg-h b { font-weight: 800; }
.cch-cls { display: flex; flex: none; }
.cch-cls .ic-img { width: 22px; height: 22px; }
.cch-san { margin-left: auto; font-weight: 800; font-family: var(--display); color: var(--muted); }
.cch-feed .cch-msg.intro { background: #fff; color: #312e2b; border-inline-start-color: var(--green); font-weight: 600; }
.cch-feed .cch-msg.note { background: transparent; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; padding: 8px 12px; }
.cch-msg.opp { font-size: 13.5px; }
.cch-msg.opp .cch-msg-h { font-size: 13.5px; color: var(--muted); }
.cch-msg.opp.threat { border-inline-start-color: #e0574a; }
.cch-msg.opp.chance { border-inline-start-color: #1baaa6; }
.cch-msg.hint { border-inline-start-color: #5b9fd6; }
.cch-msg.cls-best, .cch-msg.cls-great, .cch-msg.cls-excellent { border-inline-start-color: #81b64c; }
.cch-msg.cls-good { border-inline-start-color: #95b776; }
.cch-msg.cls-book { border-inline-start-color: #a88764; }
.cch-msg.cls-inaccuracy { border-inline-start-color: #f0c15c; }
.cch-msg.cls-mistake { border-inline-start-color: #e6912c; }
.cch-msg.cls-blunder { border-inline-start-color: #ca3431; }
.cch-msg.over { border-inline-start-color: var(--green); }
.cch-msg.over.loss { border-inline-start-color: #ca3431; }
.cch-msg.over.draw { border-inline-start-color: #9e9c9a; }
.cch-tip { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(240, 193, 92, .14); font-size: 13px; }
.cch-tip > span:first-child { display: flex; flex: none; }
.cch-tip .ic-img { width: 18px; height: 18px; }
.cch-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.cch-msg.thinking { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; }
.cch-dots { display: inline-flex; gap: 4px; }
.cch-dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .3; animation: cchDot 1s infinite; }
.cch-dots i:nth-child(2) { animation-delay: .15s; }
.cch-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes cchDot { 30% { opacity: 1; transform: translateY(-2px); } }

/* o'yin sozlamasi */
.cch-setup { display: grid; gap: 10px; }
.cch-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); margin-top: 4px; }
.cch-levels { display: grid; gap: 6px; }
.cch-level {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 2px solid transparent;
  background: var(--surface-2); color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
html:not([data-theme="light"]) .cch-level { background: #312e2b; }
.cch-level:hover { border-color: var(--line); }
.cch-level.on { border-color: var(--green); }
.cch-level.locked { opacity: .7; }
.cch-level-ic { display: flex; flex: none; }
.cch-level-ic .ic-img { width: 28px; height: 28px; }
.cch-level-tx { display: grid; gap: 1px; flex: 1; min-width: 0; }
.cch-colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cch-color {
  display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border-radius: 10px; border: 2px solid transparent;
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
html:not([data-theme="light"]) .cch-color { background: #312e2b; }
.cch-color.on { border-color: var(--green); }
.cch-color img { width: 34px; height: 34px; }
.cch-rand { width: 34px; height: 34px; display: grid; place-items: center; font-size: 20px; font-weight: 800; border-radius: 6px; background: linear-gradient(90deg, #fff 50%, #312e2b 50%); color: #888; }
.cch-start { margin: 0; }
.cch-nav { grid-template-columns: repeat(4, 1fr); }
.cch-resume { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
.cch-bot-ava { display: grid; place-items: center; background: var(--surface-2); }
.cch-bot-ava .ic-img { width: 28px; height: 28px; }

/* o'yin yakuni */
.cch-sum { display: flex; align-items: center; gap: 14px; margin: 10px 0 6px; flex-wrap: wrap; }
.cch-acc { display: grid; justify-items: center; padding: 6px 12px; border-radius: 8px; background: #fff; color: #312e2b; }
.cch-acc b { font-size: 22px; font-family: var(--display); line-height: 1.1; }
.cch-acc span { font-size: 11px; font-weight: 700; }
.cch-cnts { display: flex; gap: 10px; flex-wrap: wrap; }
.cch-cnt { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.cch-tips { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; }
html[dir="rtl"] .cch-tips { padding-left: 0; padding-right: 18px; }

/* pozitsiya tahlili */
.cch-strip {
  display: flex; align-items: center; gap: 1px; min-height: 38px; padding: 4px 6px; overflow-x: auto; white-space: nowrap; flex: none;
  border-radius: 8px; background: var(--surface-2); scrollbar-width: thin;
}
html:not([data-theme="light"]) .cch-strip { background: #312e2b; }
.cch-strip .ms-n { flex: none; margin: 0 2px 0 8px; font-size: 12.5px; font-weight: 700; color: var(--muted-2); }
.cch-strip .ms-n:first-child { margin-left: 2px; }
.cch-strip .ms-mv { flex: none; border: 0; background: none; color: var(--text); font: inherit; font-size: 14.5px; font-weight: 700; padding: 4px 7px; border-radius: 5px; cursor: pointer; }
.cch-strip .ms-mv.cur { background: var(--surface-3); box-shadow: inset 0 -2px 0 rgba(255, 255, 255, .3); }
.cch-strip .ms-empty { color: var(--muted); font-size: 13px; padding: 0 6px; }
.cch-report { display: grid; gap: 10px; }
.cch-verdict { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border-inline-start: 4px solid #9e9c9a; }
html:not([data-theme="light"]) .cch-verdict { background: #312e2b; }
.cch-verdict.w { border-inline-start-color: #f0efec; }
.cch-verdict.b { border-inline-start-color: #1e1c1a; box-shadow: inset 0 0 0 1px var(--line); }
.cch-v-main { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.cch-v-main b { font-size: 16px; }
.cch-sec { display: grid; gap: 4px; padding: 2px 2px 8px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.5; }
.cch-sec:last-child { border-bottom: 0; }
.cch-sec p { margin: 0; }
.cch-sec-h { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.cch-sec-h > span { display: flex; }
.cch-sec-h .ic-img { width: 20px; height: 20px; }
.cch-cand {
  display: grid; gap: 3px; text-align: left; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: none; color: var(--text); font: inherit; cursor: pointer;
}
.cch-cand:hover { background: var(--surface-2); }
.cch-cand.top { border-color: rgba(129, 182, 76, .7); }
.cch-cand-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cch-cand-h b { font-size: 15px; }
.cch-cand-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cch-panel.explain .cch-foot { gap: 8px; }
html[dir="rtl"] .cch-level, html[dir="rtl"] .cch-cand { text-align: right; }

@media (max-width: 1100px) {
  .gp.cch .an-left { width: min(calc(100vh - 136px), calc(100% - 380px)); }
}
@media (max-width: 900px) {
  .gp.cch .an-left { width: min(100%, calc(100vh - 220px)); }
}
@media (max-width: 860px) {
  .gp.cch .an-left { width: 100%; padding: 0 6px; }
  .cch-feed { max-height: none; overflow: visible; }
  .cch-head { padding: 10px 12px; }
}

/* ================= Masala yechish oynasi (lichess "study" uslubida, sodda) ================= */
.gp.pzv .an-left { width: min(calc(100vh - 40px), calc(100% - 420px)); }
.pzv-panel { flex-basis: 400px; background: var(--surface); }
html:not([data-theme="light"]) .pzv-panel { background: #262421; }
.pzv-head { position: relative; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); flex: none; }
.pzv-back { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); flex: none; }
.pzv-back:hover { background: var(--surface-2); color: var(--text); }
.pzv-back .ic { width: 20px; height: 20px; }
.pzv-head-tx { display: grid; gap: 1px; min-width: 0; }
.pzv-head-tx b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pzv-prog { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; }
.pzv-prog i { display: block; height: 100%; background: var(--green); }
.pzv-note { display: flex; gap: 8px; align-items: flex-start; padding: 9px 14px; font-size: 13px; line-height: 1.45; color: var(--muted); border-bottom: 1px solid var(--line); background: rgba(240, 193, 92, .08); flex: none; }
.pzv-note > span:first-child { display: flex; flex: none; }
.pzv-note .ic-img { width: 18px; height: 18px; }
.pzv-moves { flex: 1 1 auto; min-height: 120px; overflow-y: auto; font-size: 15px; font-variant-numeric: tabular-nums; }
.pzv-row { display: grid; grid-template-columns: 48px 1fr 1fr; border-bottom: 1px solid var(--line); }
.pzv-n { display: grid; place-items: center; color: var(--muted-2); font-size: 13px; background: var(--surface-2); }
html:not([data-theme="light"]) .pzv-n { background: rgba(255, 255, 255, .03); }
.pzv-m { text-align: left; padding: 7px 14px; border: 0; background: none; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; min-height: 36px; }
.pzv-m:hover { background: var(--surface-2); }
.pzv-m.cur, .pzv-m.cur:hover { background: #3692e7; color: #fff; }
.pzv-m.empty { cursor: default; background: none; color: var(--muted-2); }
.pzv-box { flex: none; display: grid; gap: 10px; padding: 18px 16px 12px; border-top: 1px solid var(--line); background: var(--surface-2); }
html:not([data-theme="light"]) .pzv-box { background: #2b2926; }
.pzv-turn { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.pzv-king { width: 58px; height: 58px; flex: none; display: grid; place-items: center; }
.pzv-king svg { width: 100%; height: 100%; display: block; }
.pzv-king .ic-img { width: 52px; height: 52px; }
.pzv-turn-tx { display: grid; gap: 3px; min-width: 0; }
.pzv-turn-tx b { font-size: 20px; line-height: 1.2; }
.pzv-turn-tx span { color: var(--muted); font-size: 14px; line-height: 1.4; }
.pzv-badge { width: 50px; height: 50px; margin: 4px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; }
.pzv-badge.good { background: #629924; }
.pzv-badge.bad { background: #cc3333; }
.pzv-badge.shown { background: #3692e7; }
.pzv-badge .ic { width: 26px; height: 26px; }
.pzv-turn.good b, .pzv-turn.solved b { color: #629924; }
.pzv-turn.wrong b { color: #cc3333; }
html:not([data-theme="light"]) .pzv-turn.good b, html:not([data-theme="light"]) .pzv-turn.solved b { color: #81b64c; }
html:not([data-theme="light"]) .pzv-turn.wrong b { color: #ee6b55; }
.pzv-links { display: flex; flex-wrap: wrap; gap: 6px 26px; align-items: center; justify-content: center; min-height: 40px; }
.pzv-link { border: 0; background: none; color: #3692e7; font: inherit; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 8px 4px; cursor: pointer; }
html:not([data-theme="light"]) .pzv-link { color: #5ba6ee; }
.pzv-link:hover { text-decoration: underline; }
.pzv-link.off { opacity: .4; pointer-events: none; }
.pzv-next { min-width: 210px; display: inline-flex; gap: 8px; align-items: center; justify-content: center; }
.pzv-next .ic { width: 18px; height: 18px; }
.pzv-foot { padding: 8px 10px; }
.pzv-nav { grid-template-columns: repeat(5, 1fr); }
.pzv-menu-bg { position: fixed; inset: 0; z-index: 130; }
.pzv-menu { display: grid; min-width: 230px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-l); }
.pzv-menu-it { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.pzv-menu-it:hover { background: var(--surface-2); }
.pzv-menu-it .ic { width: 20px; height: 20px; }
.pzv-info { display: grid; gap: 10px; font-size: 14.5px; }
.pzv-info .pz-id { color: var(--info, #5b9fd6); }
.pzv-themes { display: flex; flex-wrap: wrap; gap: 6px; }
html[dir="rtl"] .pzv-m, html[dir="rtl"] .pzv-menu-it { text-align: right; }
@media (max-width: 1100px) {
  .gp.pzv .an-left { width: min(calc(100vh - 40px), calc(100% - 380px)); }
  .pzv-panel { flex-basis: 360px; }
}
@media (max-width: 900px) {
  .gp.pzv .an-left { width: min(100%, calc(100vh - 220px)); }
}
@media (max-width: 860px) {
  .gp.pzv .an-left { width: 100%; padding: 0; }
  /* telefonda: taxta → "Sizning navbatingiz" va maslahat → yurishlar → mavzu; ⏮ ‹ › ⏭ ☰ — pastda qotirilgan */
  .pzv-panel .pzv-box { order: -3; border-top: 0; padding: 12px 14px 6px; }
  .pzv-panel .pzv-moves { order: -2; flex: none; min-height: 0; max-height: none; overflow: visible; }
  .pzv-panel .pzv-note { order: -1; }
  .pzv-panel .pzv-head { order: 0; border-bottom: 0; border-top: 1px solid var(--line); }
  .pzv-king { width: 48px; height: 48px; }
  .pzv-turn { min-height: 52px; }
  .pzv-turn-tx b { font-size: 18px; }
  .pzv-menu-bg { background: rgba(0, 0, 0, .45); display: grid; align-items: end; }
  .pzv-menu { border-radius: 14px 14px 0 0; padding: 8px 8px calc(12px + env(safe-area-inset-bottom)); }
  .pzv-menu-it { padding: 13px 14px; font-size: 15px; }
}

/* ================= Shaxmat maktabi (kurs xaritasi) ================= */
.sch-page { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }

/* --- sarlavha: progress halqasi, raqamlar, davom ettirish, navbatdagi masala --- */
.sch-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "top prev" "cta prev";
  gap: 18px 28px; align-items: center; padding: 24px 26px; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: radial-gradient(120% 150% at 0% 0%, rgba(74, 127, 165, .30), transparent 55%),
    radial-gradient(80% 120% at 100% 100%, rgba(111, 166, 80, .16), transparent 60%), var(--surface); }
.sch-hero-top { grid-area: top; display: flex; align-items: center; gap: 22px; min-width: 0; }
.sch-hero-tx { display: grid; gap: 8px; min-width: 0; }
.sch-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-2); }
html[data-theme="light"] .sch-eyebrow { color: var(--accent-3); }
.sch-hero h1 { margin: 0; font: 800 32px/1.12 var(--display); letter-spacing: -.015em; }
.sch-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.sch-stat { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04); font-size: 13px; color: var(--muted); }
html[data-theme="light"] .sch-stat { background: rgba(255, 255, 255, .7); }
.sch-stat b { font: 800 15px var(--display); color: var(--text); }
.sch-ring { position: relative; width: 116px; height: 116px; flex: none; }
.sch-ring svg { width: 100%; height: 100%; display: block; transform: rotate(-90deg); }
.sch-ring circle { fill: none; stroke-width: 10; }
.sch-ring .bg { stroke: var(--surface-3); }
.sch-ring .fg { stroke: var(--ok); stroke-linecap: round; transition: stroke-dashoffset .7s ease; }
.sch-ring-tx { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.sch-ring-tx b { font: 800 27px var(--display); }
.sch-ring-tx span { font-size: 12px; color: var(--muted); }
.sch-cta { grid-area: cta; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; min-width: 0; }
.sch-go { min-height: 46px; padding: 0 24px; font-size: 15.5px; gap: 9px; border-radius: 10px; }
.sch-go .ic { width: 20px; height: 20px; }
.sch-next { display: grid; gap: 2px; min-width: 0; flex: 1; font-size: 13px; }
.sch-next b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-preview { grid-area: prev; display: grid; gap: 9px; width: 196px; color: var(--text); }
.sch-preview .mini-board { border-radius: 8px; box-shadow: var(--shadow-l); transition: transform .18s ease; }
.sch-preview:hover .mini-board { transform: translateY(-3px); }
.sch-preview-cap { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: center; }
.sch-side { width: 11px; height: 11px; border-radius: 50%; flex: none; border: 1.5px solid var(--muted-2); }
.sch-side.w { background: #fff; }
.sch-side.b { background: #1a1a1a; }

/* --- ko'rinish tanlash + tez o'tish --- */
.sch-toolbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 8px 0; margin: -8px 0;
  background: var(--bg); }
.sch-seg { flex: none; display: inline-flex; gap: 3px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.sch-seg button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border: 0; border-radius: 9px; background: none;
  color: var(--muted); font: 700 14px var(--sans); cursor: pointer; transition: background .15s, color .15s; }
.sch-seg button .ic { width: 17px; height: 17px; }
.sch-seg button:hover { color: var(--text); }
.sch-seg button.on { background: var(--accent); color: #fff; box-shadow: var(--shadow-s); }
.sch-nav { flex: 1; min-width: 0; }
.sch-jump { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.sch-jump::-webkit-scrollbar { display: none; }
.sch-jump a { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 7px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 700; white-space: nowrap; transition: border-color .15s; }
.sch-jump a:hover { border-color: var(--accent); }
.sch-jump img { width: 22px; height: 22px; }
.sch-jump small { color: var(--muted); font-weight: 700; font-size: 12px; }
.sch-steps { display: flex; align-items: center; padding: 0 4px; }
.sch-step { flex: none; display: flex; align-items: center; gap: 8px; padding: 2px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font: 700 13px var(--sans); }
.sch-step-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--surface-3);
  background: var(--surface); color: var(--text); font: 800 14px var(--display); }
.sch-step-n .ic { width: 16px; height: 16px; }
.sch-step.done .sch-step-n { background: var(--ok); border-color: var(--ok); color: #fff; }
.sch-step.cur .sch-step-n { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sch-step.cur { color: var(--text); }
.sch-step-line { flex: 1; min-width: 14px; height: 3px; margin: 0 8px; border-radius: 2px; background: var(--surface-3); }
.sch-step-line.done { background: var(--ok); }

/* --- guruh / bosqich bloki --- */
.sch-body { display: grid; gap: 16px; }
.sch-group { display: grid; gap: 14px; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); scroll-margin-top: 70px; }
.sch-group.flash, .sch-card.flash { animation: schFlash 1.8s ease; }
@keyframes schFlash { 0%, 35% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 3px transparent; } }
.sch-group-h { display: flex; align-items: center; gap: 14px; }
.sch-group-ic { width: 54px; height: 54px; flex: none; display: grid; place-items: center; border-radius: 15px; background: var(--surface-2); }
.sch-group-ic img { width: 34px; height: 34px; }
.sch-stage-n { width: 54px; height: 54px; flex: none; display: grid; place-items: center; border-radius: 15px; background: var(--accent); color: #fff; font: 800 24px var(--display); }
.sch-stage-n.done { background: var(--ok); }
.sch-group-tx { flex: 1; min-width: 0; display: grid; gap: 3px; }
.sch-group-tx h2 { margin: 0; font: 800 19px/1.25 var(--display); }
.sch-group-tx p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.sch-group-p { flex: none; width: 150px; display: grid; gap: 6px; justify-items: end; font-size: 13px; color: var(--muted); }
.sch-group-p b { font: 800 17px var(--display); color: var(--text); }
.sch-group-p .sch-bar { width: 100%; height: 6px; }

/* --- mavzu kartochkasi --- */
.sch-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.sch-card { position: relative; display: grid; gap: 10px; align-content: start; padding: 13px 14px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid transparent; transition: border-color .15s, transform .15s, box-shadow .15s; scroll-margin-top: 90px; }
html:not([data-theme="light"]) .sch-card { background: #2f2d2a; }
.sch-card:hover { border-color: var(--line); transform: translateY(-2px); box-shadow: var(--shadow); }
.sch-card.next { border-color: var(--accent); }
.sch-card-main { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--text); }
.sch-card-main::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.sch-card-tx { flex: 1; min-width: 0; display: grid; gap: 5px; }
.sch-card-tx b { font-size: 15px; line-height: 1.25; }
.sch-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.sch-ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--surface); }
html:not([data-theme="light"]) .sch-ic { background: #3a3835; }
.sch-ic img { width: 34px; height: 34px; display: block; }
.sch-ic .pc-num { width: 32px; height: 32px; font-size: 18px; font-family: var(--display); background: var(--accent); }
.sch-ic-sac { position: relative; display: grid; place-items: center; }
.sch-ic-sac i { position: absolute; right: -9px; bottom: -7px; display: flex; }
.sch-ic-sac i .ic-img { width: 19px; height: 19px; }
.sch-st { flex: none; font: 800 13px var(--display); color: var(--muted); }
.sch-st.ok { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--ok); color: #fff; }
.sch-st.ok .ic { width: 16px; height: 16px; }
.sch-tag { position: absolute; top: -9px; right: 14px; z-index: 1; padding: 2px 9px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.sch-diff { display: inline-flex; align-items: flex-end; gap: 2px; font-weight: 700; }
.sch-diff i { width: 4px; border-radius: 2px; background: var(--surface-3); }
.sch-diff i:nth-child(1) { height: 6px; }
.sch-diff i:nth-child(2) { height: 9px; }
.sch-diff i:nth-child(3) { height: 12px; }
.sch-diff span { margin-left: 5px; line-height: 1; }
.sch-diff.d1 { color: #6fa650; }
.sch-diff.d2 { color: #d9a33a; }
.sch-diff.d3 { color: #e0574a; }
.sch-diff.d1 i:nth-child(-n+1), .sch-diff.d2 i:nth-child(-n+2), .sch-diff.d3 i:nth-child(-n+3) { background: currentColor; }
.sch-levels { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.sch-lvl { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 9px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 12px; font-weight: 700; transition: border-color .15s; }
html:not([data-theme="light"]) .sch-lvl { background: #3a3835; }
.sch-lvl::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.sch-lvl.d1::before { background: #6fa650; }
.sch-lvl.d2::before { background: #d9a33a; }
.sch-lvl.d3::before { background: #e0574a; }
.sch-lvl b { color: var(--muted); font-weight: 800; }
.sch-lvl.full b { color: var(--ok); }
.sch-lvl:hover { border-color: var(--accent); }
.sch-bar { height: 5px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.sch-bar i { display: block; height: 100%; border-radius: 5px; background: var(--accent); transition: width .5s ease; }
.sch-card.full .sch-bar i, .sch-group-p .sch-bar i { background: var(--ok); }

/* --- bo'limdagi barcha masalalar (oyna) --- */
.sch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; max-height: 60vh; overflow: auto; padding: 2px; }
.sch-cell { height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.sch-cell.ok { background: #629924; border-color: transparent; color: #fff; }
.sch-cell.cur { outline: 2px solid #3692e7; outline-offset: 1px; }

html[dir="rtl"] .sch-ic-sac i { right: auto; left: -9px; }
html[dir="rtl"] .sch-tag { right: auto; left: 14px; }
html[dir="rtl"] .sch-diff span { margin-left: 0; margin-right: 5px; }
@media (max-width: 860px) {
  .sch-hero { grid-template-columns: 1fr; grid-template-areas: "top" "cta"; }
  .sch-preview { display: none; }
  /* telefonda yuqori panel (.m-top, 56px) yopishgan — bu yerda joy tejaymiz */
  .sch-toolbar { position: static; margin: 0; padding: 0; }
  .sch-group, .sch-card { scroll-margin-top: 68px; }
}
@media (max-width: 700px) {
  .sch-page { gap: 14px; }
  .sch-hero { padding: 18px 16px; gap: 16px; border-radius: 16px; }
  .sch-hero-top { gap: 16px; align-items: flex-start; }
  .sch-ring { width: 84px; height: 84px; }
  .sch-ring circle { stroke-width: 11; }
  .sch-ring-tx b { font-size: 20px; }
  .sch-ring-tx span { font-size: 10.5px; }
  .sch-hero h1 { font-size: 24px; }
  .sch-stat { padding: 4px 10px; font-size: 12px; }
  .sch-stat b { font-size: 13.5px; }
  .sch-go { flex: 1 1 100%; justify-content: center; }
  .sch-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .sch-seg { align-self: stretch; }
  .sch-seg button { flex: 1; justify-content: center; }
  .sch-step small { display: none; }
  .sch-group { padding: 14px 12px; gap: 12px; }
  .sch-group-h { flex-wrap: wrap; gap: 12px; }
  .sch-group-ic, .sch-stage-n { width: 46px; height: 46px; border-radius: 13px; }
  .sch-group-p { width: 100%; grid-template-columns: auto 1fr auto; align-items: center; justify-items: stretch; }
  .sch-cards { grid-template-columns: 1fr; }
}
