/* ============================================================
   ЛАБОРАТОРИЯ · ЭТАП 2 — стили экрана «ВОЛОКНА И МАТЕРИАЛЫ».
   Все селекторы с префиксом .lmxFb / #lmxFb / .lmxFbRep —
   на чужую вёрстку не влияют. Откат: удалить <link> из index.php.

   Классы .lmxRep__* (общая рамка отчёта) объявлены в lab_dna.css —
   этот файл подключать ПОСЛЕ него.
   ============================================================ */

/* ══════════════════════════════════════════════════════════════
   МИНИ-ИГРА
   ══════════════════════════════════════════════════════════════ */
#lmxFb{
  position:fixed; inset:0; z-index:100080;
  display:flex; align-items:center; justify-content:center;
  padding:18px; box-sizing:border-box;
  background:rgba(0,0,0,.9);
  -webkit-backdrop-filter:blur(7px); backdrop-filter:blur(7px);
  font-family:var(--sans, system-ui, sans-serif);
  color:#f0e8d2;
}
.lmxFb__box{
  width:100%; max-width:1060px; max-height:94vh;
  display:flex; flex-direction:column; overflow:hidden;
  border:1px solid rgba(242,196,0,.38); border-radius:16px;
  background-image:
    var(--noir-grain, none),
    linear-gradient(180deg,#15130f 0%,#0c0b0a 100%);
  box-shadow:0 26px 70px rgba(0,0,0,.75);
}

/* ---------- шапка ---------- */
.lmxFb__head{
  display:flex; align-items:flex-start; justify-content:space-between; gap:14px;
  padding:15px 18px; border-bottom:1px solid rgba(242,196,0,.2);
  background:rgba(242,196,0,.05);
}
.lmxFb__kicker{ font-size:9.5px; font-weight:800; letter-spacing:.16em; color:rgba(242,196,0,.65); }
.lmxFb__title{
  margin-top:4px; font-family:var(--noir-display, inherit);
  font-size:24px; font-weight:700; letter-spacing:.08em; color:#f5f1e6; line-height:1;
}
.lmxFb__sub{ margin-top:6px; font-size:12px; color:rgba(240,232,210,.5); }
.lmxFb__close{
  flex:0 0 auto; width:34px; height:34px; border-radius:50%; cursor:pointer;
  border:1px solid rgba(240,232,210,.16); background:rgba(255,255,255,.06);
  color:rgba(240,232,210,.65); font-size:15px;
}

/* ---------- шаги ---------- */
.lmxFb__phases{
  display:flex; gap:8px; padding:11px 18px; flex-wrap:wrap;
  border-bottom:1px solid rgba(240,232,210,.08);
}
.lmxFb__phases span{
  padding:5px 11px; border-radius:6px;
  border:1px solid rgba(240,232,210,.14); background:rgba(0,0,0,.3);
  font-family:var(--noir-display, inherit);
  font-weight:700; font-size:10px; letter-spacing:.1em; color:rgba(240,232,210,.4);
}
.lmxFb__phases span.is-done{ border-color:rgba(120,220,150,.35); color:#7deba0; }
.lmxFb__phases span.is-on{
  border-color:rgba(242,196,0,.65); color:var(--yellow,#f2c400); background:rgba(242,196,0,.1);
}

/* ---------- тело ---------- */
.lmxFb__body{ flex:1 1 auto; min-height:0; display:flex; }
.lmxFb__stage{ flex:1 1 auto; min-width:0; overflow-y:auto; padding:16px 18px 18px; }
.lmxFb__logBox{
  flex:0 0 216px; overflow-y:auto;
  border-left:1px solid rgba(240,232,210,.08); background:rgba(0,0,0,.25);
  padding:14px;
}
.lmxFb__logHead{
  font-family:var(--noir-display, inherit); font-weight:700;
  font-size:9.5px; letter-spacing:.14em; color:var(--yellow,#f2c400); margin-bottom:10px;
}
.lmxFb__logRow{ padding:7px 0; border-bottom:1px solid rgba(240,232,210,.06); }
.lmxFb__logRow b{ display:block; font-size:11.5px; font-weight:600; color:#f5f1e6; }
.lmxFb__logRow i{ display:block; margin-top:2px; font-size:10.5px; font-style:normal; color:rgba(240,232,210,.4); }

.lmxFb__hint{ font-size:12px; line-height:1.55; color:rgba(240,232,210,.55); margin-bottom:14px; }

/* ---------- поле микроскопа ---------- */
.lmxFb__scope{
  position:relative; overflow:hidden;
  border:1px solid rgba(240,232,210,.16); border-radius:10px;
  background:#0d0f13;
  transition:border-color .2s ease;
}
.lmxFb__scope.is-ok{ border-color:rgba(125,235,160,.55); }
.lmxFb__svg{ position:absolute; inset:0; width:100%; height:100%; display:block; }
.lmxFb__scopeInner{
  position:absolute; inset:0;
  transition:filter .1s linear, transform .15s ease;
  transform-origin:50% 50%;
}
.lmxFb__retic{
  position:absolute; inset:0; z-index:3; pointer-events:none;
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(242,196,0,.28) calc(50% - 0.5px),
      rgba(242,196,0,.28) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(0deg, transparent calc(50% - 0.5px), rgba(242,196,0,.28) calc(50% - 0.5px),
      rgba(242,196,0,.28) calc(50% + 0.5px), transparent calc(50% + 0.5px));
}
.lmxFb__zoomTag{
  position:absolute; right:7px; bottom:7px; z-index:4;
  padding:2px 7px; border-radius:5px;
  font-size:8.5px; font-weight:800; letter-spacing:.08em;
  background:rgba(0,0,0,.65); border:1px solid rgba(242,196,0,.35);
  color:var(--yellow,#f2c400);
}

.lmxFb__focusWrap{ display:flex; gap:20px; align-items:flex-start; flex-wrap:wrap; }
.lmxFb__focusWrap > .lmxFb__scope{
  flex:0 0 auto; width:min(58%,420px); aspect-ratio:3/2; min-width:260px;
}
.lmxFb__scope--ref{ width:100%; aspect-ratio:3/2; }
.lmxFb__scope--thumb{ width:100%; aspect-ratio:3/2; }
.lmxFb__scope--chip{ flex:0 0 auto; width:52px; height:36px; border-radius:7px; }
.lmxFb__scope--row{ flex:0 0 auto; width:64px; height:44px; border-radius:7px; }
.lmxFb__scope--big{ width:100%; aspect-ratio:3/2; }

/* ---------- боковая колонка ---------- */
.lmxFb__side{ flex:1 1 230px; min-width:210px; }
.lmxFb__sideHead{
  font-size:9px; font-weight:800; letter-spacing:.14em;
  color:rgba(240,232,210,.4); margin-bottom:6px;
}
.lmxFb__sideVal{ font-size:12.5px; color:#f5f1e6; margin-bottom:12px; line-height:1.4; }
.lmxFb__range{ width:100%; margin:2px 0 4px; accent-color:var(--yellow,#f2c400); }
.lmxFb__scaleHint{
  display:flex; justify-content:space-between;
  font-size:9px; color:rgba(240,232,210,.3);
}
.lmxFb__gauge{
  height:8px; border-radius:5px; overflow:hidden;
  background:rgba(0,0,0,.45); border:1px solid rgba(240,232,210,.12);
}
.lmxFb__gauge i{
  display:block; height:100%; width:0;
  background:linear-gradient(90deg,#8a6f00,#f2c400);
  transition:width .3s ease;
}
.lmxFb__gaugeVal{
  margin-top:6px; font-family:var(--noir-display, inherit);
  font-size:19px; font-weight:700; color:var(--yellow,#f2c400); letter-spacing:.04em;
}

/* ---------- подбор пары ---------- */
.lmxFb__pickWrap{ display:flex; gap:20px; align-items:flex-start; flex-wrap:wrap; }
.lmxFb__refCol{ flex:0 0 auto; width:min(34%,240px); min-width:190px; }
.lmxFb__baseCol{ flex:1 1 330px; min-width:280px; }
.lmxFb__colHead{
  font-family:var(--noir-display, inherit); font-weight:700;
  font-size:9.5px; letter-spacing:.14em; color:var(--yellow,#f2c400); margin-bottom:9px;
}
.lmxFb__refMeta{ margin-top:9px; font-size:11px; line-height:1.5; color:rgba(240,232,210,.5); }
.lmxFb__refMeta b{ color:#f5f1e6; }
.lmxFb__grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.lmxFb__cell{
  position:relative; padding:7px 7px 6px; border-radius:9px; cursor:pointer;
  border:1px solid rgba(240,232,210,.14); background:rgba(0,0,0,.3);
  color:inherit; font-family:inherit; text-align:center;
  transition:border-color .15s ease, background .15s ease, opacity .15s ease;
}
.lmxFb__cell:hover{ border-color:rgba(242,196,0,.5); }
.lmxFb__cellCode{
  display:block; margin-top:6px; font-size:9.5px; font-weight:800;
  letter-spacing:.08em; color:rgba(240,232,210,.55);
}
.lmxFb__cellMark{
  position:absolute; right:5px; top:5px;
  width:17px; height:17px; border-radius:50%; opacity:0;
  display:flex; align-items:center; justify-content:center;
  font-size:10px; background:var(--yellow,#f2c400); color:#100f0d;
}
.lmxFb__cell.is-ok{ border-color:rgba(242,196,0,.85); background:rgba(242,196,0,.09); }
.lmxFb__cell.is-ok .lmxFb__cellMark{ opacity:1; }
.lmxFb__cell.is-ok .lmxFb__cellCode{ color:var(--yellow,#f2c400); }
.lmxFb__cell.is-bad{ border-color:rgba(220,90,90,.5); opacity:.45; }
.lmxFb__pickNote{ margin-top:11px; font-size:11.5px; color:rgba(240,232,210,.45); }
.lmxFb__pickNote.is-ok{ color:#7deba0; }
.lmxFb__pickNote.is-bad{ color:#ffb0b0; }

/* ---------- состав ---------- */
.lmxFb__compWrap{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
.lmxFb__compCol{ min-width:0; }
.lmxFb__comp{ padding:9px 0 11px; border-bottom:1px solid rgba(240,232,210,.07); }
.lmxFb__compTop{
  display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:6px;
}
.lmxFb__compTop span{ font-size:11.5px; color:rgba(240,232,210,.65); }
.lmxFb__compTop b{ font-family:var(--noir-display, inherit); font-size:13px; color:rgba(240,232,210,.35); }
.lmxFb__comp.is-done .lmxFb__compTop span{ color:#f5f1e6; }
.lmxFb__comp.is-done .lmxFb__compTop b{ color:var(--yellow,#f2c400); }
.lmxFb__comp .lmxFb__btn--mini{ margin-top:8px; }

/* ---------- кнопки ---------- */
.lmxFb__acts{ display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }
.lmxFb__btn{
  padding:10px 16px; border-radius:9px; cursor:pointer;
  border:1px solid rgba(240,232,210,.2); background:rgba(255,255,255,.05);
  font-family:var(--noir-display, inherit); font-weight:700;
  font-size:11px; letter-spacing:.1em; color:#f0e8d2;
}
.lmxFb__btn:disabled{ opacity:.4; cursor:default; }
.lmxFb__btn--gold{
  background:linear-gradient(180deg,#f2c400,#c99f00); color:#100f0d; border-color:#f2c400;
}
.lmxFb__btn--mini{ padding:6px 11px; font-size:9.5px; }

/* ---------- итог и холостой вход ---------- */
.lmxFb__done,
.lmxFb__idle{ text-align:center; padding:20px 6px 6px; }
.lmxFb__doneIco,
.lmxFb__idleIco{ font-size:34px; }
.lmxFb__donePct{
  margin-top:8px; font-family:var(--noir-display, inherit);
  font-size:52px; font-weight:700; line-height:1; color:var(--yellow,#f2c400);
}
.lmxFb__doneLbl,
.lmxFb__idleTitle{
  margin-top:9px; font-family:var(--noir-display, inherit);
  font-size:13px; font-weight:700; letter-spacing:.13em; color:#f5f1e6;
}
.lmxFb__doneText,
.lmxFb__idleText{
  margin:12px auto 0; max-width:470px;
  font-size:12.5px; line-height:1.6; color:rgba(240,232,210,.55);
}
.lmxFb__idleText b{ color:#f5f1e6; }

/* ══════════════════════════════════════════════════════════════
   ОТЧЁТ ОБ ЭКСПЕРТИЗЕ
   (рамка .lmxRep__* — из lab_dna.css, здесь только своё)
   ══════════════════════════════════════════════════════════════ */
#lmxFbRep{
  position:fixed; inset:0; z-index:100085;
  overflow-y:auto; padding:20px; box-sizing:border-box;
  background:rgba(0,0,0,.92);
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  font-family:var(--sans, system-ui, sans-serif); color:#f0e8d2;
}
#lmxFbRep .lmxRep__grid{
  grid-template-columns:repeat(12,minmax(0,1fr));
  align-items:stretch;
}
#lmxFbRep .lmxFbRep__cCtx { grid-column:1 / span 12; grid-row:1; }
#lmxFbRep .lmxFbRep__cList{ grid-column:1 / span 3;  grid-row:2; }
#lmxFbRep .lmxFbRep__cCmp { grid-column:4 / span 5;  grid-row:2; }
#lmxFbRep .lmxFbRep__cRes { grid-column:9 / span 4;  grid-row:2; }
#lmxFbRep .lmxFbRep__cComp{ grid-column:1 / span 5;  grid-row:3; }
#lmxFbRep .lmxFbRep__cChar{ grid-column:6 / span 3;  grid-row:3; }
#lmxFbRep .lmxFbRep__cConc{ grid-column:9 / span 4;  grid-row:3; }

/* верхняя полоса контекста и образцов */
.lmxFbRep__chips{ display:flex; gap:11px; flex-wrap:wrap; align-items:stretch; }
.lmxFbRep__ctx{
  flex:1 1 200px; min-width:180px; padding:9px 11px; border-radius:9px;
  border:1px solid rgba(240,232,210,.1); background:rgba(0,0,0,.28);
  font-size:11.5px; line-height:1.5; color:rgba(240,232,210,.55);
}
.lmxFbRep__chip{
  flex:1 1 170px; min-width:160px;
  display:flex; gap:9px; align-items:center;
  padding:8px 10px; border-radius:9px;
  border:1px solid rgba(240,232,210,.1); background:rgba(0,0,0,.28);
}
.lmxFbRep__chip.is-ref{ border-color:rgba(240,232,210,.28); }
.lmxFbRep__chip.is-ok{ border-color:rgba(242,196,0,.45); background:rgba(242,196,0,.07); }
.lmxFbRep__chipBody{ min-width:0; }
.lmxFbRep__chipBody b{ display:block; font-size:11.5px; color:#f5f1e6; }
.lmxFbRep__chipBody span{ display:block; margin-top:2px; font-size:10px; line-height:1.4; color:rgba(240,232,210,.4); }

/* список сравниваемых образцов */
.lmxFbRep__row{
  display:flex; gap:9px; align-items:center;
  padding:8px; margin-bottom:8px; border-radius:9px;
  border:1px solid rgba(240,232,210,.1); background:rgba(0,0,0,.28);
}
.lmxFbRep__row.is-ok{ border-color:rgba(242,196,0,.45); background:rgba(242,196,0,.07); }
.lmxFbRep__letter{
  flex:0 0 auto; width:22px; height:22px; border-radius:5px;
  display:flex; align-items:center; justify-content:center;
  font-family:var(--noir-display, inherit); font-size:11px; font-weight:700;
  background:rgba(240,232,210,.1); color:rgba(240,232,210,.7);
}
.lmxFbRep__row.is-ok .lmxFbRep__letter{ background:var(--yellow,#f2c400); color:#100f0d; }
.lmxFbRep__rowBody{ min-width:0; }
.lmxFbRep__rowBody b{ display:block; font-size:10px; font-weight:800; letter-spacing:.08em; color:rgba(240,232,210,.45); }
.lmxFbRep__rowBody span{ display:block; margin-top:2px; font-size:11.5px; line-height:1.35; color:#f5f1e6; }
.lmxFbRep__rowBody i{ display:block; margin-top:2px; font-size:10px; font-style:normal; color:rgba(240,232,210,.35); }

/* сравнение волокон */
.lmxFbRep__split{ display:flex; gap:10px; align-items:center; }
.lmxFbRep__half{ flex:1 1 0; min-width:0; }
.lmxFbRep__halfTop{
  margin-bottom:7px; font-size:9.5px; font-weight:800; letter-spacing:.1em;
  color:rgba(242,196,0,.7);
}
.lmxFbRep__halfTop span{
  display:block; margin-top:3px; font-weight:400; letter-spacing:0;
  font-size:10.5px; color:rgba(240,232,210,.4);
}
.lmxFbRep__badge{
  flex:0 0 auto; padding:9px 11px; border-radius:9px; text-align:center;
  border:1px solid rgba(240,232,210,.2); background:rgba(0,0,0,.5);
}
.lmxFbRep__badge span{ display:block; font-size:8px; font-weight:800; letter-spacing:.1em; color:rgba(240,232,210,.45); }
.lmxFbRep__badge b{ display:block; margin-top:3px; font-family:var(--noir-display, inherit); font-size:19px; }
.lmxFbRep__badge.is-high{ border-color:rgba(125,235,160,.5); }
.lmxFbRep__badge.is-high b{ color:#7deba0; }
.lmxFbRep__badge.is-low{ border-color:rgba(220,90,90,.4); }
.lmxFbRep__badge.is-low b{ color:#ffb0b0; }

/* заключение внутри результатов */
.lmxFbRep__verdict{
  margin-top:14px; padding:11px 12px; border-radius:9px;
  border:1px solid rgba(240,232,210,.14); background:rgba(0,0,0,.3);
}
.lmxFbRep__verdict.is-high{ border-color:rgba(125,235,160,.4); background:rgba(125,235,160,.06); }
.lmxFbRep__verdict.is-low{ border-color:rgba(220,90,90,.35); background:rgba(220,90,90,.05); }
.lmxFbRep__verdictHead{ font-size:8.5px; font-weight:800; letter-spacing:.14em; color:rgba(240,232,210,.4); }
.lmxFbRep__verdictTitle{
  margin-top:4px; font-family:var(--noir-display, inherit);
  font-size:14px; font-weight:700; letter-spacing:.06em;
}
.lmxFbRep__verdict.is-high .lmxFbRep__verdictTitle{ color:#7deba0; }
.lmxFbRep__verdict.is-low .lmxFbRep__verdictTitle{ color:#ffb0b0; }
.lmxFbRep__verdict p{ margin:7px 0 0; font-size:11.5px; line-height:1.55; color:rgba(240,232,210,.6); }

.lmxFbRep__extra{ margin-top:12px; }
.lmxFbRep__extra span{ font-size:8.5px; font-weight:800; letter-spacing:.14em; color:rgba(240,232,210,.35); }
.lmxFbRep__extra p{ margin:6px 0 0; font-size:11px; line-height:1.5; color:rgba(240,232,210,.45); }

/* состав материала */
.lmxFbRep__compCols{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px 18px; }
.lmxFbRep__comp{ margin-bottom:9px; }
.lmxFbRep__compTop{
  display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-bottom:4px;
}
.lmxFbRep__compTop span{ font-size:10.5px; color:rgba(240,232,210,.55); }
.lmxFbRep__compTop b{ font-size:11px; font-weight:700; color:#f5f1e6; }

.lmxFbRep__concText{ margin:0 0 12px; font-size:11.5px; line-height:1.6; color:rgba(240,232,210,.6); }
.lmxFbRep__stamp{
  display:flex; gap:18px; flex-wrap:wrap; margin-top:14px; padding-top:11px;
  border-top:1px solid rgba(240,232,210,.08);
  font-size:10.5px; color:rgba(240,232,210,.35);
}
.lmxFbRep__stamp b{ color:rgba(240,232,210,.6); }

/* ══════════════════════════════════════════════════════════════
   АДАПТИВ
   ══════════════════════════════════════════════════════════════ */
@media (max-width:1250px){
  #lmxFbRep .lmxRep__grid{ grid-template-columns:repeat(6,minmax(0,1fr)); }
  #lmxFbRep .lmxFbRep__cCtx { grid-column:1 / span 6; grid-row:auto; }
  #lmxFbRep .lmxFbRep__cCmp { grid-column:1 / span 6; grid-row:auto; }
  #lmxFbRep .lmxFbRep__cList{ grid-column:1 / span 3; grid-row:auto; }
  #lmxFbRep .lmxFbRep__cRes { grid-column:4 / span 3; grid-row:auto; }
  #lmxFbRep .lmxFbRep__cComp{ grid-column:1 / span 6; grid-row:auto; }
  #lmxFbRep .lmxFbRep__cChar{ grid-column:1 / span 3; grid-row:auto; }
  #lmxFbRep .lmxFbRep__cConc{ grid-column:4 / span 3; grid-row:auto; }
}
@media (max-width:900px){
  .lmxFb__logBox{ display:none; }
}
@media (max-width:760px){
  #lmxFb{ padding:0; }
  .lmxFb__box{ max-width:none; max-height:100vh; height:100vh; border-radius:0; border:none; }
  .lmxFb__title{ font-size:20px; }
  .lmxFb__focusWrap,
  .lmxFb__pickWrap{ flex-direction:column; align-items:stretch; }
  .lmxFb__focusWrap > .lmxFb__scope{ width:100%; min-width:0; }
  .lmxFb__refCol{ width:100%; min-width:0; }
  .lmxFb__baseCol,
  .lmxFb__side{ min-width:0; }
  .lmxFb__compWrap{ grid-template-columns:minmax(0,1fr); gap:6px; }
  .lmxFb__acts .lmxFb__btn{ flex:1 1 150px; text-align:center; }

  #lmxFbRep{ padding:0; }
  #lmxFbRep .lmxRep__grid{ grid-template-columns:minmax(0,1fr); }
  #lmxFbRep .lmxFbRep__cCtx,
  #lmxFbRep .lmxFbRep__cList,
  #lmxFbRep .lmxFbRep__cCmp,
  #lmxFbRep .lmxFbRep__cRes,
  #lmxFbRep .lmxFbRep__cComp,
  #lmxFbRep .lmxFbRep__cChar,
  #lmxFbRep .lmxFbRep__cConc{ grid-column:1 / -1; grid-row:auto; }
  .lmxFbRep__split{ flex-direction:column; align-items:stretch; }
  .lmxFbRep__compCols{ grid-template-columns:minmax(0,1fr); }
}
