/* The scene itself is the experimental surface; only this activity is affected. */
body.ai-atelier #activity-stage[data-activity="tasks"] { background:transparent; padding:0; border:0; box-shadow:none; color:#e4eef9; border-radius:0; }
body.ai-atelier #activity-stage .task-scene { --ts-line:#4a6785; --ts-cyan:#9cebf0; color:#e4eef9; }
body.ai-atelier #activity-stage .task-scene :is(h2,h3,h4) {color:#edf5ff;}
.task-scene .ts-case-nav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:14px; }
body.ai-atelier #activity-stage .task-scene button.ts-case { display:flex; gap:10px; align-items:center; padding:7px 10px; background:#102033; border:1px solid #39536f; color:#b9cadf; box-shadow:none; border-radius:7px; min-height:52px; text-align:left; }
body.ai-atelier #activity-stage .task-scene button.ts-case[aria-pressed="true"] { background:#17394b; border-color:#99dce8; color:#e3f9ff; box-shadow:inset 0 -2px #a4e7ed; }
.task-scene .ts-case img {width:54px;height:35px;object-fit:cover;border-radius:3px;opacity:.8;}
.task-scene .ts-case-number {font-size:10px;color:#8ba9c7;}
.task-scene .ts-case strong {font-size:14px;font-weight:500;white-space:nowrap;}
.task-scene .ts-world {position:relative; isolation:isolate; min-height:400px; border:1px solid #486783; border-radius:12px; overflow:hidden; background:#11263a; }
.task-scene .ts-photo {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 38%;max-width:none;border-radius:0;z-index:-3;}
.task-scene .ts-shade {position:absolute;inset:0;pointer-events:none;z-index:-2;background:linear-gradient(180deg,#08182b38 5%,#091b2e05 32%,#08192de8 66%,#081829fa 100%),linear-gradient(90deg,#081829a6,transparent 36%,#091c3299);}
.task-scene .ts-scene-tag {position:absolute;left:24px;top:20px;display:flex;flex-direction:column;text-shadow:0 2px 10px #000;}
.task-scene .ts-scene-tag > span {font-size:10px;letter-spacing:.12em;color:#d6e7f4;}
.task-scene .ts-scene-tag strong {font-size:25px;font-weight:500;letter-spacing:.08em;margin:2px 0;}
.task-scene .ts-scene-tag small {font-size:10px;color:#cfdeec;}
body.ai-atelier #activity-stage .task-scene button.ts-target {position:absolute;z-index:2;display:flex;align-items:center;gap:7px;transform:translate(-50%,-50%);border:1px solid #bcf2f8;background:#0b293acc;color:#e7fcff;border-radius:4px;box-shadow:0 0 0 5px #a7edee1a,0 4px 18px #0006;min-height:37px;padding:6px 12px;font-size:12px;}
.task-scene .ts-target-cross {display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border:1px solid #ace4e9;border-radius:50%;font-size:20px;line-height:1;}
.task-scene .ts-diagram {position:relative;z-index:1;display:grid;grid-template-columns:1fr 1fr 1fr;gap:10%;align-items:end;margin:210px 4% 22px;}
.task-scene .ts-port {display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0;gap:4px;}
.task-scene .ts-port > small {font-size:10px;letter-spacing:.07em;color:#bdd2e8;}
.task-scene .ts-icon {width:31px;height:31px;display:block;flex-shrink:0;color:#b2e8ef;}
.task-scene .ts-port > .ts-icon {width:48px;height:48px;margin:9px 0;}
.task-scene .ts-port > strong {font-size:18px;font-weight:500;line-height:1.6;color:#e4f2ff;}
.task-scene .ts-port > span {font-size:12px;line-height:1.6;color:#c2d7e9;}
.task-scene .ts-machine > .ts-icon {padding:9px;box-sizing:content-box;border:1px solid #8ecbd778;border-radius:50%;background:#102a3c;box-shadow:0 0 0 8px #a0e1e70a;}
.task-scene .ts-result-art {width:100%;height:94px;max-width:215px;margin:7px 0;}
.task-scene .ts-route {position:absolute;bottom:76px;left:4%;width:92%;height:140px;pointer-events:none;opacity:.85;}
.task-scene .ts-blocked .ts-route-active {stroke:#f3b18c;}
.task-scene .ts-route-active {transition:stroke .2s;}
.task-scene .ts-tools {display:flex;gap:20px;align-items:end;padding:16px 0;border-bottom:1px solid #3e5875;}
.task-scene .ts-tool-label {display:block;font-size:11px;color:#a8c1da;margin-bottom:6px;}
.task-scene .ts-input-choices {display:flex;gap:6px;}
body.ai-atelier #activity-stage .task-scene .ts-input-choices button {display:flex;gap:7px;align-items:center;min-height:42px;padding:7px 11px;border-color:#52708e;color:#d3e4f5;background:#14283c;box-shadow:none;}
.task-scene .ts-input-choices .ts-icon {width:21px;height:21px;}
body.ai-atelier #activity-stage .task-scene .ts-input-choices button[aria-pressed="true"] {background:#244b61;color:#ebffff;border-color:#ade5ed;box-shadow:inset 0 -2px #a7edf0;}
.task-scene .ts-context-dock {flex:1;min-width:0;}
body.ai-atelier #activity-stage .task-scene button.ts-context {display:flex;gap:8px;align-items:center;text-align:left;background:#112438;border:1px dashed #77849b;color:#e3d3b3;box-shadow:none;padding:8px 12px;min-height:42px;width:100%;}
body.ai-atelier #activity-stage .task-scene button.ts-context[aria-pressed="true"] {background:#162c3f;border:1px solid #567c8d;color:#cfedf0;box-shadow:none;}
.task-scene .ts-context small {margin-left:auto;font-size:10px;white-space:nowrap;}
.task-scene .ts-context > span:nth-child(2) {font-size:12px;}
.task-scene .ts-condition-mark {font-size:22px;line-height:1;}
body.ai-atelier #activity-stage .task-scene button.ts-run {background:#adeaf1;color:#0a2338;border:1px solid #d5fbff;box-shadow:0 5px 22px #5ec5e51a;white-space:nowrap;min-height:43px;font-size:14px;padding:9px 18px;}
body.ai-atelier #activity-stage .task-scene button:hover {border-color:#d4f5fb;}
.task-scene .ts-feedback {display:grid;grid-template-columns:32px 1fr;gap:0 10px;padding:16px 0 9px;align-items:center;}
.task-scene .ts-feedback > .ts-icon {grid-row:span 2;width:27px;height:27px;}
.task-scene .ts-feedback > strong {font-size:16px;font-weight:500;color:#d6edf5;}
.task-scene .ts-feedback > p {font-size:12px;line-height:1.8;color:#b3c9df;margin:3px 0 0;}
.task-scene.ts-blocked .ts-feedback > .ts-icon,.task-scene.ts-blocked .ts-machine-state {color:#f0be9b;}
.task-scene.ts-partial .ts-feedback > .ts-icon,.task-scene.ts-partial .ts-machine-state {color:#e7ce9f;}
body.ai-atelier #activity-stage .task-scene .ts-details {font-size:11px;color:#9db8d3;margin-top:6px;}
.task-scene .ts-details summary {min-height:28px;cursor:pointer;}
.task-scene .ts-details p {font-size:12px;max-width:900px;color:#b3c9df;}
@media (min-width:1600px) {
 .task-scene .ts-world {min-height:520px;}
 .task-scene .ts-diagram {margin-top:280px;margin-bottom:30px;}
 .task-scene .ts-port > strong {font-size:25px;}
 .task-scene .ts-port > span {font-size:16px;}
 .task-scene .ts-port > small {font-size:13px;}
 .task-scene .ts-port > .ts-icon {width:59px;height:59px;}
 .task-scene .ts-result-art {height:119px;max-width:260px;}
 .task-scene .ts-route {bottom:104px;}
 .task-scene .ts-scene-tag strong {font-size:32px;}
 .task-scene .ts-feedback > strong {font-size:21px;}
 .task-scene .ts-feedback > p {font-size:16px;}
}
@media (max-width:1000px) {
 .task-scene .ts-case-number {display:none;}
 .task-scene .ts-case img {width:39px;height:31px;}
 .task-scene .ts-tools {gap:10px;flex-wrap:wrap;}
 .task-scene .ts-context-dock {min-width:200px;}
 .task-scene .ts-run {margin-left:auto;}
}
@media (min-width:801px) and (max-height:850px) {
 .task-scene .ts-world {min-height:286px;}
 .task-scene .ts-diagram {margin-top:133px;margin-bottom:14px;}
 .task-scene .ts-port > .ts-icon {width:32px;height:32px;margin:3px 0;}
 .task-scene .ts-machine > .ts-icon {padding:7px;}
 .task-scene .ts-port > strong {font-size:16px;}
 .task-scene .ts-port > span {font-size:11px;}
 .task-scene .ts-result-art {height:67px;margin:2px 0;}
 .task-scene .ts-route {bottom:59px;height:110px;}
 .task-scene .ts-scene-tag {top:13px;left:18px;}
 .task-scene .ts-scene-tag strong {font-size:22px;}
 .task-scene .ts-case-nav {margin-bottom:10px;}
 .task-scene .ts-tools {padding:10px 0;}
 .task-scene .ts-feedback {padding:10px 0 5px;}
 body.ai-atelier .fl-main:has(.task-scene) .fl-heading {margin-top:8px;margin-bottom:14px;}
 body.ai-atelier .fl-main:has(.task-scene) .fl-heading h1 {font-size:31px;margin-bottom:5px;}
 body.ai-atelier .fl-main:has(.task-scene) .fl-heading > p:last-child {font-size:15px;}
}
@media (max-width:600px) {
 .task-scene .ts-case-nav {grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:10px;}
 body.ai-atelier #activity-stage .task-scene button.ts-case {padding:5px 8px;min-height:45px;gap:8px;}
 .task-scene .ts-case strong {font-size:12px;}
 .task-scene .ts-world {min-height:490px;}
 .task-scene .ts-photo {height:260px;object-position:center top;}
 .task-scene .ts-shade {background:linear-gradient(180deg,#0818293d 0,#091b2e00 24%,#081829 53%);}
 .task-scene .ts-scene-tag {left:15px;top:12px;}
 .task-scene .ts-scene-tag strong {font-size:21px;}
 body.ai-atelier #activity-stage .task-scene button.ts-target {left:58% !important;top:29% !important;font-size:10px;padding:5px 8px;max-width:70%;}
 .task-scene .ts-diagram {grid-template-columns:1fr 1fr;gap:13px 26px;margin:235px 16px 20px;align-items:center;}
 .task-scene .ts-port > small {font-size:9px;}
 .task-scene .ts-port > strong {font-size:15px;}
 .task-scene .ts-port > span {font-size:10px;}
 .task-scene .ts-port > .ts-icon {width:32px;height:32px;margin:4px 0;}
 .task-scene .ts-machine > .ts-icon {padding:6px;}
 .task-scene .ts-outgoing {grid-column:1/-1;display:grid;grid-template-columns:112px 1fr;column-gap:15px;text-align:left;}
 .task-scene .ts-outgoing > small {grid-column:2;grid-row:1;align-self:end;}
 .task-scene .ts-result-art {grid-column:1;grid-row:1/span 2;width:112px;height:72px;margin:0;}
 .task-scene .ts-outgoing > strong {grid-column:2;grid-row:2;align-self:start;}
 .task-scene .ts-route {bottom:140px;height:100px;left:12%;width:76%;}
 .task-scene .ts-tools {gap:12px;padding:13px 0;}
 .task-scene .ts-input-dock,.task-scene .ts-context-dock {flex:1 0 100%;min-width:0;}
 .task-scene .ts-input-choices button {flex:1;justify-content:center;}
 .task-scene .ts-input-choices {width:100%;}
 body.ai-atelier #activity-stage .task-scene button.ts-run {width:100%;margin:0;}
 .task-scene .ts-feedback {align-items:start;}
 .task-scene .ts-feedback > strong {font-size:15px;}
 .task-scene .ts-feedback > p {font-size:12px;}
}
@media (prefers-reduced-motion:reduce) {.task-scene * {transition:none !important;}}
@media print {body.ai-atelier #activity-stage .task-scene {color:#123;} .task-scene .ts-world {background:#fff;} .task-scene .ts-photo {opacity:.2;} .task-scene .ts-tools {display:none;} }
