/* Shaxmat: tahlilning davomi (izohlar, variantlar, xulosa, xatolar ustida mashq) va kompyuterga qarshi o'yindagi maslahat (1 Dec 2026).
   coach.js bilan birga, kerak bo'lganda yuklanadi. Tahlilning asosiy uslublari index.html da. */
.rvcoach { align-content: flex-start; }
.cxx { flex: 1 0 100%; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.cxw { margin: 0; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.cxg { padding-left: 10px; border-left: 3px solid #6bb43f; color: #d5cfec; }
.cxe { color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.cxk { margin: 0; display: flex; align-items: center; gap: 7px; min-height: 18px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.cxk .ic { width: 15px; height: 15px; stroke-width: 2.6; } .cxk .rvspin { width: 14px; height: 14px; border-width: 2px; flex: none; }
.cxbs { display: flex; gap: 8px; }
.cxv, .cxt, .cxer button, .cxtr button, .advt button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; }
.cxv { flex: 1 1 auto; min-width: 0; padding: 8px 9px; gap: 7px; font-size: 13.5px; line-height: 1.2; text-align: left; text-wrap: balance; }
.cxv .ic { flex: none; width: 15px; height: 15px; }
.cxv.bad { background: rgba(229, 65, 59, .13); border-color: rgba(229, 65, 59, .5); } .cxv.bad .ic { color: #ff7d74; }
.cxv.good { background: rgba(107, 180, 63, .13); border-color: rgba(107, 180, 63, .5); } .cxv.good .ic { color: #9bdc6c; }
.cxt { width: 100%; min-height: 50px; font-size: 16px; }
.cxer { display: flex; align-items: center; gap: 10px; color: var(--muted); } .cxer small { flex: 1; font-size: 13px; line-height: 1.35; }

/* variant yurishlari */
.cxl { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cxl .cxp { flex: none; width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.cxls { position: relative; flex: 1; min-width: 0; display: flex; gap: 2px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.cxls::-webkit-scrollbar, .cxkm::-webkit-scrollbar, .cxth::-webkit-scrollbar { display: none; }
.cxls button { flex: none; min-width: 44px; min-height: 44px; padding: 6px 9px; border-color: transparent; background: none; font-size: 14.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cxls button[aria-current] { background: rgba(124, 92, 255, .26); border-color: var(--acc2); }
.cxls i { margin-right: 4px; color: var(--muted); font-style: normal; font-weight: 600; }

/* rejimlar: variant (rvline) va mashq (rvtry) — odatdagi tugmalar o'rniga o'zinikilar */
.rv .cxnav { display: none; }
.rv.rvline > .rvnav, .rv.rvtry > .rvnav { display: none; }
.rv.rvline > .cxnav, .rv.rvtry > .cxnav { display: flex; }
.cxnav button { gap: 8px; font-size: 15px; line-height: 1.15; }
.cxnav button span { min-width: 0; }
.cxnav .ic { flex: none; }
.cxnav .cxo { flex: 0 0 50px; }
.cxnav .cxr { flex-direction: row-reverse; }
.rvtry .cxnav .ic { width: 19px; height: 19px; }
.rv.rvtry .rvbd > :not(.rvcoach) { display: none; }
.rv.rvtry .rvcoach { display: flex; padding: 12px; min-height: 206px; border: 1px solid var(--line); border-left: 4px solid var(--c, var(--line2)); background: rgba(255, 255, 255, .035); }
.cxq { position: relative; overflow: hidden; background: var(--light); color: #1a1530; } .cxq .pc, .cxq > .pw { width: 34px; height: 34px; } /* shoh ostida — .plt SVG plastinkasi (app.js PLATE), qoraytirishda ham och */
.cxq > .ic { width: 22px; height: 22px; color: #3b2f72; } .cxq.ok { background: var(--green); } .cxq.ok > .ic { color: #06281c; stroke-width: 3; }
.cxd { display: flex; gap: 5px; padding: 2px; }
.cxd i { flex: 1 1 0; max-width: 44px; height: 6px; border-radius: 9px; background: rgba(255, 255, 255, .14); transition: background .25s; }
.cxd i.ok { background: var(--green); } .cxd i.sol { background: #f39634; } .cxd i.on { box-shadow: 0 0 0 2px var(--acc2); }
.cxh { display: flex; gap: 9px; padding: 9px 11px; border-radius: 11px; background: rgba(247, 201, 72, .09); border: 1px solid rgba(247, 201, 72, .32); }
.cxh .ic { color: var(--gold); } .cxh b { display: block; margin-top: 2px; }
.cxend { gap: 6px; }
.cxend [data-k] { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 7px 10px; text-align: left; } .cxend [data-k] b { flex: 1; font-size: 14.5px; }
.cxend .cxv { flex: none; margin-top: 4px; }
.cxm { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.cxm .ic { width: 14px; height: 14px; stroke-width: 3; }
.cxm.ok { background: rgba(52, 211, 153, .18); color: var(--green); } .cxm.no { background: rgba(255, 93, 108, .16); color: #ff8490; }

/* xulosa: har bo'limning joyi boshidan band */
.cxs [hidden] { display: none; }
.rvtp { position: relative; } .rvtp::after { content: ""; position: absolute; inset: -11px -6px; } /* matn ichidagi havola: barmoq uchun joyi kattaroq */
.cxsw { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cxsw button { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 48px; padding: 6px 10px; background: rgba(255, 255, 255, .035); font-size: 14px; }
.cxsw button[aria-pressed="true"] { border-color: var(--acc2); background: rgba(124, 92, 255, .2); }
.cxsw span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cxs .rvk { width: 26px; height: 26px; }
.cxop { margin: 0; display: flex; gap: 9px; min-height: 24px; color: var(--muted); font-size: 14.5px; line-height: 1.4; }
.cxop > span { min-width: 0; } .cxop b { color: var(--fg); } .cxop .ic { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.cxf { display: flex; flex-direction: column; justify-content: center; gap: 12px; min-height: 185px; padding: 12px 13px; border-radius: 14px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); }
.cxf p { margin: 0; display: flex; gap: 11px; font-size: 14.5px; line-height: 1.45; } .cxf p.cxk { justify-content: center; font-size: 13.5px; }
.cxf p b { display: block; font-size: 14.5px; } .cxf p > span { min-width: 0; color: #d5cfec; } .cxf p > span b { color: var(--fg); }
.cxgd > .ic { color: var(--green); stroke-width: 3; } .cxwk > .ic { color: #f6ab58; }
.cxtr { display: flex; align-items: center; gap: 10px; min-height: 46px; color: var(--muted); font-size: 14px; line-height: 1.35; } .cxtr span { flex: 1; min-width: 0; }
.cxtr > .ic { color: var(--acc2); } .cxtr button span { color: var(--fg); white-space: nowrap; }
.cxkm, .cxth { display: flex; align-items: stretch; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; }
.cxkm { min-height: 60px; } .cxth { min-height: 48px; }
.cxkm button { flex: 0 0 auto; display: flex; align-items: center; gap: 9px; min-width: 128px; padding: 8px 13px 8px 10px; text-align: left; scroll-snap-align: start; }
.cxkm button span { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; } .cxkm b { font-size: 14.5px; } .cxkm small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.cxsk { flex: 1 1 0; min-width: 70px; border-radius: 12px; background: rgba(255, 255, 255, .06); animation: cxsk 1.3s ease-in-out infinite alternate; }
@keyframes cxsk { to { opacity: .45; } }
.cxn { margin: auto 0; color: var(--muted); font-size: 14px; }
.cxph { position: relative; width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0 5px; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.cxs .cxph th, .cxs .cxph td { width: auto; max-width: none; padding: 0 0 0 10px; border: 0; text-align: left; } /* index.html dagi reyting jadvali qoidalari bekor */ .cxs .cxph tr > :first-child { width: 28px; padding: 0; }
.cxph th[scope="col"] { color: var(--muted); font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; } .cxph td { height: 32px; font-weight: 800; }
.cxph .rvk { display: block; } .cxvh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cxbr { display: block; height: 4px; margin-top: 4px; border-radius: 9px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.cxbr i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width .4s ease-out; }
.cxth button, .cxtg { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 12px; scroll-snap-align: start; font-size: 14.5px; white-space: nowrap; }
.cxth button span { color: #c3b3ff; font-size: 13px; } .cxth button .ic { width: 15px; height: 15px; margin-left: -4px; color: #c3b3ff; }
.cxtg { border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .035); }

/* maslahat (faqat kompyuterga qarshi o'yinda) */
.advb[aria-disabled="true"], .cxnav [aria-disabled="true"] { opacity: .45; cursor: default; }
.advl { position: absolute; inset: 0; z-index: 5; pointer-events: none; } .advl:empty { display: none; }
.advx { display: flex; flex-direction: column; gap: 8px; min-height: 186px; padding: 10px 13px 4px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line2); scroll-margin: 10px; }
.advx[hidden] { display: none; }
.advh { display: flex; align-items: center; gap: 8px; min-height: 28px; } .advh b { flex: 1; font-size: 15px; } .advh > .ic { color: var(--gold); }
.advh button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -8px -9px -8px 0; padding: 0; border: 0; background: none; color: var(--muted); }
.advt { display: flex; flex-direction: column; gap: 8px; flex: 1; } .advt .cxk { margin: auto; font-size: 14px; } .advt button { align-self: stretch; } .cxm0 { margin: auto; color: var(--muted); text-align: center; }
.advm { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 16px; }
.advp { margin: 0; color: #d5cfec; font-size: 14px; line-height: 1.45; } .advp b { margin-right: 3px; color: var(--fg); } .advp i { color: var(--muted); font-style: normal; }
.advr { display: flex; gap: 8px; } .advr .ic { width: 18px; height: 18px; margin-top: 1px; color: #f6ab58; }
.advf { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); } .advf small { color: var(--muted); font-size: 12.5px; text-align: right; }
.advf button { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0; border: 0; background: none; font-size: 14px; text-align: left; }
.advf button i { position: relative; flex: none; width: 38px; height: 22px; border-radius: 99px; background: rgba(255, 255, 255, .16); transition: background .2s; }
.advf button i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.advf [aria-checked="true"] i { background: var(--acc); } .advf [aria-checked="true"] i::after { transform: translateX(16px); }
@media (min-width: 1200px) and (min-aspect-ratio: 3/2) { /* keng ekranda taxta yonida: taxta ham, tugmalar ham qimirlamaydi */
  body.advon .game { position: relative; }
  .advx { position: absolute; top: 64px; left: calc(100% + 22px); width: clamp(240px, calc((100vw - 100vh + 225px) / 2 - 44px), 340px); }
}

@media (hover: hover) and (pointer: fine) { .cxkm, .cxth { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; } .cxkm::-webkit-scrollbar, .cxth::-webkit-scrollbar { display: block; } }
@media (min-width: 980px) { .rv:not(.at0) .rvcoach { min-height: 178px; } .rv.rvtry .rvcoach { min-height: 240px; }
  .cxbs { gap: 6px; } .cxv { padding-left: 8px; padding-right: 8px; gap: 6px; font-size: 13px; } /* panel 340-420 px: ikki chiziq tugmasi bir qatorda (o'zbekcha matnlar eng uzun) */
}
@media (min-width: 980px) and (max-width: 1259px) { .cxbs .cxv .ic { display: none; } } /* panel 340-375 px: belgisiz ham sig'adi */
@media (max-width: 979px) { /* avval karta (taxtaga yaqin), keyin yurishlar, grafik va tekshiruv holati */
  .rv.rvtry { min-height: 70vh; } /* mashq paytida sahifa matni ekranga chiqib turmasin */
  .rv:not(.at0) .rvcoach { min-height: 150px; } .rv.rvtry .rvcoach { min-height: 206px; }
  .rv:not(.at0) .rvlist { order: 1; } .rv:not(.at0) .rvgraph { order: 2; } .rv:not(.at0) .rvprog { order: 3; }
  .rv:not(.at0) .rvprog, .rv:not(.at0) .rvsum { overflow-anchor: none; } /* DOM da kartadan oldin, ekranda keyin: sahifa langari bo'lmasin */
}
@media (max-width: 979px) and (max-height: 540px) and (orientation: landscape) { /* yotiq telefon: chapda taxta, o'ngda karta */
  body.reviewing .layout.play { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
  body.reviewing .game { position: sticky; top: 8px; width: calc(100vh - 84px); max-width: none; margin: 0; }
  body.reviewing .game .plaque { display: none; }
  .rv { margin-top: 0; max-width: none; }
  .rv.rvtry .rvcoach { min-height: 0; } .cxf { min-height: 148px; }
}
@media (max-width: 379px) { /* eng tor telefonlar (360 px): matnlar kesilmasin, pastki tugmalar 44 px dan tor bo'lmasin */
  .cxs .cxph th, .cxs .cxph td { padding-left: 6px; } .cxph th[scope="col"] { font-size: 11.5px; } .cxbs .cxv .ic { display: none; }
  .rvp { gap: 6px; padding-left: 7px; padding-right: 8px; } .rvp strong { font-size: 17px; }
  .rv:not(.at0) > .rvnav:not(.cxnav) { gap: 4px; padding-left: 4px; padding-right: 4px; }
  .rv:not(.at0) > .rvnav:not(.cxnav) .p { flex-grow: 1; } .rv:not(.at0) > .rvnav:not(.cxnav) .rvpos { min-width: 46px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .cxsk { animation: none; } .cxbr i, .cxd i, .advf button i, .advf button i::after { transition: none; } }
