/* Moldavite FieldFrame 0.2 — perimeter is reserved space, never particle occlusion.
 * Presentation mode is secondary. All original physics and event listeners stay.
 */
:root{--mold-head-height:66px;--mold-foot-height:106px;--mold-inspect-width:clamp(310px,25vw,380px);--mold-work-width:clamp(350px,27vw,415px);--mold-field-x:50%;
 --mold-edge:#1b4540;--mold-ink:#e3f9ed;--mold-dim:#9fc4b8;--mold-active:#b0ffc5;}
body.mold-fieldframe{background:#030b0a;color:var(--mold-ink);}
#mold-frame-head,#mold-frame-foot{box-sizing:border-box;position:absolute;left:0;right:0;z-index:22;display:flex;min-width:0;max-width:none!important;
  border:0;box-shadow:none;border-radius:0;color:var(--mold-ink);backdrop-filter:none;}
#mold-frame-head *,#mold-frame-foot *{box-sizing:border-box;}
#mold-frame-head{all:unset;box-sizing:border-box!important;position:absolute;left:0;right:0;top:0;z-index:22;min-height:66px;
  padding:10px clamp(12px,1.5vw,24px);display:grid;grid-template-columns:minmax(215px,1fr) minmax(0,1.1fr) auto;
  gap:14px;align-items:center;color:#e7fff2;background:linear-gradient(180deg,#061713 0%,#061612 100%);
  border-bottom:1px solid #224039;font:13px/1.35 system-ui,sans-serif;}
#mold-frame-head .mold-identity{display:flex;gap:12px;align-items:center;min-width:0;}
#mold-frame-head .mold-insignia{display:grid;place-items:center;width:38px;height:38px;flex:none;border:1px solid #416752;
  border-radius:50%;color:#d6f9bc;font-size:21px;background:radial-gradient(circle,#194435,#061e19);}
.mold-identity-copy{display:flex;flex-direction:column;gap:3px;min-width:0;}
.mold-identity-copy strong{font:700 clamp(15px,1.15vw,19px)/1.05 Georgia,serif;letter-spacing:.12em;white-space:nowrap}
.mold-identity-copy small{font:600 9px/1.1 ui-monospace,monospace;color:#93b7a9;letter-spacing:.1em;white-space:nowrap}
.mold-live-state{display:flex;align-items:center;gap:9px;justify-content:center;white-space:nowrap;min-width:0;
  font:11px ui-monospace,monospace;color:#b8decf}
.mold-live-state>span:not(.mold-live-pulse){padding:5px 9px;border:1px solid #244b40;border-radius:99px;background:#0b2721;overflow:hidden;text-overflow:ellipsis}
.mold-live-pulse{width:7px;height:7px;flex:none;border-radius:50%;background:#8dffb4;box-shadow:0 0 12px #53b883}
.mold-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;}
.mold-head-actions>span{display:flex;align-items:center;min-width:0;}
.mold-head-actions button{appearance:none;display:inline-flex!important;align-items:center;justify-content:center;gap:4px;
  position:static!important;left:auto!important;right:auto!important;top:auto!important;
  min-height:36px!important;max-width:none!important;padding:8px 11px!important;
  background:#0d2a23!important;color:#d8f5e6!important;border:1px solid #31564a!important;
  border-radius:9px!important;box-shadow:none!important;font:600 12px/1.2 system-ui,sans-serif!important;
  white-space:nowrap;cursor:pointer;text-decoration:none}
.mold-head-actions button:hover{background:#174335!important;border-color:#7bcca3!important}
.mold-head-actions #immersion-present{background:transparent!important;color:#b4c9c2!important}
.mold-head-actions #btnOwnWorld{background:#164332!important}
.mold-head-actions #artifact-archive-button{background:#18342d!important}
.mold-head-actions #immersion-camera{display:none!important}
.mold-head-actions button:focus-visible,#mold-frame-foot button:focus-visible{outline:2px solid #a6ffc4;outline-offset:2px}
#app>.viewport-wrap{inset:var(--mold-head-height) 0 var(--mold-foot-height) 0!important;
  top:var(--mold-head-height)!important;bottom:var(--mold-foot-height)!important;
  width:auto!important;height:auto!important;left:0;right:0;min-height:0!important;transition:left .22s ease,right .22s ease,bottom .22s ease!important}
#app>.viewport-wrap #viewport{width:100%;height:100%;min-height:0}
#app>.viewport-wrap #sim,#app>.viewport-wrap #trail{max-height:100%}
#mold-frame-foot{bottom:0;min-height:94px;padding:8px clamp(9px,1vw,20px) 10px;display:flex;flex-direction:column;justify-content:center;
 background:linear-gradient(180deg,#071b16,#06110f);border-top:1px solid #2b4b3e;}
.mold-frame-track{display:grid;width:100%;min-width:0;grid-template-columns:minmax(315px,1.3fr) minmax(230px,.85fr) minmax(290px,1.05fr) minmax(90px,.32fr);
 align-items:center;gap:clamp(9px,1.2vw,24px);}
.mold-frame-group{display:flex;flex-direction:column;min-width:0;gap:7px;border-left:1px solid #24463d;padding-left:12px;}
.mold-frame-group:first-child{padding-left:0;border-left:0}
.mold-frame-group>label{color:#85bb9f;font:700 9px/1 ui-monospace,monospace;letter-spacing:.14em;white-space:nowrap;}
.mold-group-content{min-width:0;display:flex;gap:4px;align-items:stretch}
#mold-stage-slot .stages,#mold-lens-slot .modes{width:100%!important;display:grid!important;gap:4px!important;margin:0!important;max-height:46px}
#mold-stage-slot .stages{grid-template-columns:repeat(6,minmax(0,1fr))!important}
#mold-lens-slot .modes{grid-template-columns:repeat(5,minmax(0,1fr))!important}
#mold-frame-foot button{appearance:none;min-width:0;max-width:none;white-space:nowrap;box-shadow:none;
  border-radius:8px!important;min-height:34px!important;padding:6px 7px!important;
  border:1px solid #35574b!important;color:#badacc!important;background:#0a211c!important;
  font:600 11px/1.2 system-ui,sans-serif!important;cursor:pointer;transition:background .15s ease,border-color .15s ease}
#mold-frame-foot button:hover{border-color:#87dcb1!important;background:#123b2f!important}
#mold-frame-foot button.active,#mold-frame-foot button[aria-pressed="true"]{color:#f4fff8!important;background:#164632!important;border-color:#7ddcab!important}
#mold-stage-slot button.stage{height:38px!important;text-align:center!important;font-size:0!important;display:flex;align-items:center;justify-content:center;}
#mold-stage-slot button.stage b{font:700 11px/1.1 system-ui,sans-serif!important;color:inherit!important;white-space:nowrap}
#mold-stage-slot button.stage small,#mold-stage-slot button.stage em,#mold-stage-slot button.stage span{display:none!important}
#mold-lens-slot button.mode{height:38px!important;font-size:0!important;display:flex;align-items:center;justify-content:center}
#mold-lens-slot button.mode b{font:700 11px/1.1 system-ui,sans-serif!important;color:inherit!important}
#mold-operation-slot{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));width:100%;gap:4px}
#mold-operation-slot .top-action{width:100%!important;margin:0!important;min-height:38px!important;}
#mold-operation-slot #btnStart{border-color:#52996e!important;background:#164531!important;color:#e9ffed!important}
#mold-capture-slot{width:100%;}
#mold-capture-slot #btnFormed{width:100%!important;background:#253d29!important;border-color:#a3a57b!important;color:#e9ebc9!important;margin:0!important}
.mold-boundary-track{position:absolute;left:0;right:0;top:-2px;height:2px;pointer-events:none;
 background:linear-gradient(90deg,transparent,#24483c 22%,#24483c 78%,transparent)}
#mold-boundary-cursor{position:absolute;left:var(--mold-field-x);height:2px;width:42px;transform:translateX(-50%);
 background:#9bf4bf;box-shadow:0 0 11px #65e6b4;transition:left .8s ease}
#mold-inspection-dock,#mold-world-dock{display:none;position:absolute;z-index:24;top:var(--mold-head-height);bottom:var(--mold-foot-height);right:0;
 width:var(--mold-inspect-width);background:#061914;border-left:1px solid #36564a;overflow:hidden}
body.mold-inspecting #mold-inspection-dock,body.mold-world-open #mold-world-dock{display:block}
body.mold-inspecting #app>.viewport-wrap,body.mold-world-open #app>.viewport-wrap{right:var(--mold-inspect-width)!important}
#mold-inspection-dock #immersion-inspector{position:relative!important;inset:auto!important;top:auto!important;right:auto!important;left:auto!important;bottom:auto!important;
 width:100%!important;height:100%;max-height:none!important;overflow:auto;box-shadow:none!important;background:transparent!important;
 border:0!important;border-radius:0!important;padding:20px!important;pointer-events:auto!important}
#mold-inspection-dock #immersion-inspector[hidden]{display:none!important}
#mold-world-dock #situated-world{position:relative!important;inset:auto!important;top:auto!important;right:auto!important;bottom:auto!important;
 left:auto!important;display:block;width:100%!important;height:100%!important;max-height:none!important;max-width:none!important;
 overflow-y:auto;border:0!important;border-radius:0!important;box-shadow:none!important;padding:18px!important;background:transparent!important}
#mold-world-dock #situated-world[hidden]{display:none!important}
body.immersion-tools-open #app>.viewport-wrap{left:var(--mold-work-width)!important}
body.immersion-tools-open #immersion-workspace{top:var(--mold-head-height)!important;bottom:var(--mold-foot-height)!important;
 left:0!important;right:auto!important;width:var(--mold-work-width)!important;height:auto!important;
 border-radius:0!important;border:0!important;border-right:1px solid #2d5345!important;box-shadow:none!important;
 transform:translateX(-105%)!important}
body.immersion-tools-open #immersion-workspace{transform:translateX(0)!important}
#immersion-workspace .mold-flow-reference{padding:clamp(12px,2vw,22px);max-width:52ch}
.mold-flow-reference h2{font:600 24px/1.15 Georgia,serif;color:#e4fff0;margin:0 0 16px}
.mold-flow-reference p{font:13px/1.7 system-ui,sans-serif;color:#b4d2c6;margin:0 0 13px}
body.mold-fieldframe:not(.immersion-tools-open) #immersion-workspace{visibility:hidden;pointer-events:none}
body.mold-fieldframe #immersion-menu[hidden],body.mold-fieldframe #immersion-inspect[hidden]{display:none!important}
body.mold-fieldframe #immersion-workspace[aria-hidden=true]{display:none}
body.mold-fieldframe #immersion-controls{pointer-events:none}
/* Focus / presentation is a SECONDARY, deliberate mode, not the main layout. */
body.immersion-present #mold-frame-head,body.immersion-present #mold-frame-foot,
body.immersion-present #mold-inspection-dock,body.immersion-present #mold-world-dock{display:none!important}
body.immersion-present #app>.viewport-wrap{inset:0!important;top:0!important;right:0!important;bottom:0!important;left:0!important}
body.immersion-present #immersion-workspace{visibility:hidden!important}
@media(max-width:1350px){
  #mold-frame-head{grid-template-columns:minmax(170px,auto) minmax(0,1fr) auto;gap:9px;padding-inline:12px}
  .mold-live-state #mold-field-137{display:none}
  .mold-frame-track{display:flex;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;padding-bottom:3px;gap:12px}
  .mold-frame-group{flex:0 0 auto}
  .mold-trajectory{width:390px}.mold-lenses{width:310px}.mold-operators{width:360px}.mold-session{width:110px}
}
@media(max-width:850px){
  #mold-frame-head{grid-template-columns:1fr auto;grid-template-rows:auto auto;row-gap:6px;min-height:90px}
  .mold-live-state{grid-column:1/-1;grid-row:2;justify-content:flex-start;overflow:hidden;font-size:10px}
  .mold-head-actions{grid-column:2;grid-row:1}
  .mold-identity-copy small{font-size:8px}
  .mold-head-actions button{min-height:34px!important;padding:6px 8px!important;font-size:11px!important}
  #mold-archive-slot{display:none}
  .mold-identity .mold-insignia{width:30px;height:30px;font-size:17px}
  #mold-frame-foot{min-height:92px;padding:8px 10px}
  .mold-frame-track{gap:10px}
  .mold-frame-group>label{font-size:9px}
  .mold-trajectory{width:370px}.mold-lenses{width:320px}.mold-operators{width:350px}
  body.immersion-tools-open #app>.viewport-wrap{left:0!important;bottom:calc(var(--mold-foot-height) + min(48dvh,420px))!important}
  body.immersion-tools-open #immersion-workspace{left:0!important;top:auto!important;right:0!important;bottom:var(--mold-foot-height)!important;
    width:100%!important;height:min(48dvh,420px)!important;transform:translateY(110%)!important;border-right:0!important;border-top:1px solid #365448!important}
  body.immersion-tools-open #immersion-workspace{transform:translateY(0)!important}
  body.mold-inspecting #app>.viewport-wrap,body.mold-world-open #app>.viewport-wrap{right:0!important;bottom:calc(var(--mold-foot-height) + 34dvh)!important}
  #mold-inspection-dock,#mold-world-dock{left:0;right:0;top:auto;bottom:var(--mold-foot-height);width:100%;height:34dvh;
    border-left:0;border-top:1px solid #365448}
}
@media(max-width:520px){
  #mold-frame-head{padding:7px 9px!important;gap:6px;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto auto!important}
  #mold-frame-head .mold-identity{grid-column:1;grid-row:1}
  .mold-identity-copy strong{font-size:15px}
  .mold-identity-copy small{font-size:8px;letter-spacing:.08em}
  .mold-identity .mold-insignia{width:28px;height:28px;font-size:16px}
  #mold-frame-head .mold-head-actions{grid-column:1!important;grid-row:2!important;display:flex;overflow-x:auto;
    overflow-y:hidden;justify-content:flex-start!important;width:100%;padding:0 0 3px;scrollbar-width:thin;gap:5px}
  #mold-frame-head .mold-live-state{grid-column:1!important;grid-row:3!important;justify-content:flex-start;overflow:hidden}
  #mold-world-slot,#mold-archive-slot{display:flex!important;flex:none}
  #mold-frame-head .mold-head-actions button{font-size:10px!important;min-height:31px!important;padding:5px 8px!important;min-width:0!important}
  #mold-frame-head #immersion-menu,#mold-frame-head #immersion-inspect,#mold-frame-head #immersion-present{font-size:10px!important}
  #mold-frame-head #immersion-menu span,#mold-frame-head #immersion-inspect span,#mold-frame-head #immersion-present span{display:inline!important}
  .mold-live-state>span:not(.mold-live-pulse){padding:4px 6px;font-size:9px}
  #mold-frame-foot{min-height:94px}
}
@media(prefers-reduced-motion:reduce){
  #mold-boundary-cursor,#app>.viewport-wrap,#mold-frame-foot button{transition:none!important}
}


/* FieldFrame 0.2.2: task clarity without adding a second control surface. */
#mold-frame-foot{min-height:78px;padding-block:8px 9px}
#mold-frame-foot .mold-frame-track{grid-template-columns:minmax(345px,1.65fr) minmax(135px,.55fr) minmax(145px,.55fr) minmax(145px,.55fr);align-items:center;gap:10px}
#mold-frame-foot .mold-operators{order:0}
#mold-frame-foot .mold-session{order:1}
#mold-frame-foot .mold-trajectory{order:2}
#mold-frame-foot .mold-lenses{order:3}
#mold-operation-slot{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
#mold-operation-slot button[hidden]{display:none!important}
#mold-frame-foot .mold-frame-group{gap:7px;min-width:0}
#mold-frame-foot .mold-frame-group>label{font-size:10px;letter-spacing:.09em}
#mold-frame-foot .mold-disclosure{display:block;width:100%;min-width:0}
#mold-frame-foot .mold-disclosure summary{list-style:none;display:flex;gap:6px;align-items:center;justify-content:space-between;
 border:1px solid #35574b;border-radius:9px;min-height:37px;padding:7px 10px;background:#0b241d;color:#bedccc;
 font:600 11px/1.25 system-ui,sans-serif;cursor:pointer;}
#mold-frame-foot .mold-disclosure summary::-webkit-details-marker{display:none}
#mold-frame-foot .mold-disclosure summary strong{min-width:0;max-width:100%;text-align:right;overflow:hidden;text-overflow:ellipsis;
 white-space:nowrap;font-weight:700;color:#e3fff0}
#mold-frame-foot .mold-disclosure[open] summary{background:#143e2f;border-color:#82d6a8}
#mold-frame-foot .mold-disclosure summary:focus-visible{outline:2px solid #b2ffd1;outline-offset:2px}
#mold-frame-foot .mold-disclosure:not([open]) > .mold-group-content{display:none!important}
#mold-frame-foot .mold-disclosure[open] > .mold-group-content{padding-top:7px;min-width:0}
#mold-frame-foot #mold-stage-slot .stages{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
 height:auto!important;max-height:none!important}
#mold-frame-foot #mold-lens-slot .modes{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
 height:auto!important;max-height:none!important}
#mold-frame-foot #mold-stage-slot button.stage,#mold-frame-foot #mold-lens-slot button.mode{min-height:34px!important;height:auto!important}
#mold-frame-foot #mold-stage-slot button.stage b,#mold-frame-foot #mold-lens-slot button.mode b{font-size:10px!important}
#mold-frame-foot .mold-operators button{min-height:37px!important}
#mold-frame-foot .mold-session button{min-height:37px!important}
.mold-flow-reference .mold-advanced-session{display:flex;flex-direction:column;margin-top:20px;padding-top:15px;
 border-top:1px solid #244e3b;color:#bddbc8;gap:8px}
.mold-flow-reference .mold-advanced-session>small{font:700 10px/1.1 ui-monospace,monospace;letter-spacing:.1em}
.mold-flow-reference .mold-advanced-session details{border:1px solid #345747;border-radius:9px;padding:10px}
.mold-flow-reference .mold-advanced-session summary{cursor:pointer;font:600 12px system-ui,sans-serif}
.mold-flow-reference .deck-session-actions{position:static!important;display:flex;flex-wrap:wrap;gap:5px;width:auto!important;
 min-width:0!important;margin-top:12px}
.mold-flow-reference .deck-session-actions button{min-width:105px;flex:1;white-space:normal}
@media(max-width:1350px) and (min-width:701px){
 #mold-frame-foot .mold-frame-track{display:flex;overflow-x:auto;overflow-y:hidden;gap:10px;align-items:center}
 #mold-frame-foot .mold-operators{flex:0 0 380px;width:380px}
 #mold-frame-foot .mold-session{flex:0 0 145px;width:145px}
 #mold-frame-foot .mold-trajectory,#mold-frame-foot .mold-lenses{flex:0 0 170px;width:170px}
}
@media(max-width:700px){
 #mold-frame-foot{min-height:92px;padding:7px 9px 8px}
 #mold-frame-foot .mold-frame-track{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);
    gap:5px;overflow:visible;align-items:center;padding:0;width:100%}
 #mold-frame-foot .mold-frame-group{padding:0;border:0;min-width:0;width:auto}
 #mold-frame-foot .mold-operators{grid-column:1/-1;order:0}
 #mold-frame-foot .mold-session{grid-column:1;order:1}
 #mold-frame-foot .mold-trajectory{grid-column:2;order:2}
 #mold-frame-foot .mold-lenses{grid-column:3;order:3}
 #mold-frame-foot .mold-operators>label{font-size:9px}
 #mold-frame-foot .mold-session>label{display:none}
 #mold-frame-foot .mold-disclosure summary{min-height:33px;padding:5px;font-size:10px;gap:3px}
 #mold-frame-foot .mold-disclosure summary strong{font-size:10px}
 #mold-frame-foot .mold-disclosure[open] > .mold-group-content{padding:6px 0 1px}
 #mold-frame-foot .mold-frame-track:has(.mold-trajectory .mold-disclosure[open]) .mold-trajectory{grid-column:1/-1}
 #mold-frame-foot .mold-frame-track:has(.mold-lenses .mold-disclosure[open]) .mold-lenses{grid-column:1/-1}
 #mold-frame-foot #mold-stage-slot .stages{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 #mold-frame-foot #mold-lens-slot .modes{grid-template-columns:repeat(5,minmax(0,1fr))!important}
 #mold-operation-slot{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
 #mold-operation-slot button{font-size:10px!important;padding:6px 3px!important;min-height:34px!important}
 #mold-capture-slot #btnFormed{min-height:33px!important;padding:5px 3px!important;font-size:10px!important}
}
