/* 22489721: своя сцена «Поиск решения» в окне таблицы. Разметка works/22489721/stage.html (собирает make_stage.py),
   движение static/kinds/22489721.js. Без скрипта: окно в итоговом состоянии и окно параметров рядом.
   Режим истории (класс story на html) — правила с :is(.story *): окно фиксированного размера, вписано в сцену. */

#w22489721 .xw-fit {
  --xg: #1f7a4a; --xgd: #17603a; --xtx: #1f2328; --xmu: #60656c; --xgrid: #e4e6e9; --xhd: #f3f4f6; --xhdl: #dadde1;
  --xvar: #fff3c4; --xvarb: #d9a400; --xm: #1c6fd1; --xl: #8a4fd8; --xd: #7d858f; --xr1: #2a6fdb; --xr2: #c2357a;
  position: relative; display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; width: 100%;
  font: 400 13px/1.25 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; color: var(--xtx);
  font-variant-numeric: tabular-nums; text-align: left; -webkit-user-select: none; user-select: none;
}
#w22489721 .xw-fit *::before, #w22489721 .xw-fit *::after { box-sizing: border-box; }
#w22489721 .xw {
  position: relative; display: flex; flex-direction: column; width: 100%; max-width: 860px; overflow: hidden;
  background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px rgba(14, 26, 58, 0.16), 0 40px 80px -40px rgba(14, 26, 58, 0.55);
}

/* ——— Заголовок окна ——— */
#w22489721 .xw-title { flex: none; display: flex; align-items: center; height: 30px; padding: 0 12px; background: var(--xgd); color: #fff; font-size: 12.5px; }
#w22489721 .xw-lights { display: flex; gap: 7px; width: 200px; }
#w22489721 .xw-lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff6159; }
#w22489721 .xw-lights i:nth-child(2) { background: #ffbd2e; }
#w22489721 .xw-lights i:nth-child(3) { background: #28c941; }
#w22489721 .xw-name-f { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; min-width: 0; }
#w22489721 .xw-name-f b { font-weight: 600; }
#w22489721 .xw-app {
  flex: none; width: 15px; height: 15px; border-radius: 3px;
  background: linear-gradient(var(--xgd), var(--xgd)) 7px 0 / 1.5px 100% no-repeat, linear-gradient(var(--xgd), var(--xgd)) 0 7px / 100% 1.5px no-repeat, linear-gradient(#bfe3cc, #bfe3cc) 0 0 / 7px 7px no-repeat, #fff;
}
#w22489721 .xw-saved { opacity: 0.7; }
#w22489721 .xw-search { position: relative; width: 200px; height: 20px; padding-left: 26px; border-radius: 5px; background: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.72); font-size: 11.5px; line-height: 20px; }
#w22489721 .xw-search::before { content: ""; position: absolute; left: 9px; top: 5px; width: 8px; height: 8px; border: 1.5px solid currentColor; border-radius: 50%; }
#w22489721 .xw-search::after { content: ""; position: absolute; left: 16px; top: 13.5px; width: 5px; height: 1.5px; background: currentColor; rotate: 45deg; }

/* ——— Вкладки и лента «Данные» ——— */
#w22489721 .xw-tabs { flex: none; display: flex; align-items: flex-end; gap: 2px; height: 28px; padding: 0 8px; background: var(--xgd); color: rgba(255, 255, 255, 0.88); font-size: 12.5px; }
#w22489721 .xw-tabs > span { height: 24px; padding: 0 11px; line-height: 24px; border-radius: 5px 5px 0 0; white-space: nowrap; }
#w22489721 .xw-tabs > .on { background: #f6f7f8; color: var(--xgd); font-weight: 600; }
#w22489721 .xw-tabs > .xw-rbm { display: none; }
#w22489721 .xw-ribbon { flex: none; display: flex; height: 78px; padding: 5px 6px 0; background: #f6f7f8; border-bottom: 1px solid var(--xhdl); }
#w22489721 .xw-grp { display: flex; flex-direction: column; align-items: center; padding: 0 8px; border-right: 1px solid #dfe2e6; }
#w22489721 .xw-grp:last-child { border-right: 0; }
#w22489721 .xw-btns { flex: 1; display: flex; gap: 2px; }
#w22489721 .xw-grp small { font-size: 10.5px; line-height: 17px; color: #6b7178; white-space: nowrap; }
#w22489721 .xw-rbtn {
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 60px; padding: 3px 6px 2px;
  border: 1px solid transparent; border-radius: 4px; font-size: 11px; line-height: 1.12; text-align: center; color: #2b3036;
  transition: background 0.15s, border-color 0.15s;
}
#w22489721 .xw-fit svg path, #w22489721 .xw-fit svg rect, #w22489721 .xw-fit svg ellipse { vector-effect: non-scaling-stroke; }
#w22489721 .xw-rbtn svg, #w22489721 .xw-rbm svg { flex: none; fill: none; stroke: #5f6670; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#w22489721 .xw-rbtn svg .g, #w22489721 .xw-rbm svg .g { stroke: var(--xg); stroke-width: 1.8; }
#w22489721 .xw-rbtn svg .b { stroke: var(--xm); }
#w22489721 .xw-rbtn svg .y, #w22489721 .xw-rbm svg .y { fill: #f2b400; stroke: #8a5d00; stroke-width: 1.2; }
#w22489721 .xw-grp-s .xw-rbtn { color: var(--xgd); font-weight: 600; }
#w22489721 .xw-rbtn.p, #w22489721 .xw-rbm.p { background: #d5eadd; border-color: #8fc3a4; }

