/* Task page V3: one task, one Unity viewer (Task page · V3, 2026-10-10). */
.task-v3-page{--tv3-hdr:72px;--tv3-tools-h:46px;--tv3-ink:#f2f4f8;--tv3-dim:#a3acbd;--tv3-glass:rgba(13,16,24,.78);--tv3-line:rgba(255,255,255,.12);--tv3-accent:var(--accent,#6366f1);--tv3-ok:#5fe3b5;--tv3-bad:#ff7a8a}
.tv3{display:block;padding:0;margin:0}
/* the stage is a tool bar above the viewer, so the shell never covers the viewer's own UI */
.tv3-stage{position:relative;display:flex;flex-direction:column;height:calc(100vh - var(--tv3-hdr));height:calc(100dvh - var(--tv3-hdr));min-height:420px;background:#090b11;overflow:hidden;color:var(--tv3-ink);isolation:isolate}
.tv3-viewport{position:relative;flex:1 1 auto;min-height:0;background:radial-gradient(120% 90% at 50% 30%,#1b2233 0,#090b11 70%)}
.tv3-viewer{position:absolute;inset:0;width:100%;height:100%;border:0;display:block;background:#090b11}
.tv3-viewer[hidden]{display:none}
.tv3-media{position:absolute;inset:0;display:grid;place-items:center;background:#090b11}
.tv3-media video,.tv3-media img{max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain;display:block}

.tv3-card{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:3;width:min(420px,calc(100% - 32px));padding:20px 22px 16px;border-radius:18px;background:var(--tv3-glass);border:1px solid var(--tv3-line);box-shadow:0 24px 70px rgba(0,0,0,.55);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);transition:opacity .35s ease,transform .35s ease}
.tv3-card[hidden]{display:block;opacity:0;pointer-events:none;transform:translate(-50%,-46%)}
.tv3-steps{display:flex;justify-content:space-between;gap:8px;list-style:none;margin:0 0 16px;padding:0}
.tv3-steps li{flex:1;display:grid;place-items:center;height:44px;border-radius:12px;background:rgba(255,255,255,.04);border:1px solid var(--tv3-line);color:var(--tv3-dim);opacity:.45;transition:opacity .3s,color .3s,border-color .3s,background .3s}
.tv3-steps svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tv3-steps li.done{opacity:1;color:var(--tv3-ok);border-color:rgba(95,227,181,.35)}
.tv3-steps li.run{opacity:1;color:#fff;border-color:var(--tv3-accent);background:rgba(99,102,241,.16);animation:tv3-pulse 1.4s ease-in-out infinite}
.tv3-steps li.fail{opacity:1;color:var(--tv3-bad);border-color:rgba(255,122,138,.4)}
@keyframes tv3-pulse{50%{box-shadow:0 0 0 4px rgba(99,102,241,.18)}}
.tv3-bar{position:relative;height:8px;border-radius:99px;background:rgba(255,255,255,.08);overflow:hidden}
.tv3-bar>i{position:absolute;inset:0 auto 0 0;width:0;border-radius:inherit;background:linear-gradient(90deg,#4cc9ff,var(--tv3-accent),#5fe3b5);transition:width .5s ease}
.tv3-bar.wait>i{width:35%!important;animation:tv3-slide 1.6s ease-in-out infinite}
@keyframes tv3-slide{0%{left:-35%}100%{left:100%}}
.tv3-line{display:flex;justify-content:space-between;gap:12px;margin:10px 0 0;font-size:13px;line-height:1.4;color:var(--tv3-dim)}
.tv3-line b{color:var(--tv3-ink);font-variant-numeric:tabular-nums;font-weight:600}
.tv3-card.failed .tv3-line span{color:var(--tv3-bad)}

/* status pill in the tools row: clear of the viewer's own toolbars and the site support chat */
.tv3-chip{padding:6px 11px;border-radius:99px;background:var(--tv3-glass);border:1px solid var(--tv3-line);color:var(--tv3-ink);font-size:12px;line-height:1.2;font-variant-numeric:tabular-nums;white-space:nowrap;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.tv3-chip[hidden]{display:none}

.tv3-tools{position:relative;z-index:4;flex:0 0 auto;display:flex;align-items:center;gap:6px;min-height:46px;padding:6px 12px;background:#0b0e15;border-bottom:1px solid var(--tv3-line);overflow-x:auto;scrollbar-width:none}
.tv3-tools::-webkit-scrollbar{display:none}
.tv3-tool{flex:0 0 auto;display:grid;place-items:center;width:34px;height:34px;padding:0;border-radius:10px;border:1px solid var(--tv3-line);background:var(--tv3-glass);color:var(--tv3-ink);cursor:pointer;text-decoration:none;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);transition:background .2s,border-color .2s}
.tv3-tool:hover,.tv3-tool:focus-visible{background:rgba(99,102,241,.28);border-color:var(--tv3-accent);outline:none}
.tv3-tool svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tv3-tool.ok{border-color:var(--tv3-ok);color:var(--tv3-ok)}
.tv3-build{margin-left:4px;padding:3px 8px;border-radius:8px;background:rgba(0,0,0,.55);color:#9fb3ff;font:11px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.02em}
.tv3-build[hidden]{display:none}
.tv3-rerig{position:relative;color:#ffd166;border-color:rgba(255,209,102,.45)}
.tv3-rerig[hidden]{display:none}
.tv3-rerig .tv3-rerig-dot{position:absolute;top:-3px;right:-3px;width:9px;height:9px;border-radius:50%;background:#ffd166;box-shadow:0 0 0 2px #0b0e15}
.tv3-rerig.busy{color:#9fb3ff;border-color:var(--tv3-accent);cursor:progress}
.tv3-rerig.busy .tv3-rerig-dot{display:none}
.tv3-rerig.busy svg{animation:tv3-spin 1.1s linear infinite}
.tv3-rerig.fail{color:#ff7b7b;border-color:rgba(255,123,123,.6)}
.tv3-rerig.ok{color:var(--tv3-ok);border-color:var(--tv3-ok)}
.tv3-rerig.ok .tv3-rerig-dot{display:none}
@keyframes tv3-spin{to{transform:rotate(360deg)}}

/* the site support chat sits at the end of the task bar, not over the viewer's own controls */
.task-v3-page .ar-support-chat,.task-v3-page .ar-support-chat[dir="rtl"]{position:absolute;top:calc(var(--tv3-hdr) + 6px);bottom:auto;right:12px;left:auto}
html[dir="rtl"] .task-v3-page .ar-support-chat{right:auto;left:12px}
.task-v3-page .ar-support-chat-bubble{width:34px;height:34px;box-shadow:none}
.task-v3-page .ar-support-chat-bubble-svg{width:18px;height:18px}
.task-v3-page .ar-support-chat-panel,.task-v3-page .ar-support-chat[dir="rtl"] .ar-support-chat-panel{top:44px;bottom:auto;right:0;left:auto;max-height:min(520px,calc(100vh - var(--tv3-hdr) - 70px))}
html[dir="rtl"] .task-v3-page .ar-support-chat-panel{right:auto;left:0}

.tv3-info{padding:22px 16px 34px}
.tv3-info .task-status-header-title{margin:0 0 8px;font-size:clamp(20px,2.6vw,28px);line-height:1.25}
.tv3-desc{margin:0;max-width:72ch;color:var(--text-secondary,#a0a0b0);font-size:14px;line-height:1.6}
.tv3-desc:empty{display:none}
.tv3-desc p{margin:0 0 10px}
.tv3-tags{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0 0;padding:0;list-style:none}
.tv3-tags li{padding:3px 9px;border-radius:99px;border:1px solid var(--border,#2a2a3a);font-size:12px;color:var(--text-muted,#8b8b9e)}

.tv3-stage:fullscreen{height:100vh;height:100dvh}
@media (max-width:640px){.tv3-stage{min-height:360px}.tv3-card{padding:16px 16px 12px}.tv3-steps li{height:38px}}
@media (prefers-reduced-motion:reduce){.tv3-steps li.run,.tv3-bar.wait>i{animation:none}}

/* Top status banner (owner 2026-10-16): the stage, the percent and the progress bar of the current rig, big and at the top */
/* the status strip is an overlay over the viewport, never a flex row of the stage: its show / fade / compact changes
   must not resize the viewer (owner 2026-10-18: «вьюпорт постоянно дёргается, как будто вёрстка выше меняется») */
.tv3-status{position:relative;flex:0 0 auto;z-index:4;display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"ico text pct" "steps steps steps";align-items:center;column-gap:10px;row-gap:0;width:100%;min-height:30px;margin:0;padding:0 12px;border:0;border-bottom:1px solid var(--tv3-line);background:#0b0e15;color:var(--tv3-ink);font:inherit;text-align:left;cursor:pointer;transition:opacity .4s}   /* 2026-10-19: one compact row in the flow, never over the viewer */
.tv3-status[hidden]{display:grid;visibility:hidden}   /* the row keeps its height: the viewer never jumps */
.tv3-status:focus-visible{outline:2px solid var(--tv3-accent,#6366f1);outline-offset:-2px}
.tv3-status-ico{grid-area:ico;width:14px;height:14px;border-radius:50%;border:2px solid rgba(255,255,255,.18);border-top-color:var(--tv3-accent,#6366f1);animation:tv3-spin 1s linear infinite}
.tv3-status-text{grid-area:text;display:flex;flex-direction:row;align-items:baseline;gap:8px;min-width:0;height:30px}
.tv3-status-text b{font-size:12.5px;line-height:30px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tv3-status-text small{font-size:11px;line-height:30px;opacity:.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tv3-status-text small:empty{display:none}
.tv3-status-pct{grid-area:pct;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums;color:#c7d2fe}
.tv3-status-bar{position:absolute;left:0;right:0;bottom:-1px;display:block;height:3px;background:rgba(255,255,255,.08);overflow:hidden}
.tv3-status-bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#6366f1,#22d3ee);transition:width .6s ease}
.tv3-status.wait .tv3-status-bar i{width:35%!important;animation:tv3-slide 1.6s ease-in-out infinite}
.tv3-status-steps{grid-area:steps;display:flex;gap:6px;margin:0 0 4px;padding:0;list-style:none}
.tv3-status-steps li{flex:1 1 0;min-width:0;padding:2px 0 0;border-top:2px solid rgba(255,255,255,.14);font-size:9.5px;line-height:1.2;color:rgba(255,255,255,.5);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tv3-status-steps li.done{border-top-color:#22c55e;color:rgba(255,255,255,.7)}
.tv3-status-steps li.run{border-top-color:var(--tv3-accent,#6366f1);color:#fff;font-weight:700;animation:tv3-pulse 1.4s ease-in-out infinite}
.tv3-status.review .tv3-status-ico{animation:none;border-color:#f59e0b;border-top-color:#f59e0b}
.tv3-status.review .tv3-status-pct{color:#fcd34d}
.tv3-status.review .tv3-status-bar i{background:#f59e0b}
.tv3-status.fail .tv3-status-ico{animation:none;border-color:#ef4444;border-top-color:#ef4444}
.tv3-status.fail .tv3-status-pct,.tv3-status.fail .tv3-status-text b{color:#fca5a5}
.tv3-status.fail .tv3-status-bar i{background:#ef4444}
.tv3-status.done .tv3-status-ico{animation:none;border-color:#22c55e;border-top-color:#22c55e}
.tv3-status.done .tv3-status-pct{color:#86efac}
.tv3-status.done .tv3-status-bar i{background:#22c55e}
.tv3-status.fading{opacity:0;pointer-events:none}
.tv3-status.compact .tv3-status-steps{display:none}
@media (max-width:640px){.tv3-status{padding:0 10px;column-gap:8px}.tv3-status-text b{font-size:12px}.tv3-status-text small{display:none}.tv3-status-pct{font-size:11.5px}}
@media (prefers-reduced-motion:reduce){.tv3-status-ico,.tv3-status-steps li.run,.tv3-status.wait .tv3-status-bar i{animation:none}}
/* Viewer modes and parts as tasks (2026-10-20, Build 3D model by Parts): the Blueprint | Preview | Canvas switch mirrored
   from the viewer, the strip of part tasks under the viewer; the V3.1 presentation steps aside while the Canvas is open */
.tv3-modes{flex:0 0 auto;display:inline-flex;gap:2px;padding:2px;border-radius:12px;border:1px solid var(--tv3-line);background:rgba(255,255,255,.03)}
.tv3-modes[hidden],.tv3-mode[hidden]{display:none}
.tv3-mode{width:30px;height:30px;border:0;background:transparent}
.tv3-mode.on{background:rgba(99,102,241,.38);box-shadow:inset 0 0 0 1px var(--tv3-accent)}
.tv3-parts{position:relative;z-index:4;flex:0 0 auto;display:flex;align-items:center;gap:6px;min-height:38px;padding:4px 12px;background:#0b0e15;border-top:1px solid var(--tv3-line);overflow-x:auto;scrollbar-width:none}
.tv3-parts::-webkit-scrollbar{display:none}
.tv3-parts[hidden]{display:none}
.tv3-parts-lab{flex:0 0 auto;color:var(--tv3-dim);font-size:12px;white-space:nowrap}
.tv3-part{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;border:1px solid var(--tv3-line);background:var(--tv3-glass);color:var(--tv3-ink);font-size:12px;text-decoration:none;white-space:nowrap}
.tv3-part:hover,.tv3-part:focus-visible,.tv3-part.me{border-color:var(--tv3-accent);outline:none}
.tv3-part i{width:9px;height:9px;border-radius:50%;flex:none}
.tv3-canvas .v31-scrub,.tv3-canvas .v31-panel,.tv3-canvas .v31-pop,.tv3-canvas .v31-back,.tv3-canvas .v31-cv{display:none!important}
