/* Окно-пульт конструктора: только функциональные панели, без маркетинга */
html:has(body.cockpit){background:#04060B}
body.cockpit{margin:0;background:radial-gradient(1200px 700px at 78% -10%,rgba(98,232,255,.07),transparent 60%),radial-gradient(900px 600px at 0% 110%,rgba(178,107,255,.07),transparent 60%),#04060B;color:var(--ink);height:100vh;overflow:hidden;font:500 15px/1.5 var(--body)}
body.cockpit::after{content:"";position:fixed;inset:0;pointer-events:none;z-index:60;background:repeating-linear-gradient(0deg,rgba(255,255,255,.022) 0 1px,transparent 1px 3px);mix-blend-mode:overlay}
.ck{display:grid;height:100vh;box-sizing:border-box;padding:10px;gap:10px;grid-template-columns:236px minmax(0,1fr) minmax(360px,31vw);grid-template-rows:54px minmax(0,1fr) 78px;grid-template-areas:"top top top" "rail main side" "bot bot bot"}
.ck-top{grid-area:top}.ck-rail{grid-area:rail}.ck-main{grid-area:main}.ck-side{grid-area:side}.ck-bot{grid-area:bot}
/* панель с «рамкой прибора» */
.pnl{position:relative;min-width:0;min-height:0;border:1px solid rgba(98,232,255,.2);border-radius:4px;background:linear-gradient(180deg,rgba(13,19,38,.94),rgba(6,9,20,.94));box-shadow:inset 0 0 46px rgba(98,232,255,.045),0 0 0 1px rgba(0,0,0,.6)}
.pnl::before{content:"";position:absolute;inset:-1px;pointer-events:none;border-radius:4px;z-index:2;background:
linear-gradient(#62E8FF,#62E8FF) 0 0/16px 2px no-repeat,linear-gradient(#62E8FF,#62E8FF) 0 0/2px 16px no-repeat,
linear-gradient(#62E8FF,#62E8FF) 100% 0/16px 2px no-repeat,linear-gradient(#62E8FF,#62E8FF) 100% 0/2px 16px no-repeat,
linear-gradient(#62E8FF,#62E8FF) 0 100%/16px 2px no-repeat,linear-gradient(#62E8FF,#62E8FF) 0 100%/2px 16px no-repeat,
linear-gradient(#62E8FF,#62E8FF) 100% 100%/16px 2px no-repeat,linear-gradient(#62E8FF,#62E8FF) 100% 100%/2px 16px no-repeat;filter:drop-shadow(0 0 4px rgba(98,232,255,.8))}
.ck-h{margin:0 0 8px;font:400 11px var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--dim);display:flex;align-items:center;gap:8px}
.ck-h::before{content:"";width:6px;height:6px;border-radius:1px;background:var(--a1);box-shadow:0 0 8px var(--a1)}
/* верхняя панель */
.ck-top{display:flex;align-items:center;gap:18px;padding:0 14px}
.ck-logo{font:800 17px/1 var(--disp);color:#fff;text-decoration:none;white-space:nowrap}.ck-logo span{color:var(--a1);text-shadow:0 0 14px var(--glow1)}
.ck-title{margin:0;font:600 14px/1.1 var(--disp);letter-spacing:-.01em;display:flex;flex-direction:column;gap:3px;white-space:nowrap}
.ck-title small{font:400 11px var(--mono);color:var(--dim);letter-spacing:.02em}
.ann{display:flex;gap:8px;margin-left:auto}
.lamp{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid rgba(255,255,255,.14);border-radius:3px;font:500 12px var(--mono);color:var(--dim);background:rgba(0,0,0,.35);white-space:nowrap}
.lamp i{width:10px;height:10px;border-radius:2px;background:#27304A;box-shadow:inset 0 0 0 1px rgba(255,255,255,.1)}
.lamp b{font-weight:500;color:var(--ink)}
.lamp.on{color:#fff}
#lE.on{border-color:#FF5C6C}#lE.on i{background:#FF5C6C;box-shadow:0 0 10px #FF5C6C;animation:blink 1.1s steps(2,jump-none) infinite}
#lW.on{border-color:#FFC247}#lW.on i{background:#FFC247;box-shadow:0 0 10px #FFC247}
#lI.on{border-color:#62E8FF}#lI.on i{background:#62E8FF;box-shadow:0 0 10px #62E8FF}
#lT.on{border-color:#4DFF9A}#lT.on i{background:#4DFF9A;box-shadow:0 0 10px #4DFF9A}
@keyframes blink{50%{opacity:.25}}
.ck-act{display:flex;gap:6px}
.ck-back{align-self:center;margin-left:6px;font:500 12px var(--mono);color:var(--a1);text-decoration:none;border-bottom:1px dashed var(--a1);white-space:nowrap}
.ck-act .btn{min-height:34px;padding:0 14px;font-size:13px;border-radius:4px}
/* левая стойка: ступени и приборы */
.ck-rail{padding:12px 12px 12px;overflow:auto;display:flex;flex-direction:column}
.cockpit .stairs{display:flex;flex-direction:column;gap:4px;margin:0 0 12px;align-items:stretch}
.cockpit .stair{height:auto;min-height:38px;flex-direction:row;justify-content:flex-start;gap:9px;padding:0 10px;margin:0 0 0 calc(var(--k,0)*8px);border:1px solid rgba(255,255,255,.14);border-radius:4px;transform:none;background:rgba(6,9,20,.7);text-align:left;border-bottom:1px solid rgba(255,255,255,.14);transition:min-height .45s cubic-bezier(.2,.9,.25,1.15),margin .45s,box-shadow .35s,border-color .3s,background .3s}
.cockpit .stair .sf{top:0;bottom:0;left:0;right:auto;height:auto;width:calc(var(--p,0)*100%);border-top:0;border-right:2px solid var(--c);box-shadow:6px 0 20px color-mix(in srgb,var(--c) 38%,transparent);transition:width .55s cubic-bezier(.2,.9,.25,1)}
.cockpit .stair .sn{font:400 12px var(--mono);color:var(--dim);order:0;width:14px}
.cockpit .stair .si{display:flex;order:1;color:var(--c)}
.cockpit .stair .st{display:block;order:2;font:600 13.5px var(--body);text-align:left}
.cockpit .stair .gap{top:50%;right:8px;margin-top:-8px}
.cockpit .stair.cur{min-height:50px;margin-left:calc(var(--k,0)*8px - 6px);border-color:var(--c);background:rgba(10,16,34,.95);box-shadow:0 0 26px color-mix(in srgb,var(--c) 40%,transparent),inset 0 0 0 1px color-mix(in srgb,var(--c) 40%,transparent)}
.cockpit .stair.cur .sn{color:var(--c)}
.cockpit .stair.cur .st{font-size:14.5px}
/* приборы */
.gm{display:grid;grid-template-columns:1fr auto;gap:5px 8px;align-items:baseline;margin:0 0 8px;font-size:13px;color:var(--muted)}
.gm b{font:500 12px var(--mono);color:var(--ink)}
.gm .gb{grid-column:1/-1;position:relative;height:8px;border-radius:2px;background:rgba(255,255,255,.07);overflow:hidden;-webkit-mask:repeating-linear-gradient(90deg,#000 0 7px,transparent 7px 9px);mask:repeating-linear-gradient(90deg,#000 0 7px,transparent 7px 9px)}
.gm .gb::after{content:"";position:absolute;left:0;top:0;bottom:0;width:var(--v,0%);background:linear-gradient(90deg,#B26BFF,#62E8FF);box-shadow:0 0 10px #62E8FF;transition:width .5s cubic-bezier(.2,.9,.25,1)}
.gm-big{font-size:14px;color:var(--ink)}.gm-big b{font:700 20px var(--disp);color:var(--a1);text-shadow:0 0 12px var(--glow1)}
.gm-big .gb{height:10px}
/* центр: подсказка + форма */
.ck-main{display:flex;flex-direction:column;padding:12px 14px 12px;gap:10px}
.cockpit .hintcard{flex:none;margin:0;padding:10px 14px;border:1px solid rgba(98,232,255,.2);border-radius:3px;background:rgba(98,232,255,.04);max-height:34%;overflow:auto}
.cockpit .hintcard .hk{margin:0 0 4px;font-size:11px;letter-spacing:.16em;text-transform:uppercase}
.cockpit .hintcard h4{font-size:15px;margin:0 0 4px}
.cockpit .hintcard .why{font-size:13.5px;margin:0 0 8px;line-height:1.45}
.cockpit .hx p{font-size:13px!important;padding:7px 10px;line-height:1.4}
.cockpit .hintcard .src{display:none}
.cockpit .bld-form{flex:1;min-height:0;display:flex}
.cockpit .stepcard{flex:1;display:flex;flex-direction:column;min-height:0;margin:0;padding:0;border:0;background:none}
.cockpit .spane.cur{flex:1;min-height:0;overflow:auto;padding:2px 6px 8px 2px}
.cockpit .sph{margin-bottom:12px}.cockpit .sph h3{font-size:19px}.cockpit .sph .spi{width:40px;height:40px;border-radius:4px}
.cockpit .fld textarea,.cockpit .fld input,.cockpit .fld select,.cockpit .spane>select{border-radius:4px;padding:10px 12px;font-size:14.5px}
.cockpit .fld textarea{min-height:76px}
.cockpit .chk label{border-radius:4px;padding:8px 10px;font-size:14px}
.cockpit .lvo{border-radius:4px;padding:9px 12px}
.cockpit .snav{flex:none;margin-top:8px;padding-top:10px}
.cockpit .snav .btn{min-height:40px;border-radius:4px;font-size:14px;padding:0 20px}
/* правая колонка */
.ck-side{display:flex;flex-direction:column;padding:10px 12px 12px;gap:8px}
.cockpit .dcard{flex:none;margin:0;padding:0;border:0;background:none}
.cockpit .dia{max-width:min(100%,37vh);margin:0 auto}
.cockpit .addcap{margin:0;font-size:13px}
.cockpit .tabcard{flex:1;min-height:0;display:flex;flex-direction:column;margin:0;padding:0;border:0;background:none;overflow:hidden}
.cockpit .tabs2{margin-bottom:8px}
.cockpit .tab2{font:500 12px var(--mono);letter-spacing:.1em;text-transform:uppercase;padding:7px 12px}
.cockpit .tabcard .tp.on{flex:1;min-height:0;overflow:auto}
.cockpit .codebox{border-radius:4px;font-size:12.5px;line-height:1.7;padding:14px 16px;margin:0}
.cockpit .warns li{border-radius:3px;font-size:13px;padding:8px 12px}
.cockpit .tcases{font-size:13.5px}
.snip{flex:none;margin:8px 0 0;padding:10px 12px;border:1px dashed rgba(98,232,255,.3);border-radius:3px;background:rgba(0,0,0,.28);max-height:20%;overflow:auto}
.snip .ck-h{margin:0 0 6px;font-size:10.5px}
.snip pre{margin:0;white-space:pre-wrap;font:400 12.5px/1.65 var(--mono);color:#C9D6F5}
/* нижняя панель: дорожка */
.ck-bot{padding:0 14px;display:flex;flex-direction:column;justify-content:center}
.cockpit .btrk{height:56px;border-top:0;margin:0}
.cockpit .btrk .tkl{top:22px}.cockpit .btrk .tn{top:17px}.cockpit .btrk .runner{top:5px}.cockpit .btrk .chipadd{top:30px;font-size:12px;padding:3px 12px;border-radius:3px}
.cockpit .skip{z-index:70}
/* узкие окна: колонки в стопку */
@media(max-height:790px) and (min-width:1101px){.cockpit .hintcard .hx,.cockpit .hintcard .src{display:none}.snip{max-height:22%}}
@media(max-width:1100px){
body.cockpit{height:auto;overflow:auto}
.ck{display:flex;flex-direction:column;height:auto}
.ck-top{flex-wrap:wrap;padding:10px 12px;gap:10px}.ann{margin-left:0;flex-wrap:wrap}.ck-title small{display:none}
.ck-rail{overflow:visible}
.cockpit .stairs{flex-direction:row;overflow-x:auto;padding-bottom:6px}
.cockpit .stair{min-width:104px;margin-left:0!important;flex:none}.cockpit .stair.cur{min-height:56px}
.ck-main{overflow:visible}.cockpit .hintcard{max-height:none}
.cockpit .spane.cur{overflow:visible}
.cockpit .dia{max-width:300px}
.cockpit .tabcard .tp.on{overflow:visible}
.ck-bot{min-height:78px}
}
@media(prefers-reduced-motion:reduce){.cockpit .stair,.cockpit .stair .sf,.gm .gb::after{transition:none}#lE.on i{animation:none}}