/* ——— Строка формул: имя ячейки, формула, ссылки в цвет рамок на листе ——— */
#w22489721 .xw-fx { flex: none; display: flex; align-items: center; height: 30px; background: #fff; border-bottom: 1px solid var(--xhdl); }
#w22489721 .xw-name { position: relative; flex: none; width: 76px; height: 22px; margin: 0 6px; padding: 0 6px; border: 1px solid #cfd3d8; border-radius: 3px; line-height: 20px; font-weight: 600; }
#w22489721 .xw-name::after { content: ""; position: absolute; right: 6px; top: 8px; border: 4px solid transparent; border-top-color: #80868c; }
#w22489721 .xw-fxi { flex: none; display: flex; align-items: center; gap: 12px; height: 100%; padding: 0 12px; border-inline: 1px solid #e3e5e8; color: #a3a8ad; font-size: 12px; }
#w22489721 .xw-fxi i { font-style: normal; }
#w22489721 .xw-fxi b { font: italic 600 13px Georgia, "Times New Roman", serif; color: #555b62; }
#w22489721 .xw-f { padding: 0 10px; white-space: nowrap; overflow: hidden; }
#w22489721 .xw-f i { font-style: normal; font-weight: 600; }
#w22489721 .xw-f .r1 { color: var(--xr1); }
#w22489721 .xw-f .r2 { color: var(--xr2); }
#w22489721 .xw-f.plain i { color: inherit; font-weight: 400; }

