/* =====================================================================
   chess64 5.0 — botlar (chess.com "Play Bots" paneli), Coach belgilari,
   Tahlil "Review" rejimi, Ko'rish mashqlari bo'limi. v4.css dan keyin yuklanadi.
   Taxta ranglari va donalar o'zgarmaydi.
   ===================================================================== */

/* ---------- Taxta muharriri: donalar palitrasi taxta katagi rangida (qora donalar qorong'i fonda ko'rinmay qolardi) ---------- */
.ed-palette {
  background: linear-gradient(180deg, #e9eef2, #dbe3e9);
  border: 1px solid rgba(15, 23, 42, .18);
  border-radius: 10px; padding: 6px; gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 6px 18px -10px rgba(0, 0, 0, .55);
}
.ed-pc { color: #334155; }
.ed-pc svg { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .22)); }
.ed-pc:hover { background: rgba(74, 127, 165, .16); }
.ed-pc.on { border-color: #4a7fa5; background: rgba(74, 127, 165, .26); box-shadow: 0 0 0 2px rgba(74, 127, 165, .25); }
.ed-pc.trash { color: #b42318; }

/* =====================================================================
   Bot tanlash paneli (C.BotPicker) — chess.com "Play Bots" kabi
   ===================================================================== */
.bp { display: grid; gap: 12px; min-width: 0; }
.bp-hero {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 14px; border-radius: var(--r-l); border: 1px solid var(--line);
  background: radial-gradient(140% 160% at 0% 0%, color-mix(in srgb, var(--tier, var(--accent)) 24%, transparent), transparent 62%), var(--surface-2);
}
.bp-hero-ava { position: relative; }
.bp .bp-big { width: 86px; height: 86px; border-radius: 18px; box-shadow: 0 10px 26px -12px rgba(0, 0, 0, .7), 0 0 0 2px color-mix(in srgb, var(--tier, var(--accent)) 55%, transparent); }
.bp-lock { position: absolute; right: -6px; top: -6px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-s); }
.bp-lock .ic { width: 16px; height: 16px; }
.bp-hero-tx { min-width: 0; display: grid; gap: 4px; }
.bp-hero-name { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 19px; line-height: 1.2; }
.bp-hero-name b { font-family: var(--display); font-weight: 800; }
.bp-hero-rt { font-family: var(--display); font-weight: 700; color: var(--muted); font-size: 17px; font-variant-numeric: tabular-nums; }
.bp-hero-sub { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12.5px; color: var(--muted); }
.bp-tier { color: var(--tier, var(--accent)); font-weight: 800; }
html[data-theme="light"] .bp-tier { color: var(--tier-2, var(--accent)); }
.bp-max { color: var(--gold); font-weight: 800; }
.bp-say {
  position: relative; margin-top: 4px; padding: 7px 11px; border-radius: 12px; font-size: 13px; line-height: 1.4;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--text); max-width: 100%;
}
.bp-say::before { content: ""; position: absolute; left: -6px; top: 12px; width: 10px; height: 10px; background: inherit; border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); transform: rotate(45deg); }
.bp-listen { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); cursor: pointer; }
.bp-listen .ic { width: 16px; height: 16px; }

