/* Phone chapters use readable objects, rather than scaling the desktop drawing. */
@media(max-width:600px){
 [data-gallery]:not([data-gallery=memory]) .gallery-stage{width:100%;height:420px;overflow:hidden;perspective:850px}
 [data-gallery] .gallery-world{left:0;top:0;width:100%;height:100%;transform:none!important;perspective:850px}
 .gallery-world .scene-wires{display:none}
 .gallery-world::before{content:"";position:absolute;left:50%;top:70px;height:300px;border-left:1px dashed #7188b5;transform:translateZ(-50px)}
 [data-gallery][data-step] .prop{display:none;left:50%;top:22px;width:calc(100% - 46px);max-width:285px;height:auto;padding:18px;border-radius:12px;opacity:1!important;transform:translateX(-50%) perspective(850px) rotateY(-7deg) rotateZ(-3deg)!important;box-shadow:6px 8px 0 var(--edge),10px 20px 25px #0005}
 [data-gallery] .prop h3{font-size:26px;line-height:1.12;margin:12px 0}
 [data-gallery] .prop>span,[data-gallery] .prop .object-title,[data-gallery] .prop small{font-size:12px;line-height:1.4}
 [data-gallery] .prop svg{width:32px;height:36px}
 /* Request, contract, checked scope, then returned source. */
 [data-gallery=agents][data-step="0"] .request-window,[data-gallery=agents][data-step="3"] .request-window{display:block;height:300px;top:16px;padding:16px}
 [data-gallery=agents] .window-bar{padding-bottom:10px}.message-ports{margin:8px 0}
 [data-gallery=agents] .request-window h3{font-size:26px;margin:12px 0}
 [data-gallery=agents] .request-line,[data-gallery=agents] .answer-line{font-size:12px;padding:10px}
 [data-gallery=agents] .window-bottom{margin-top:8px;font-size:12px}
 [data-gallery=agents]:is([data-step="1"],[data-step="2"]) .tool-contract{display:block;height:248px;top:15px}
 [data-gallery=agents] .contract-fields{margin:10px 0}.contract-fields div{padding:8px 0;font-size:12px}.contract-foot{font-size:12px}
 [data-gallery=agents]:is([data-step="1"],[data-step="2"]) .scope-check{display:flex;top:281px;height:67px;padding:13px;gap:12px;transform:translateX(-50%) rotateZ(2deg)!important}
 [data-gallery=agents] .scope-check>div>span{font-size:18px}.scope-check small{font-size:12px;margin-top:3px}
 [data-gallery=agents]:is([data-step="1"],[data-step="2"]) .request-window{display:block;top:354px;height:56px;padding:10px 15px;transform:translateX(-50%) rotateZ(-2deg)!important}
 [data-gallery=agents]:is([data-step="1"],[data-step="2"]) .request-window>:not(h3){display:none}
 [data-gallery=agents]:is([data-step="1"],[data-step="2"]) .request-window h3{font-size:13px;margin:0;line-height:1.35}
 [data-gallery=agents][data-step="3"] .source-return{display:flex;top:338px;height:68px;padding:12px;gap:12px;transform:translateX(-50%) rotateZ(2deg)!important}
 [data-gallery=agents] .source-return strong{font-size:16px}.source-return span{font-size:12px;margin-top:4px}
 /* Reserve and snapshot, rejected action, clean restart, independent outcome. */
 [data-gallery=evaluation]:is([data-step="0"],[data-step="1"]) .run-reserve{display:block;top:15px;height:96px;padding:14px;transform:translateX(-50%) rotateZ(2deg)!important}
 [data-gallery=evaluation] .run-reserve strong{font-size:19px}
 [data-gallery=evaluation][data-step="0"] .original-snapshot{display:block;top:148px;height:222px}
 [data-gallery=evaluation] .snapshot-records{margin:14px 0;gap:8px}.snapshot-records i{height:6px}
 [data-gallery=evaluation][data-step="1"] .nano-attempt{display:block;top:139px;height:158px}
 [data-gallery=evaluation] .nano-attempt h3{font-size:25px}.tool-action{font-size:12px;padding-top:8px}
 [data-gallery=evaluation][data-step="1"] .runtime-gate{display:block;top:319px;height:80px;padding:13px 14px 13px 62px;transform:translateX(-50%) rotateZ(2deg)!important}
 [data-gallery=evaluation] .runtime-gate svg{position:absolute;left:15px;top:19px}.runtime-gate strong{font-size:19px}.runtime-gate span{font-size:12px;margin-top:5px}
 [data-gallery=evaluation][data-step="2"] .original-snapshot{display:block;top:20px;height:222px}
 [data-gallery=evaluation][data-step="2"] .ultra-restart{display:block;top:274px;height:117px}
 [data-gallery=evaluation][data-step="3"] .ultra-restart{display:block;top:20px;height:111px;transform:translateX(-50%) rotateZ(2deg)!important}
 [data-gallery=evaluation] .ultra-restart h3{font-size:24px;margin:10px 0}
 [data-gallery=evaluation][data-step="3"] .outcome-record{display:block;top:166px;height:217px}
 [data-gallery=evaluation] .outcome-record h3{font-size:24px;margin:14px 0}.outcome-record>div{font-size:12px}
 /* Original paper remains visible while structure is prepared. */
 [data-gallery=data][data-step="0"] .document-source{display:block;height:300px;top:35px}
 [data-gallery=data] .document-source h3{font-size:35px}.document-drawing{right:18px;top:74px}.source-lines{margin:17px 0;gap:10px}
 [data-gallery=data]:is([data-step="1"],[data-step="2"]) .document-structure{display:block;height:264px;top:20px}
 [data-gallery=data] .document-structure h3{font-size:25px}.mini-table{margin:12px 0}.mini-table i{height:18px}
 [data-gallery=data][data-step="1"] .document-source{display:block;top:319px;height:73px;padding:12px 16px;transform:translateX(-50%) rotateZ(2deg)!important}
 [data-gallery=data][data-step="1"] .document-source h3{font-size:22px;margin:5px 0}
 [data-gallery=data][data-step="1"] .document-source>:not(span):not(h3){display:none}
 [data-gallery=data][data-step="2"] .recovery-control{display:flex;top:311px;height:85px;padding:13px;gap:10px;transform:translateX(-50%) rotateZ(2deg)!important}
 [data-gallery=data] .recovery-control strong{font-size:17px}.recovery-control span{font-size:12px}
 [data-gallery=data][data-step="3"] .document-output{display:block;top:20px;height:259px}
 [data-gallery=data][data-step="3"] .quality-control{display:block;top:309px;height:92px;padding:13px;transform:translateX(-50%) rotateZ(2deg)!important}
 [data-gallery=data] .quality-control strong{font-size:18px}.quality-control>span{font-size:13px;margin-top:6px}.quality-control small{font-size:12px;margin-top:5px}
 /* Each colored bundle keeps both observations together in its partition. */
 [data-gallery=scientific] .gallery-stage{height:440px!important}.world-scientific::before,.world-delivery::before{display:none}
 [data-gallery=scientific] .partition{display:none;left:10px;width:calc(100% - 20px);height:108px;padding:15px 10px;opacity:1!important;transform:perspective(850px) rotateY(-3deg)!important}
 [data-gallery=scientific] .partition>span{font-size:15px;width:87px}.partition>small{font-size:12px;width:83px;line-height:1.4}
 [data-gallery=scientific] .star-bundle{display:grid;grid-template-columns:1fr 1fr;left:22px;width:calc(100% - 44px);height:84px;padding:9px 12px;box-sizing:border-box;opacity:1!important;translate:none;transform:perspective(850px) rotateY(-4deg) rotateZ(-1deg)!important}
 [data-gallery=scientific] .star-identity{grid-row:span 2;gap:7px;margin:0}.star-identity strong{font-size:16px}.star-identity svg{width:22px;height:22px}
 [data-gallery=scientific] .star-bundle>span{font-size:12px;margin:2px 0;padding-left:7px;line-height:1.3}.star-bundle small{font-size:12px;margin:3px 0 0;grid-column:1/-1}
 [data-gallery=scientific] .star-a{top:142px}[data-gallery=scientific] .star-b{top:237px}[data-gallery=scientific] .star-c{top:332px}
 [data-gallery=scientific][data-step="0"] .catalog-source{display:block;top:10px;height:118px;padding:13px}
 [data-gallery=scientific] .catalog-source h3{font-size:20px;margin:5px 0}
 [data-gallery=scientific]:not([data-step="0"]) .partition{display:block}
 [data-gallery=scientific]:not([data-step="0"]) .partition-train{top:13px}[data-gallery=scientific]:not([data-step="0"]) .partition-validation{top:133px}[data-gallery=scientific]:not([data-step="0"]) .partition-test{top:253px}
 [data-gallery=scientific]:not([data-step="0"]) .star-bundle{left:111px;width:calc(100% - 137px);height:87px;display:block;padding:8px;transform:perspective(850px) rotateY(-4deg) rotateZ(1deg)!important}
 [data-gallery=scientific]:not([data-step="0"]) .star-a{top:21px}[data-gallery=scientific]:not([data-step="0"]) .star-b{top:141px}[data-gallery=scientific]:not([data-step="0"]) .star-c{top:261px}
 [data-gallery=scientific]:not([data-step="0"]) .star-identity{margin-bottom:6px}
 [data-gallery=scientific]:not([data-step="0"]) .star-bundle small{display:none}
 [data-gallery=scientific]:is([data-step="1"],[data-step="3"]) .heldout-seal{display:flex;top:383px;height:43px;padding:9px 12px;gap:10px;transform:translateX(-50%) rotateZ(-1deg)!important}
 [data-gallery=scientific] .heldout-seal strong{font-size:15px}.heldout-seal svg{width:22px;height:25px}
 [data-gallery=scientific][data-step="2"] .model-choice{display:block;top:377px;height:54px;padding:9px 12px;transform:translateX(-50%) rotateZ(-1deg)!important}
 [data-gallery=scientific] .model-choice strong{font-size:16px}.model-choice span{font-size:12px;margin-top:4px}
 /* The same three environments persist above the selected responsibility. */
 [data-gallery=delivery][data-step] .environment{top:28px;width:calc(33.333% - 12px);height:146px;opacity:1!important;transform:none!important}
 [data-gallery=delivery] .env-dev{left:6px}[data-gallery=delivery] .env-stage{left:calc(33.333% + 6px)}[data-gallery=delivery] .env-prod{left:calc(66.666% + 6px)}
 [data-gallery=delivery] .environment-surface{height:68px;gap:8px;transform:perspective(500px) rotateX(35deg) rotateZ(-6deg)}
 [data-gallery=delivery] .environment-surface i{width:16px;height:19px}.environment>strong{font-size:13px;margin-top:24px}.environment>small{font-size:12px;margin-top:6px}
 [data-gallery=delivery][data-step="0"] .environment{top:111px}
 [data-gallery=delivery][data-step="1"] .delivery-layer{display:block;top:212px;height:186px}
 [data-gallery=delivery] .delivery-layer h3{font-size:25px}.layer-stack{gap:6px;padding-top:9px;font-size:13px}.layer-stack span{font-size:12px}
 [data-gallery=delivery][data-step="2"] .access-layer{display:flex;top:227px;height:156px;gap:12px}
 [data-gallery=delivery] .access-layer h3{font-size:23px;margin:6px 0 13px}.access-layer span{font-size:14px}
 [data-gallery=delivery][data-step="3"] .operations-layer{display:block;top:216px;height:180px}
 [data-gallery=delivery] .operations-layer h3{font-size:24px;margin:10px 0}.operations-layer span{font-size:14px}
}
@media(max-width:600px){[data-gallery=scientific][data-step] .star-bundle{translate:0 0 65px!important;z-index:2}}
@media(max-width:600px){[data-gallery=scientific][data-step] .star-bundle{translate:0 0 32px!important}[data-gallery=scientific][data-step="0"] .star-bundle{left:26px;width:calc(100% - 66px)}[data-gallery=scientific]:not([data-step="0"]) .star-bundle{left:104px;width:calc(100% - 158px)}}