/* ——— Сетка листа ——— */
#w22489721 .xw-body { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #fff; }
#w22489721 .xw-t { border-collapse: collapse; table-layout: fixed; width: 528px; max-width: none; }
#w22489721 .xw-t .c0 { width: 34px; }
#w22489721 .xw-t .c1 { width: 150px; }
#w22489721 .xw-t .c2, #w22489721 .xw-t .c3, #w22489721 .xw-t .c5 { width: 58px; }
#w22489721 .xw-t .c4 { width: 66px; }
#w22489721 .xw-t .c6 { width: 104px; }
#w22489721 .xw-t .c7, #w22489721 .xw-t .c8, #w22489721 .xw-t .c9, #w22489721 .xw-t .c10 { width: 82px; }
#w22489721 .xw-t th { height: 22px; padding: 0; background: var(--xhd); color: var(--xmu); font-weight: 400; font-size: 11.5px; text-align: center; border: 1px solid var(--xhdl); }
#w22489721 .xw-t th.hi { background: #d9ebe0; color: var(--xgd); font-weight: 700; }
#w22489721 .xw-t thead th.hi { box-shadow: inset 0 -2px var(--xg); }
#w22489721 .xw-t tbody th.hi { box-shadow: inset -2px 0 var(--xg); }
#w22489721 .xw-t td { height: 27px; padding: 0 8px; border: 1px solid var(--xgrid); white-space: nowrap; overflow: hidden; text-align: left; font-size: 13px; }
#w22489721 .xw-t .n { text-align: right; }
#w22489721 .xw-t .xw-c { text-align: center; }
#w22489721 .xw-t .xw-b { font-weight: 700; }
#w22489721 .xw-t .xw-ttl { font-weight: 700; font-size: 14px; color: var(--xgd); }
#w22489721 .xw-t .xw-cm { color: #8a5d00; font-style: italic; font-size: 12px; }
#w22489721 .xw-t .xw-hd { background: #eef5f0; font-weight: 600; color: #2b3036; border-bottom: 1px solid #98c6aa; }
#w22489721 .xw-t .xw-k { box-shadow: inset 4px 0 var(--k); padding-left: 12px; }
#w22489721 .xw-t .xw-k1 { --k: var(--xm); }
#w22489721 .xw-t .xw-k2 { --k: var(--xl); }
#w22489721 .xw-t .xw-k3 { --k: var(--xd); }
#w22489721 .xw-t .xw-var { background: var(--xvar); color: #6b4700; font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--xvarb); }
#w22489721 .xw-t .xw-tgt { background: #dff1e6; color: var(--xgd); font-weight: 800; font-size: 15px; box-shadow: inset 0 0 0 1.5px var(--xg); }
#w22489721 .xw-t .xw-db { position: relative; }
#w22489721 .xw-db i { position: absolute; left: 4px; top: 5px; bottom: 5px; width: calc((100% - 8px) * var(--v, 0)); background: linear-gradient(90deg, #5cb87f, #d3efdd); border: 1px solid #5cb87f; border-radius: 2px; transition: width 0.25s; }
#w22489721 .xw-db.full i { background: linear-gradient(90deg, #f0813f, #fcdcc6); border-color: #e9692c; }
#w22489721 .xw-db span { position: relative; font-weight: 600; }
#w22489721 .xw-db.full span { color: #a33a05; }
#w22489721 .xw-t td.fl { animation: w22489721-fl 0.7s ease-out; }
@keyframes w22489721-fl { from { background-color: #fff0a0; } }

/* ——— Рамки поверх сетки: активная ячейка, влияющие ячейки, «бегущие муравьи» ——— */
#w22489721 .xw-sel, #w22489721 .xw-ref, #w22489721 .xw-ants { display: none; position: absolute; left: 0; top: 0; pointer-events: none; }
#w22489721 .xw-sel { z-index: 2; border: 2px solid var(--xg); transition: transform 0.2s ease, width 0.2s ease, height 0.2s ease; }
#w22489721 .xw-sel::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 7px; height: 7px; background: var(--xg); border: 1px solid #fff; }
#w22489721 .xw-ref { z-index: 1; border: 1.5px solid var(--c); opacity: 0; transition: opacity 0.2s; }
#w22489721 .xw-ref::before, #w22489721 .xw-ref::after { content: ""; position: absolute; width: 5px; height: 5px; background: var(--c); }
#w22489721 .xw-ref::before { left: -3px; top: -3px; }
#w22489721 .xw-ref::after { right: -3px; bottom: -3px; }
#w22489721 .xw-ref1 { --c: var(--xr1); background: rgba(42, 111, 219, 0.08); }
#w22489721 .xw-ref2 { --c: var(--xr2); background: rgba(194, 53, 122, 0.08); }
#w22489721 .xw-ref.on { opacity: 1; }
#w22489721 .xw-ants {
  z-index: 3; opacity: 0; transition: opacity 0.15s;
  background:
    linear-gradient(90deg, var(--xg) 50%, #fff 0) 0 0 / 8px 2px repeat-x,
    linear-gradient(90deg, var(--xg) 50%, #fff 0) 0 100% / 8px 2px repeat-x,
    linear-gradient(0deg, var(--xg) 50%, #fff 0) 0 0 / 2px 8px repeat-y,
    linear-gradient(0deg, var(--xg) 50%, #fff 0) 100% 0 / 2px 8px repeat-y;
  animation: w22489721-ants 0.6s linear infinite;
}
#w22489721 .xw-ants.on { opacity: 1; }
@keyframes w22489721-ants { to { background-position: 8px 0, -8px 100%, 0 -8px, 100% 8px; } }

/* ——— Диаграмма на листе ——— */
#w22489721 .xw-chart { margin: 0; display: flex; flex-direction: column; width: min(100%, 318px); background: #fff; border: 1px solid #cfd3d8; border-radius: 2px; box-shadow: 0 8px 22px -12px rgba(0, 0, 0, 0.35); }
#w22489721 .xw-ch-h { display: flex; flex-direction: column; gap: 3px; padding: 8px 12px 0; }
#w22489721 .xw-ch-h b { font-size: 13px; font-weight: 600; }
#w22489721 .xw-lg { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: #60656c; white-space: nowrap; }
#w22489721 .xw-lg i { flex: none; width: 12px; height: 8px; margin-left: 7px; }
#w22489721 .xw-lg i:first-child { margin-left: 0; }
#w22489721 .xw-lg .lg-f { background: rgba(47, 158, 91, 0.2); border: 1px solid rgba(47, 158, 91, 0.55); }
#w22489721 .xw-lg .lg-i { height: 0; border-top: 2px dashed var(--xg); }
#w22489721 .xw-lg .lg-p { width: 8px; height: 8px; border-radius: 50%; background: #f2b400; }
#w22489721 .xw-plot { display: block; width: 100%; height: auto; overflow: visible; font-family: inherit; }
#w22489721 .xw-plot .cg { stroke: #eceef1; stroke-width: 1; }
#w22489721 .xw-plot .cf { fill: rgba(47, 158, 91, 0.15); stroke: rgba(47, 158, 91, 0.5); stroke-width: 1; }
#w22489721 .xw-plot .cl { stroke-width: 2; stroke-linecap: round; }
#w22489721 .xw-plot .cl-m { stroke: var(--xm); }
#w22489721 .xw-plot .cl-l { stroke: var(--xl); }
#w22489721 .xw-plot .cl-d { stroke: var(--xd); stroke-dasharray: 5 4; }
#w22489721 .xw-plot .ca { stroke: #9aa0a6; stroke-width: 1; }
#w22489721 .xw-plot .ck { font-size: 10.5px; fill: #6b7178; }
#w22489721 .xw-plot .ct2 { font-size: 11px; fill: #4a5058; }
#w22489721 .xw-plot .cn { font-size: 11px; font-weight: 700; }
#w22489721 .xw-plot .cn-m { fill: var(--xm); }
#w22489721 .xw-plot .cn-l { fill: var(--xl); }
#w22489721 .xw-plot .cn-d { fill: #6b7178; }
#w22489721 .xw-plot .cl, #w22489721 .xw-plot .cn { transition: stroke-width 0.3s, opacity 0.3s; }
#w22489721 .xw-plot.bind .cl-m, #w22489721 .xw-plot.bind .cl-l { stroke-width: 3.2; }
#w22489721 .xw-plot.bind .cl-d, #w22489721 .xw-plot.bind .cn-d { opacity: 0.45; }
#w22489721 .xw-lg .lg-m { display: none; }
#w22489721 .xw-plot .cvl { opacity: 0; transition: opacity 0.4s 0.15s; }
#w22489721 .xw-plot.bind .cvl { opacity: 1; }
#w22489721 .xw-plot .cvt { font-size: 10.5px; font-weight: 600; fill: #6b7178; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
#w22489721 .xw-plot .cv { fill: #fff; stroke: #2f9e5b; stroke-width: 1.4; }
#w22489721 .xw-plot .ci { stroke: var(--xg); stroke-width: 1.6; stroke-dasharray: 6 4; }
#w22489721 .xw-plot .ctr { fill: none; stroke: #e0a100; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
#w22489721 .xw-plot .co { fill: none; stroke: var(--xg); stroke-width: 2; opacity: 0; transition: opacity 0.3s; }
#w22489721 .xw-plot .co.on { opacity: 1; }
#w22489721 .xw-plot .ch { fill: rgba(242, 180, 0, 0.28); }
#w22489721 .xw-plot .cp { fill: #f2b400; stroke: #fff; stroke-width: 2; }
#w22489721 .xw-plot .cb { font-size: 12px; font-weight: 700; fill: var(--xtx); paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }

/* ——— Вывод на листе (надпись) ——— */
#w22489721 .xw-note { counter-reset: n; padding: 10px 14px; background: #fffdf4; border: 1px solid #e2d6b0; box-shadow: 0 8px 22px -12px rgba(0, 0, 0, 0.3); font-size: 12.5px; line-height: 1.3; }
#w22489721 .xw-note b { display: block; margin-bottom: 4px; color: var(--xgd); }
#w22489721 .xw-note p { position: relative; margin: 0 0 3px; padding-left: 18px; }
#w22489721 .xw-note p::before { counter-increment: n; content: counter(n) "."; position: absolute; left: 0; font-weight: 700; color: var(--xgd); }
#w22489721 .xw-note em { font-style: normal; font-weight: 700; color: var(--xgd); }

/* ——— Выдержка из отчёта по устойчивости ——— */
#w22489721 .xw-sens { padding: 9px 12px; background: #fff; border: 1px solid #cfd3d8; box-shadow: 0 8px 22px -12px rgba(0, 0, 0, 0.3); font-size: 12px; }
#w22489721 .xw-sens b { display: block; margin-bottom: 6px; font-size: 12.5px; color: var(--xgd); }
#w22489721 .xw-sens table { width: 100%; border-collapse: collapse; }
#w22489721 .xw-sens th { padding: 0 6px 4px; color: var(--xmu); font-weight: 400; font-size: 10.5px; line-height: 1.15; text-align: right; vertical-align: bottom; border-bottom: 1px solid #cfd3d8; }
#w22489721 .xw-sens th:first-child, #w22489721 .xw-sens td:first-child { text-align: left; padding-left: 0; }
#w22489721 .xw-sens td { padding: 3px 6px; text-align: right; border-bottom: 1px solid #eceef1; white-space: nowrap; }
#w22489721 .xw-sens tr.bd td { background: #fff1e6; }
#w22489721 .xw-sens tr.bd td:nth-child(2) { color: #a33a05; font-weight: 700; }

/* ——— Ярлыки листов и строка состояния ——— */
#w22489721 .xw-sheets { flex: none; display: flex; align-items: stretch; height: 28px; padding: 0 8px; background: var(--xhd); border-top: 1px solid var(--xhdl); font-size: 12px; overflow: hidden; }
#w22489721 .xw-nav { flex: none; width: 40px; background: linear-gradient(135deg, transparent 46%, #9aa0a6 47% 53%, transparent 54%) 10px 50% / 7px 7px no-repeat, linear-gradient(45deg, transparent 46%, #9aa0a6 47% 53%, transparent 54%) 10px calc(50% + 0px) / 7px 7px no-repeat; }
#w22489721 .xw-tab { display: flex; align-items: center; padding: 0 14px; border-right: 1px solid #dfe2e6; color: #4a5058; white-space: nowrap; overflow: hidden; }
#w22489721 .xw-tab.on { background: #fff; color: var(--xgd); font-weight: 700; box-shadow: inset 0 -3px var(--xg); }
#w22489721 .xw-tab.xw-rep { color: var(--xgd); background: #e6f3ea; }
#w22489721 .xw-plus { position: relative; flex: none; width: 30px; }
#w22489721 .xw-plus::before { content: ""; position: absolute; left: 9px; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: linear-gradient(#80868c, #80868c) 50% / 100% 1.5px no-repeat, linear-gradient(#80868c, #80868c) 50% / 1.5px 100% no-repeat; }
#w22489721 .xw-status { flex: none; display: flex; align-items: center; gap: 8px; height: 24px; padding: 0 12px; background: #eceef1; border-top: 1px solid var(--xhdl); color: #3b4047; font-size: 11.5px; white-space: nowrap; }
#w22489721 .xw-sti { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #9aa0a6; }
#w22489721 .xw-status.busy .xw-sti { background: #f2b400; animation: w22489721-pulse 0.7s ease-in-out infinite alternate; }
#w22489721 .xw-status.done .xw-sti { background: #2f9e5b; }
#w22489721 .xw-status.done [data-x="st"] { color: var(--xgd); font-weight: 600; }
@keyframes w22489721-pulse { to { box-shadow: 0 0 0 4px rgba(242, 180, 0, 0.3); } }
#w22489721 .xw-zm { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--xmu); }
#w22489721 .xw-zm i { width: 13px; height: 10px; border: 1.3px solid #8a9097; border-radius: 1.5px; }
#w22489721 .xw-zm i:first-child { border-color: var(--xg); background: linear-gradient(var(--xg), var(--xg)) 50% 50% / 100% 1px no-repeat; }
#w22489721 .xw-zm b { position: relative; width: 92px; height: 2px; margin: 0 4px; background: #b5bac0; }
#w22489721 .xw-zm b::after { content: ""; position: absolute; left: 50%; top: -4px; width: 3px; height: 10px; margin-left: -1.5px; background: #555b62; }

/* ——— Окна «Параметры поиска решения» и «Результаты поиска решения» ——— */
#w22489721 .xw-dlg, #w22489721 .xw-res { width: 318px; overflow: hidden; background: #f7f7f8; border-radius: 8px; font-size: 12px; line-height: 1.3; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16), 0 24px 50px -14px rgba(0, 0, 0, 0.42); }
#w22489721 .xw-res { display: none; }
#w22489721 .xw-dh { display: flex; align-items: center; justify-content: space-between; height: 30px; padding: 0 10px 0 12px; background: #fff; border-bottom: 1px solid #e3e5e8; }
#w22489721 .xw-dh b { font-size: 12.5px; font-weight: 600; }
#w22489721 .xw-x { width: 10px; height: 10px; background: linear-gradient(45deg, transparent 44%, #7a8087 44% 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, #7a8087 44% 56%, transparent 56%); }
#w22489721 .xw-db1 { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px 8px; }
#w22489721 .xw-l { margin: 3px 0 3px; color: #3b4047; }
#w22489721 .xw-in { display: flex; align-items: center; height: 24px; padding: 0 4px 0 7px; background: #fff; border: 1px solid #c4c9cf; border-radius: 3px; font: 12px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; transition: border-color 0.15s, box-shadow 0.15s; }
#w22489721 .xw-in span { flex: 1; white-space: nowrap; }
#w22489721 .xw-in.f, #w22489721 .xw-list.f { border-color: var(--xg); box-shadow: 0 0 0 2px rgba(31, 122, 74, 0.2); }
#w22489721 .xw-in.f span::after { content: ""; display: inline-block; width: 1px; height: 13px; margin-left: 1px; background: #111; vertical-align: -2px; animation: w22489721-caret 1s steps(1) infinite; }
@keyframes w22489721-caret { 50% { opacity: 0; } }
#w22489721 .xw-rf { position: relative; flex: none; width: 17px; height: 15px; border: 1px solid #a3a8ad; border-radius: 2px; background: #f3f4f6; }
#w22489721 .xw-rf::after { content: ""; position: absolute; left: 3px; bottom: 3px; width: 6px; height: 4px; border: 1.5px solid var(--xg); border-radius: 1px; }
#w22489721 .xw-rad { display: flex; align-items: center; gap: 12px; margin: 1px 0 2px; }
#w22489721 .xw-rad span:not(.xw-l2) { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
#w22489721 .xw-rad span:not(.xw-l2)::before { content: ""; flex: none; width: 12px; height: 12px; border: 1px solid #8a9097; border-radius: 50%; background: #fff; }
#w22489721 .xw-rad span.on::before { border: 4px solid var(--xg); }
#w22489721 .xw-cons { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
#w22489721 .xw-list { display: flex; flex-direction: column; gap: 2px; height: 66px; padding: 4px; background: #fff; border: 1px solid #c4c9cf; border-radius: 3px; font: 11.5px/1.35 ui-monospace, "SF Mono", Menlo, Consolas, monospace; transition: border-color 0.15s, box-shadow 0.15s; }
#w22489721 .xw-list span { padding: 1px 4px; border-radius: 2px; white-space: nowrap; }
#w22489721 .xw-list span.on:last-child, #w22489721 .xw-list span.on:has(+ span:not(.on)) { background: #dcebe1; }
#w22489721 .xw-side { display: flex; flex-direction: column; gap: 4px; }
#w22489721 .xw-btn { display: block; padding: 3px 10px; background: #fff; border: 1px solid #c4c9cf; border-radius: 4px; text-align: center; font-size: 11.5px; white-space: nowrap; transition: background 0.12s, transform 0.12s, box-shadow 0.12s; }
#w22489721 .xw-btn.p { background: #e2e5e8; transform: translateY(1px); }
#w22489721 .xw-go { background: var(--xg); border-color: var(--xgd); color: #fff; font-weight: 600; }
#w22489721 .xw-go.p { background: #124a2d; box-shadow: 0 0 0 3px rgba(31, 122, 74, 0.28); }
#w22489721 .xw-chk { display: flex; align-items: center; gap: 6px; margin: 5px 0 0; }
#w22489721 .xw-chk::before {
  content: ""; flex: none; width: 13px; height: 13px; border-radius: 3px;
  background: var(--xg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.3l2.2 2.2 4.6-4.8' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
#w22489721 .xw-r-m { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
#w22489721 .xw-dd { position: relative; flex: 1; height: 22px; padding: 0 22px 0 7px; background: #fff; border: 1px solid #c4c9cf; border-radius: 3px; line-height: 20px; white-space: nowrap; }
#w22489721 .xw-dd::after { content: ""; position: absolute; right: 7px; top: 8px; border: 4px solid transparent; border-top-color: #6b7178; }
#w22489721 .xw-df { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 12px 10px; background: #f0f1f3; border-top: 1px solid #e3e5e8; }
#w22489721 .xw-rb { display: flex; flex-direction: column; gap: 9px; padding: 10px 12px; }
#w22489721 .xw-ok { position: relative; margin: 0; padding: 8px 10px 8px 34px; background: #e4f3e9; border-radius: 6px; color: var(--xgd); font-weight: 600; }
#w22489721 .xw-ok::before {
  content: ""; position: absolute; left: 10px; top: 9px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--xg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.3l2.2 2.2 4.6-4.8' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
#w22489721 .xw-rg { display: flex; flex-direction: column; gap: 9px; }
#w22489721 .xw-rad-v { flex-direction: column; align-items: flex-start; gap: 6px; }
#w22489721 .xw-reps { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
#w22489721 .xw-reps small { margin-right: 2px; color: #3b4047; font-size: 11.5px; }
#w22489721 .xw-reps span { padding: 2px 7px; background: #fff; border: 1px solid #c4c9cf; border-radius: 3px; font-size: 11px; }
#w22489721 .xw-reps span.on { background: var(--xg); border-color: var(--xgd); color: #fff; }

/* ——— Курсор ——— */
#w22489721 .xw-cur { display: none; }

/* ——— Без скрипта: окно по ширине, лишние столбцы и пустые строки скрыты, график и вывод под таблицей ——— */
#w22489721 .xw-t .xw-e, #w22489721 .xw-t .xw-fill { display: none; }
#w22489721 .xw-body { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 12px; }
#w22489721 .xw-chart { margin-left: 12px; width: min(100% - 24px, 300px); }
#w22489721 .xw-note { margin: 0 12px; flex: 1 1 100%; }
#w22489721 .xw-sens { margin: 0 12px; flex: 0 1 440px; }

/* ——— Режим истории: окно фиксированного размера по центру сцены, всё поверх сетки ——— */
#w22489721:is(.story *) .xw-fit { position: absolute; left: 50%; top: 50%; display: block; width: 860px; height: 700px; transform: translate(-50%, -50%); transform-origin: 50% 50%; }
#w22489721:is(.story *) .xw { width: 860px; max-width: none; height: 700px; }
#w22489721:is(.story *) .xw-body { display: block; padding: 0; }
#w22489721:is(.story *) .xw-t { width: 856px; }
#w22489721:is(.story *) .xw-t .xw-e { display: table-cell; }
#w22489721:is(.story *) .xw-t .xw-fill { display: table-row; }
#w22489721:is(.story *) .xw-sel, #w22489721:is(.story *) .xw-ref, #w22489721:is(.story *) .xw-ants { display: block; }
#w22489721:is(.story *) .xw-chart { position: absolute; z-index: 4; margin: 0; width: auto; transition: opacity 0.3s, transform 0.3s; }
#w22489721:is(.story *) .xw-plot { flex: 1 1 0; min-height: 0; height: auto; }
#w22489721:is(.story *) .xw-note { position: absolute; z-index: 4; margin: 0; opacity: 0; transform: translateY(10px); transition: opacity 0.35s, transform 0.35s; }
#w22489721:is(.story *) .xw.fin .xw-note { opacity: 1; transform: none; }
#w22489721:is(.story *) .xw-sens { position: absolute; z-index: 4; margin: 0; opacity: 0; transform: translateY(10px); transition: opacity 0.35s, transform 0.35s; }
#w22489721:is(.story *) .xw-sens.on { opacity: 1; transform: none; }
#w22489721:is(.story *) .xw-note p { opacity: 0; transform: translateX(-6px); transition: opacity 0.3s, transform 0.3s; }
#w22489721:is(.story *) .xw-note p.on { opacity: 1; transform: none; }
#w22489721:is(.story *) .xw-tab.xw-rep { max-width: 0; padding: 0; border-right-width: 0; transition: max-width 0.45s, padding 0.45s; }
#w22489721:is(.story *) .xw.fin .xw-tab.xw-rep { max-width: 220px; padding: 0 14px; border-right-width: 1px; }
#w22489721:is(.story *) .xw-dlg, #w22489721:is(.story *) .xw-res {
  display: block; position: absolute; z-index: 8; top: 172px; right: 14px;
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(0.97); transition: opacity 0.2s, transform 0.2s, visibility 0s 0.2s;
}
#w22489721:is(.story *) .xw-res { top: 230px; right: 26px; width: 312px; }
#w22489721:is(.story *) .xw.d-on ~ .xw-dlg, #w22489721:is(.story *) .xw.r-on ~ .xw-res { opacity: 1; visibility: visible; transform: none; transition: opacity 0.2s, transform 0.2s; }
#w22489721:is(.story *) .xw-list span { opacity: 0; transition: opacity 0.2s; }
#w22489721:is(.story *) .xw-list span.on { opacity: 1; }
#w22489721:is(.story *) .xw-cur { display: block; position: absolute; left: 0; top: 0; z-index: 9; margin: -2px 0 0 -2px; pointer-events: none; opacity: 0; transition: opacity 0.2s; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.35)); }
#w22489721:is(.story *) .xw-cur svg { display: block; }
#w22489721:is(.story *) .xw-cur.on { opacity: 1; }
#w22489721:is(.story *) .xw-cur::before { content: ""; position: absolute; left: -11px; top: -11px; width: 26px; height: 26px; border: 2px solid var(--xg); border-radius: 50%; opacity: 0; }
#w22489721:is(.story *) .xw-cur.fl::before { animation: w22489721-rip 0.5s ease-out; }
@keyframes w22489721-rip { from { opacity: 0.9; transform: scale(0.3); } to { opacity: 0; transform: scale(1.4); } }

/* ——— Телефон: компактное окно 354×300, лента свёрнута в кнопку, часть строк скрыта ——— */
/* телефонное окно и на телефоне лёжа (до 500 px высоты): там сцена около 300–500 px шириной */
@media (max-width: 760px), (orientation: landscape) and (max-height: 500px) {
  #w22489721 .xw-fit { font-size: 11.5px; }
  #w22489721 .xw-title { height: 20px; padding: 0 8px; font-size: 11px; }
  #w22489721 .xw-lights { gap: 5px; width: 50px; }
  #w22489721 .xw-lights i { width: 8px; height: 8px; }
  #w22489721 .xw-name-f { justify-content: flex-start; gap: 5px; }
  #w22489721 .xw-app { width: 12px; height: 12px; background-size: 1.5px 100%, 100% 1.5px, 6px 6px; background-position: 5.5px 0, 0 5.5px, 0 0; }
  #w22489721 .xw-saved, #w22489721 .xw-search { display: none; }
  #w22489721 .xw-tabs { height: 25px; padding: 0 4px; font-size: 11px; gap: 0; }
  #w22489721 .xw-tabs > span { height: 21px; padding: 0 7px; line-height: 21px; }
  #w22489721 .xw-tabs > .xw-dt { display: none; }
  #w22489721 .xw-tabs > .xw-rbm { display: flex; align-items: center; gap: 4px; margin: 0 0 2px auto; height: 20px; padding: 0 7px; border-radius: 4px; background: #f6f7f8; color: var(--xgd); font-weight: 600; border: 1px solid transparent; transition: background 0.15s; }
  #w22489721 .xw-ribbon { display: none; }
  #w22489721 .xw-fx { height: 22px; }
  #w22489721 .xw-name { width: 44px; height: 17px; margin: 0 4px; padding: 0 4px; line-height: 15px; font-size: 11px; }
  #w22489721 .xw-name::after { display: none; }
  #w22489721 .xw-fxi { gap: 0; padding: 0 7px; }
  #w22489721 .xw-fxi i { display: none; }
  #w22489721 .xw-fxi b { font-size: 11.5px; }
  #w22489721 .xw-f { padding: 0 6px; font-size: 11px; }
  #w22489721 .xw-t { width: 340px; }
  #w22489721 .xw-t .c0 { width: 20px; }
  #w22489721 .xw-t .c1 { width: 96px; }
  #w22489721 .xw-t .c2 { width: 42px; }
  #w22489721 .xw-t .c3 { width: 44px; }
  #w22489721 .xw-t .c4 { width: 46px; }
  #w22489721 .xw-t .c5 { width: 38px; }
  #w22489721 .xw-t .c6 { width: 54px; }
  #w22489721 .xw-t .c7, #w22489721 .xw-t .c8, #w22489721 .xw-t .c9, #w22489721 .xw-t .c10 { width: 40px; }
  #w22489721 .xw-t th { height: 16px; font-size: 9.5px; }
  #w22489721 .xw-t td { height: 20px; padding: 0 4px; font-size: 11px; }
  #w22489721 .xw-t .xw-hd { font-size: 10px; }
  #w22489721 .xw-t td:first-of-type { padding-left: 5px; }
  #w22489721 .xw-t .xw-k { box-shadow: inset 3px 0 var(--k); padding-left: 7px; }
  #w22489721 .xw-t .xw-tgt { font-size: 13px; }
  #w22489721 .xw-t .xw-cm { font-size: 0; }
  #w22489721 .xw-t .xw-hm { display: none; }
  #w22489721 .xw-t .xw-gap th { border-top: 3px double #a9aeb4; }
  #w22489721 .xw-db i { top: 4px; bottom: 4px; left: 3px; width: calc((100% - 6px) * var(--v, 0)); }
  #w22489721 .xw-sheets { height: 20px; padding: 0 4px; font-size: 10.5px; }
  #w22489721 .xw-nav { display: none; }
  #w22489721 .xw-tab { padding: 0 8px; }
  #w22489721 .xw-plus { width: 22px; }
  #w22489721 .xw-plus::before { left: 6px; width: 10px; height: 10px; margin-top: -5px; }
  #w22489721 .xw-status { height: 18px; padding: 0 8px; font-size: 10.5px; gap: 6px; }
  #w22489721 .xw-sti { width: 7px; height: 7px; }
  #w22489721 .xw-zm i, #w22489721 .xw-zm b { display: none; }
  #w22489721 .xw-chart { width: 100%; margin: 0 8px; }
  #w22489721 .xw-ch-h { flex-direction: row; align-items: center; justify-content: space-between; padding: 5px 8px 0; }
  #w22489721 .xw-ch-h b { font-size: 11px; }
  #w22489721 .xw-lg { font-size: 9.5px; gap: 3px; }
  #w22489721 .xw-lg .lg-d { display: none; }
  #w22489721 .xw-lg .lg-m { display: inline; }
  #w22489721 .xw-lg i { width: 9px; height: 7px; margin-left: 5px; }
  #w22489721 .xw-lg .lg-p { width: 7px; height: 7px; }
  #w22489721 .xw-plot .ck { font-size: 9px; }
  #w22489721 .xw-plot .cn { font-size: 9.5px; }
  #w22489721 .xw-plot .cb { font-size: 10.5px; stroke-width: 3px; }
  #w22489721 .xw-plot .cvt { font-size: 9px; }
  #w22489721 .xw-note { padding: 6px 9px; font-size: 11px; line-height: 1.27; }
  #w22489721 .xw-sens { display: none; }
  #w22489721:is(.story *) .xw-sens.m-fit { display: block; padding: 6px 9px 4px; font-size: 11px; box-shadow: none; }
  #w22489721:is(.story *) .xw-sens.m-fit b { margin-bottom: 4px; font-size: 11.5px; }
  #w22489721:is(.story *) .xw-sens.m-fit th { padding: 0 4px 3px; font-size: 10.5px; }
  #w22489721:is(.story *) .xw-sens.m-fit td { padding: 2px 4px; }
  #w22489721 .xw-note b { margin-bottom: 3px; font-size: 11.5px; }
  #w22489721 .xw-note p { margin-bottom: 3px; padding-left: 14px; }
  #w22489721 .xw-dlg, #w22489721 .xw-res { width: 100%; font-size: 11px; }
  #w22489721 .xw-dh { height: 24px; padding: 0 8px 0 10px; }
  #w22489721 .xw-dh b { font-size: 11.5px; }
  #w22489721 .xw-db1 { gap: 3px; padding: 5px 8px 6px; }
  #w22489721 .xw-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px; }
  #w22489721 .xw-l { margin: 0; font-size: 10.5px; }
  #w22489721 .xw-r-c { margin-top: 2px; }
  #w22489721 .xw-in { height: 20px; font-size: 11px; }
  #w22489721 .xw-rf { width: 14px; height: 12px; }
  #w22489721 .xw-rf::after { left: 2px; bottom: 2px; width: 5px; height: 3px; }
  #w22489721 .xw-rad { gap: 9px; font-size: 10.5px; margin: 0; }
  #w22489721 .xw-rad span:not(.xw-l2)::before { width: 10px; height: 10px; }
  #w22489721 .xw-rad span.on::before { border-width: 3px; }
  #w22489721 .xw-list { height: 38px; padding: 2px; font-size: 10.5px; gap: 0; }
  #w22489721 .xw-side .xw-btn:not([data-x]) { display: none; }
  #w22489721 .xw-btn { padding: 2px 8px; font-size: 10.5px; }
  #w22489721 .xw-chk { margin: 2px 0 0; font-size: 10.5px; gap: 5px; }
  #w22489721 .xw-chk::before { width: 11px; height: 11px; background-size: 10px; }
  #w22489721 .xw-r-m { margin: 0; }
  #w22489721 .xw-dd { height: 19px; line-height: 17px; }
  #w22489721 .xw-dd::after { top: 6px; }
  #w22489721 .xw-df { padding: 5px 8px 6px; }
  #w22489721 .xw-rb { gap: 6px; padding: 7px 8px; }
  #w22489721 .xw-ok { padding: 6px 8px 6px 28px; }
  #w22489721 .xw-ok::before { left: 7px; top: 7px; width: 14px; height: 14px; background-size: 10px; }
  #w22489721 .xw-rg { gap: 6px; }
  #w22489721 .xw-rad-v { gap: 4px; }
  #w22489721 .xw-reps small { font-size: 10.5px; }
  #w22489721 .xw-reps span { padding: 1px 6px; font-size: 10.5px; }

  #w22489721:is(.story *) .xw-fit { width: 354px; height: 284px; }
  #w22489721:is(.story *) .xw { width: 354px; height: 284px; border-radius: 8px; }
  #w22489721:is(.story *) .xw-t { width: 500px; }
  #w22489721:is(.story *) .xw:not(.ch-on) .xw-chart { opacity: 0; transform: translateY(12px); }
  #w22489721:is(.story *) .xw-dlg { top: 22px; left: 5px; right: 5px; width: auto; }
  #w22489721:is(.story *) .xw-res { top: 66px; left: 12px; right: 12px; width: auto; }
  #w22489721:is(.story *) .xw.d-mini ~ .xw-dlg { top: auto; bottom: 22px; }
  #w22489721:is(.story *) .xw.d-mini ~ .xw-dlg .xw-db1 > :not(.xw-r-v), #w22489721:is(.story *) .xw.d-mini ~ .xw-dlg .xw-df { display: none; }
  #w22489721:is(.story *) .xw-tab.xw-rep { transition: max-width 0.45s, padding 0.45s; }
  #w22489721:is(.story *) .xw.fin .xw-tab.xw-rep { padding: 0 8px; }
  #w22489721:is(.story *) .xw-cur svg { width: 16px; height: 19px; }
  #w22489721 .xw-chart { width: auto; }
}
/* отзыв в четыре строки, как было у этой сцены раньше: окну остаётся больше места (только телефон стоя) */
@media (max-width: 760px) {
  #w22489721:is(.story *) .beat-q p { -webkit-line-clamp: 4; }
}
/* Невысокие телефоны: заголовок чуть меньше, отзыв в три строки, чтобы окно не сжималось вдвое */
@media (max-width: 760px) and (max-height: 720px) {
  #w22489721:is(.story *) h2 { font-size: 29px; }
  #w22489721:is(.story *) .beat-q p { -webkit-line-clamp: 3; }
  #w22489721:is(.story *) .scene-k { margin-bottom: 2px; }
}