.bp-cats { display: grid; gap: 8px; }
.bp-cat { border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; transition: border-color .2s, background .2s; }
.bp-cat.has-on { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.bp-cat.open { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
.bp-cat-h {
  width: 100%; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 18px; align-items: center; gap: 12px;
  padding: 8px 12px 8px 8px; border: 0; background: transparent; color: var(--text); cursor: pointer; text-align: left; font: inherit;
}
.bp-cat-h:hover { background: var(--hover); }
.bp-cat-ava .bot-ava, .bp-cat-img { width: 46px !important; height: 46px !important; border-radius: 11px; }
.bp-cat-t { font-family: var(--display); font-weight: 800; font-size: 16px; }
.bp-cat-n { color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.bp-cat-car { display: grid; place-items: center; color: var(--muted); transition: transform .2s var(--ease-out); }
.bp-cat-car .ic { width: 14px; height: 14px; }
.bp-cat.open .bp-cat-car { transform: rotate(90deg); }
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; padding: 4px 10px 12px; }
.bp-tile {
  position: relative; display: grid; justify-items: center; gap: 3px; padding: 8px 4px 7px; border-radius: 12px; cursor: pointer;
  border: 2px solid transparent; background: var(--surface); color: var(--text); font: inherit; transition: border-color .15s, transform .15s;
}
.bp-tile:hover { transform: translateY(-1px); border-color: var(--line-2); }
.bp-tile.on { border-color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.bp-tile-img { width: 58px !important; height: 58px !important; border-radius: 12px; }
.bp-tile-n { max-width: 100%; font-size: 12.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-tile-r { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bp-tile-lock { position: absolute; right: 4px; top: 4px; }
.bp-tile.locked .bp-tile-img { filter: grayscale(.5); }

/* dvigatel: mikrosxema belgisi va surgich */
.eng-ava { background: radial-gradient(circle at 50% 35%, #4b5563, #1f2937) !important; color: #cbd5e1; }
.eng-ava .eng-chip { width: 92%; height: 92%; }
.bp-eng { display: grid; gap: 10px; padding: 6px 16px 14px; }
.bp-range-wrap { position: relative; padding-bottom: 18px; }
.bp-range { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--ok) var(--p, 0%), var(--surface-3) var(--p, 0%)); }
.bp-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
.bp-range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
.bp-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 40%, transparent); }
.bp-ticks { position: absolute; left: 12px; right: 12px; bottom: 0; height: 14px; }
.bp-ticks span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.bp-eng-out { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.bp-eng-out b { font-family: var(--display); font-size: 17px; }
.bp-eng-out span:nth-child(2) { font-weight: 800; color: var(--tier, var(--accent)); font-variant-numeric: tabular-nums; }
.bp-eng-note { margin: 0; }

/* =====================================================================
   Botlar sahifasi (#/play/bots)
   ===================================================================== */
.bpg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 22px; align-items: start; max-width: 1240px; margin: 0 auto; }
.bpg-board { width: min(100%, calc(100vh - 150px)); min-width: 280px; justify-self: end; display: grid; gap: 8px; }
.bpg-board .board-wrap { max-width: none; margin: 0; }
.bpg-bar { min-height: 46px; }
.bpg-panel {
  position: sticky; top: 14px; display: flex; flex-direction: column; max-height: calc(100vh - 28px); min-height: 520px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--card-shadow); overflow: hidden;
}
.bpg-head { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.bpg-head h1 { margin: 0; font-family: var(--display); font-size: 19px; font-weight: 800; }
.bpg-head .ic { width: 26px; height: 26px; }
.bpg-scroll { flex: 1; min-height: 0; overflow: auto; padding: 14px; overscroll-behavior: contain; }
.bpg-foot { display: grid; gap: 10px; padding: 12px 14px 14px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.bpg-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.bpg-opts { border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); min-width: 0; }
.bpg-opts > summary { list-style: none; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; cursor: pointer; font-weight: 800; font-size: 14px; }
.bpg-opts > summary::-webkit-details-marker { display: none; }
.bpg-opts > summary .ic { width: 18px; height: 18px; color: var(--muted); }
.bpg-opts-sum { margin-left: auto; font-weight: 600; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bpg-opts[open] > summary { border-bottom: 1px solid var(--line); }
.bpg-opts-body { display: grid; gap: 12px; padding: 12px; }
.bpg-opts-body .bx-seg { display: flex; flex-wrap: wrap; }
.bpg-opts-body .bx-seg-b { flex: 1 1 auto; justify-content: center; }
.bpg-modes { display: flex; gap: 6px; }
.bpg-mode {
  display: grid; justify-items: center; gap: 2px; width: 72px; height: 44px; padding: 3px 4px; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--line-2); background: var(--surface); color: var(--muted); font: inherit; font-size: 10.5px; font-weight: 800; line-height: 1.1;
}
.bpg-mode .ic { width: 20px; height: 20px; }
.bpg-mode span:last-child { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bpg-mode.on { border-color: var(--ok); color: var(--text); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.bpg-mode-hint { margin-top: -2px; }
.bpg-play {
  height: 60px; border: 0; border-radius: 14px; cursor: pointer; font-family: var(--display); font-size: 24px; font-weight: 900; letter-spacing: .01em;
  color: #fff; background: linear-gradient(180deg, #86c23f, #5f9c2a); box-shadow: 0 5px 0 #4a7d1f, 0 10px 24px -10px rgba(95, 156, 42, .8);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .25); transition: transform .08s, filter .15s, box-shadow .08s;
}
.bpg-play:hover { filter: brightness(1.06); }
.bpg-play:active { transform: translateY(3px); box-shadow: 0 2px 0 #4a7d1f, 0 6px 14px -8px rgba(95, 156, 42, .8); }
@media (max-width: 980px) {
  .bpg { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .bpg-board { width: min(100%, 560px); justify-self: center; }
  .bpg-panel { position: static; max-height: none; min-height: 0; }
  .bpg-scroll { overflow: visible; }
  .bpg-foot { position: sticky; bottom: calc(var(--m-tabs-h, 0px) + 8px); z-index: 5; border-radius: 0 0 18px 18px; box-shadow: 0 -10px 24px -14px rgba(0, 0, 0, .6); }
}
@media (max-width: 520px) {
  .bpg-row { grid-template-columns: minmax(0, 1fr); }
  .bpg-modes { justify-content: stretch; }
  .bpg-mode { flex: 1; width: auto; }
  .bp-hero { grid-template-columns: auto minmax(0, 1fr); padding: 12px; }
  .bp .bp-big { width: 68px; height: 68px; }
  .bp-grid { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); }
  .bp-tile-img { width: 50px !important; height: 50px !important; }
}

/* =====================================================================
   Coach: bot tanlash paneli feed ichida, raqib rasmi
   ===================================================================== */
.cch-setup .bp { margin-top: 2px; }
.cch .bp-hero { padding: 12px; }
.cch .bp .bp-big { width: 66px; height: 66px; border-radius: 15px; }
.cch .bp-hero-name { font-size: 17px; }
.cch .bp-say { font-size: 12.5px; }
.cch-bot-pic { width: 40px !important; height: 40px !important; border-radius: 11px !important; }

/* =====================================================================
   Tahlil: "Review" tugmasi (belgilar faqat Review yoqilganda)
   ===================================================================== */
.an-review-btn { background: linear-gradient(180deg, #86c23f, #5f9c2a) !important; color: #fff !important; border: 0 !important; font-weight: 900; box-shadow: 0 4px 0 #4a7d1f; }
.an-review-btn:hover { filter: brightness(1.06); }
.an-review-btn .rv-ic, .an-review-btn svg { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.rv-btn.an-rv-go { color: var(--text); border-color: color-mix(in srgb, var(--ok) 50%, var(--line-2)); }

/* =====================================================================
   Ko'rish mashqlari (#/vision)
   ===================================================================== */
.vis { display: grid; gap: 22px; max-width: 1180px; margin: 0 auto; min-width: 0; }
.vis-hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center;
  padding: 26px 28px; border-radius: 22px; border: 1px solid var(--line);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(34, 211, 238, .18), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(129, 140, 248, .2), transparent 60%), var(--surface);
}
.vis-hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 300px; height: 300px; opacity: .07; pointer-events: none;
  background: conic-gradient(#fff 25%, transparent 0 50%, #fff 0 75%, transparent 0) 0 0 / 75px 75px; transform: rotate(12deg); border-radius: 30px;
}
.vis-hero-art { width: 112px; height: 112px; display: grid; place-items: center; border-radius: 28px; background: linear-gradient(145deg, #0e7490, #4338ca); box-shadow: 0 18px 40px -16px rgba(67, 56, 202, .7); }
.vis-hero-art .ic { width: 70px; height: 70px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
.vis-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #67e8f9; }
html[data-theme="light"] .vis-eyebrow { color: #0e7490; }
.vis-hero h1 { margin: 4px 0 6px; font: 900 34px/1.1 var(--display); letter-spacing: -.01em; }
.vis-hero p { margin: 0; color: var(--muted); max-width: 640px; line-height: 1.5; }
.vis-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.vis-stats > div { display: grid; gap: 1px; min-width: 104px; padding: 9px 14px; border-radius: 14px; background: color-mix(in srgb, var(--surface-2) 80%, transparent); border: 1px solid var(--line); }
.vis-stats b { font: 900 20px var(--display); font-variant-numeric: tabular-nums; }
.vis-stats span { font-size: 12px; color: var(--muted); font-weight: 600; }
.vis-stats .xp b { color: var(--gold); }
.vis-tabs { display: flex; gap: 6px; padding: 5px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.vis-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 9px; min-width: max-content; height: 50px; padding: 0 18px; border-radius: 12px; color: var(--muted); font-weight: 800; font-size: 15px; transition: background .2s, color .2s; }
.vis-tab .ic { width: 22px; height: 22px; }
.vis-tab:hover { color: var(--text); background: var(--hover); }
.vis-tab.on { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2), 0 6px 16px -10px rgba(0, 0, 0, .6); }
.vis-body { display: grid; gap: 26px; min-width: 0; }
.vis-lead { margin: 0; color: var(--muted); line-height: 1.55; max-width: 820px; }
.vis-group { display: grid; gap: 12px; }
.vis-group h2, .vis-block h2 { margin: 0; font: 800 20px var(--display); }
.vis-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.vis-card {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto auto; gap: 4px 14px; align-items: start;
  padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text);
  transition: transform .2s var(--ease-out), border-color .2s, box-shadow .2s;
}
.vis-card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.vis-card-ic { grid-row: span 2; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); }
.vis-card-ic .ic { width: 34px; height: 34px; }
.vis-card-tx { display: grid; gap: 3px; min-width: 0; }
.vis-card-tx b { font-size: 15.5px; }
.vis-card-tx small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.vis-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.vis-card-meta .chip { font-size: 11.5px; }
.chip.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); }

/* bosqichlar va darslar */
.vis-stage { display: grid; gap: 12px; padding: 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.vis-stage { --sc: #22d3ee; }
.vis-stage.s2 { --sc: #a78bfa; }
.vis-stage.s3 { --sc: #fb923c; }
.vis-stage-h { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.vis-stage-n { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; font: 900 22px var(--display); color: #0b1020; background: var(--sc); box-shadow: 0 10px 22px -12px var(--sc); }
.vis-stage-h small { color: var(--sc); font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.vis-stage-h h2 { margin: 2px 0 0; font: 800 21px var(--display); }
.vis-stage-prog { display: flex; align-items: center; gap: 10px; min-width: 200px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vis-stage-prog .vis-bar { flex: 1; }
.vis-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; min-width: 60px; }
.vis-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ok), #8fe0b6); transition: width .5s var(--ease-out); }
.vis-lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 8px; }
.vis-lesson { display: grid; grid-template-columns: 40px minmax(0, 1fr) 120px; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid transparent; color: var(--text); transition: border-color .2s, background .2s; }
.vis-lesson:hover { border-color: var(--line-2); background: color-mix(in srgb, var(--surface-2) 70%, var(--surface-3)); }
.vis-lesson-n { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; font: 800 15px var(--display); background: color-mix(in srgb, var(--sc) 16%, transparent); color: var(--sc); font-variant-numeric: tabular-nums; }
.vis-lesson.full .vis-lesson-n { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.vis-lesson-n .ic { width: 18px; height: 18px; }
.vis-lesson-tx { display: grid; gap: 2px; min-width: 0; }
.vis-lesson-tx b { font-size: 14.5px; line-height: 1.3; }
.vis-lesson-tx small { color: var(--muted); font-size: 12px; }
.vis-lesson-prog { display: grid; gap: 3px; justify-items: end; }
.vis-lesson-prog .vis-bar { width: 100%; height: 6px; }
.vis-lesson-prog small { font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

/* dars sahifasi */
.vis-lhead { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 20px 22px; border-radius: 20px; border: 1px solid var(--line);
  background: radial-gradient(120% 150% at 100% 0%, color-mix(in srgb, var(--sc) 16%, transparent), transparent 60%), var(--surface); }
.vis-lhead { --sc: #22d3ee; } .vis-lhead.s2 { --sc: #a78bfa; } .vis-lhead.s3 { --sc: #fb923c; }
.vis-back { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); flex: none; }
.vis-back .ic { width: 20px; height: 20px; }
html[dir="rtl"] .vis-back .ic { transform: scaleX(-1); }
.vis-lhead-tx small { color: var(--sc); font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.vis-lhead h1 { margin: 4px 0 6px; font: 900 26px/1.2 var(--display); }
.vis-lnum { display: inline-block; margin-right: 10px; padding: 2px 10px; border-radius: 8px; font-size: 14px; vertical-align: middle; color: #0b1020; background: var(--sc); }
.vis-lhead p { margin: 0; color: var(--muted); line-height: 1.55; max-width: 760px; }
.vis-lhead-prog { display: grid; gap: 6px; justify-items: stretch; min-width: 190px; font-size: 13px; color: var(--muted); text-align: center; }
.vis-block { display: grid; gap: 12px; }
.vis-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.vis-chipcard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: border-color .2s, transform .2s; }
.vis-chipcard:hover { border-color: var(--line-2); transform: translateY(-2px); }
.vis-chipcard .ic { width: 26px; height: 26px; }
.vis-chipcard > span:last-child { display: grid; gap: 2px; min-width: 0; }
.vis-chipcard small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.vis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.vis-dg, .vis-et { position: relative; display: grid; gap: 7px; padding: 9px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: transform .2s var(--ease-out), border-color .2s, box-shadow .2s; }
.vis-dg:hover, .vis-et:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.vis-dg.st1, .vis-et.st1 { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.vis-dg.st2, .vis-et.st2 { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.vis-dg.st3, .vis-et.st3 { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.vis-dg-head { display: flex; align-items: center; gap: 6px; min-height: 22px; padding: 0 2px; }
.vis-dg-head b { font: 800 17px Georgia, "Times New Roman", serif; flex: 1; }
.vis-eng { display: grid; place-items: center; }
.vis-dg-board, .vis-et-board { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.vis-dg-board .mini-board, .vis-et-board .mini-board { border-radius: 0; }
.vis-dg .mini-board > .lm, .vis-et .mini-board > .lm { box-shadow: inset 0 0 0 999px rgba(255, 213, 79, .42); }
.vis-dg-cap { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; min-width: 0; padding: 0 2px; }
.vis-dg-cap span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vis-dg-cap small { color: var(--muted-2); font-size: 11px; }
.vis-st { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex: none; }
.vis-st .ic { width: 13px; height: 13px; }
.vis-st.st1 { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.vis-st.st2 { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }
.vis-st.st3 { background: color-mix(in srgb, var(--danger) 20%, transparent); color: var(--danger); }
.vis-ets { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.vis-et > .vis-st { position: absolute; right: 14px; top: 14px; box-shadow: 0 0 0 3px var(--surface); background: var(--surface); }
.vis-et-cap { display: grid; gap: 2px; padding: 0 2px 2px; }
.vis-et-cap b { font-size: 14px; }
.vis-et-cap small { color: var(--muted); font-size: 12px; }
.vis-lnav { margin-top: 4px; }

/* mashq sahifasi */
.vis-dhead { display: flex; align-items: center; gap: 12px; }
.vis-dhead-ic { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); }
.vis-dhead-ic .ic { width: 30px; height: 30px; }
.vis-dhead > div { display: grid; gap: 2px; min-width: 0; }
.vis-dhead b { font: 800 19px var(--display); }
.vis-dhead small { color: var(--muted); font-size: 12.5px; }
.vd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 22px; align-items: start; }
.vd.no-board { grid-template-columns: minmax(0, 560px); justify-content: center; }
.vd-board { width: min(100%, calc(100vh - 190px)); justify-self: end; min-width: 260px; }
.vd-board .board-wrap { max-width: none; margin: 0; }
.vd-card { display: grid; gap: 14px; padding: 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--card-shadow); position: sticky; top: 14px; }
.vd-top { display: flex; align-items: center; gap: 10px; min-height: 26px; }
.vd-dots { display: flex; gap: 5px; flex-wrap: wrap; }
.vd-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.vd-dots i.done { background: var(--ok); }
.vd-dots i.cur { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.vd-score { font: 800 15px var(--display); font-variant-numeric: tabular-nums; }
.vd-clock { min-width: 54px; text-align: center; padding: 4px 10px; border-radius: 10px; background: var(--surface-2); font: 800 15px var(--display); font-variant-numeric: tabular-nums; }
.vd-clock.hot { color: var(--danger); animation: vdPulse 1s ease-in-out infinite; }
@keyframes vdPulse { 50% { transform: scale(1.07); } }
.vd-q { display: grid; gap: 8px; font-size: 18px; font-weight: 700; line-height: 1.4; transition: opacity .3s; }
.vd-q.dim { opacity: .55; }
.vd-big { font: 900 64px/1 var(--display); letter-spacing: .02em; color: var(--accent-2); text-align: center; padding: 8px 0; }
.vd.no-board .vd-big { font-size: 96px; padding: 18px 0; }
.vd-sub { color: var(--muted); font-size: 13px; }
.vd-line { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font: 700 17px/1.6 var(--display); letter-spacing: .01em; word-spacing: 2px; }
.vd-pos { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 17px; line-height: 1.5; }
.vd-pos b { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.vd-memo { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.vd-memo i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #22d3ee, #6366f1); }
.vd-ans { display: grid; gap: 10px; }
.vd-hint { color: var(--muted); font-size: 13px; }
.vd-row { display: flex; gap: 8px; flex-wrap: wrap; }
.vd-row .btn { flex: 1; }
.vd-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.vd-choices.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vd-choices.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vd-choice {
  min-height: 52px; padding: 8px 12px; border-radius: 14px; border: 2px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font: 800 16px var(--display); cursor: pointer; transition: transform .1s, border-color .15s, background .15s;
}
.vd-choice:hover:not(:disabled) { border-color: var(--accent); }
.vd-choice:active:not(:disabled) { transform: scale(.97); }
.vd-choice.ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 18%, var(--surface-2)); }
.vd-choice.bad { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 16%, var(--surface-2)); }
.vd-choice:disabled { cursor: default; }
.vd-choice.vd-light { background: #eef2f6; color: #0f172a; border-color: #cbd5e1; }
.vd-choice.vd-dark { background: #4a7fa5; color: #fff; border-color: #3a6688; }
.vd-pieces { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 8px; border-radius: 14px; background: linear-gradient(180deg, #e9eef2, #dbe3e9); }
.vd-pc { aspect-ratio: 1; display: grid; place-items: center; padding: 3px; border-radius: 10px; border: 2px solid transparent; background: rgba(255, 255, 255, .5); cursor: pointer; color: #475569; }
.vd-pc svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .2)); }
.vd-pc .ic { width: 60%; height: 60%; }
.vd-pc:hover:not(:disabled) { border-color: #4a7fa5; }
.vd-pc.ok { border-color: var(--ok); background: rgba(52, 195, 122, .3); }
.vd-pc.bad { border-color: var(--danger); background: rgba(240, 93, 93, .25); }
.vd-qcount { font: 900 28px var(--display); text-align: center; font-variant-numeric: tabular-nums; }
.vd-fb { display: none; }
.vd-fb.ok, .vd-fb.bad { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 14px; border-radius: 14px; animation: vdIn .25s var(--ease-out); }
@keyframes vdIn { from { opacity: 0; transform: translateY(6px); } }
.vd-fb.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.vd-fb.bad { background: color-mix(in srgb, var(--danger) 12%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
.vd-fb-ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #fff; }
.vd-fb.ok .vd-fb-ic { background: var(--ok); } .vd-fb.bad .vd-fb-ic { background: var(--danger); }
.vd-fb-ic .ic { width: 17px; height: 17px; }
.vd-fb-tx { margin-top: 3px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.vd-fb .vd-next { grid-column: 1 / -1; height: 46px; font-size: 15px; }
.vd-end { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 10px 0; }
.vd-end-ic .ic { width: 64px; height: 64px; }
.vd-end h2 { margin: 0; font: 900 24px var(--display); }
.vd-end-score b { font: 900 52px var(--display); font-variant-numeric: tabular-nums; }
.vd-end-score span { color: var(--muted); font-size: 18px; font-weight: 700; }
.vd-end-xp { min-height: 26px; font: 900 22px var(--display); color: var(--gold); }
.vd-end .vd-row { width: 100%; }

/* taxtadagi belgilar (mashqlar) */
.hl.vsel { background: rgba(75, 143, 209, .5); box-shadow: inset 0 0 0 3px rgba(37, 99, 235, .85); }
.hl.vok { background: rgba(52, 195, 122, .62); }
.hl.vbad { background: rgba(240, 93, 93, .66); }
.hl.vmiss { box-shadow: inset 0 0 0 4px rgba(245, 176, 65, .95); background: rgba(245, 176, 65, .28); }
.hl.vtarget { box-shadow: inset 0 0 0 4px rgba(250, 204, 21, .95); background: radial-gradient(circle, rgba(250, 204, 21, .5) 22%, transparent 26%); }
.hl.vsq { background: rgba(99, 102, 241, .32); }
.hl.vatt { background: rgba(240, 93, 93, .2); }

/* kompyuterga qarshi topshiriq / etyud */
.vis-ev-panel { display: flex; flex-direction: column; gap: 12px; padding-bottom: 14px; }
.vis-ev-task { display: flex; align-items: center; gap: 10px; margin: 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-weight: 800; font-size: 15.5px; }
.vis-ev-note { margin: 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.vis-ev-status { margin: 0 14px; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); font-weight: 700; }
.vis-ev-status .ic { width: 20px; height: 20px; }
.vis-ev-status.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.vis-ev-status.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.vis-ev-status.busy { color: var(--muted); }
.vis-ev-moves { margin: 0 14px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-content: flex-start; min-height: 60px; max-height: 220px; overflow: auto; font-weight: 700; font-size: 14.5px; }
.vis-ev-moves .n { color: var(--muted-2); font-weight: 600; }
.vis-ev-acts { margin: auto 14px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

@media (max-width: 980px) {
  .vd { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .vd-board { width: min(100%, 560px); justify-self: center; }
  .vd-card { position: static; }
  .vis-lhead { grid-template-columns: auto minmax(0, 1fr); }
  .vis-lhead-prog { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .vis { gap: 16px; }
  .vis-hero { grid-template-columns: minmax(0, 1fr); padding: 20px 18px; gap: 14px; }
  .vis-hero-art { width: 72px; height: 72px; border-radius: 20px; }
  .vis-hero-art .ic { width: 46px; height: 46px; }
  .vis-hero h1 { font-size: 27px; }
  .vis-stats > div { min-width: 0; flex: 1 1 40%; }
  .vis-tab { height: 44px; padding: 0 12px; font-size: 14px; }
  .vis-lessons { grid-template-columns: minmax(0, 1fr); }
  .vis-lesson { grid-template-columns: 36px minmax(0, 1fr) 70px; }
  .vis-stage { padding: 14px 12px; }
  .vis-stage-prog { min-width: 0; width: 100%; }
  .vis-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vis-ets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vis-cards { grid-template-columns: minmax(0, 1fr); }
  .vd-big { font-size: 48px; }
  .vd.no-board .vd-big { font-size: 72px; }
  .vd-card { padding: 14px; }
  .vd-pieces { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 6px; }
}
.vd-dots i.bad { background: var(--danger); }
/* telefonda "O'ynash" paneli pastki menyu ustida qotib turadi */
@media (max-width: 860px) {
  .bpg-foot { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
.rv-btn.an-rv-go { white-space: nowrap; }
