/* Developer → 3D Studio: the studio panel in the right-hand menu, the model
   cards with their three menus, and the window over the stage (the drawing
   pad, the notebook). The rest of the lab's vocabulary — .lab-refs-drop,
   .lab-ref, .lab-status, .lab-el-acts, .lab-pub, .lab-menu-win — is shared
   with the Element builder (app.css). */
.s3d-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: 6px; }
.s3d-top .menu-grp { flex: 1; }
.s3d-notebook-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: 11.5px; }
.s3d-notebook-btn svg { width: 13px; height: 13px; }
.s3d-hf { display: flex; flex-direction: column; gap: 6px; margin: 2px 10px 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line-soft); background: var(--glass-2); font-size: 12px; line-height: 1.45; color: var(--muted); }
.s3d-hf b { color: var(--ink); font-size: 12.5px; }
.s3d-hf .btn { align-self: flex-start; margin-top: 2px; }
.s3d-form { display: flex; flex-direction: column; gap: 8px; padding: 2px 14px 12px; }
.s3d-form input, .s3d-form textarea { width: 100%; }
.s3d-form textarea { min-height: 96px; resize: vertical; font: inherit; line-height: 1.45; }
.s3d-form .btn.primary { align-self: flex-start; }
.s3d-refs { display: flex; flex-direction: column; gap: 6px; }
.s3d-sketch-open { width: 100%; font: inherit; color: inherit; }
.s3d-sketch-have { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(255, 255, 255, .45); animation: menu-row-in .36s var(--ease-spring) both; }
.s3d-sketch-have img { width: 84px; height: 63px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line-soft); }
.s3d-sketch-acts { display: flex; flex-direction: column; gap: 4px; }
.s3d-sketch-acts .btn { padding: 4px 10px; font-size: 11.5px; box-shadow: none; }

/* the models */
.s3d-list { display: flex; flex-direction: column; gap: 8px; padding: 2px 10px 12px; }
.s3d-model {
  border: 1px solid var(--line-soft); border-radius: 14px; background: var(--glass-2); box-shadow: var(--shadow-rest); overflow: hidden;
  animation: menu-row-in .46s var(--ease-spring) both; animation-delay: calc(var(--i, 0) * 24ms);
  transition: transform .32s var(--ease-spring), box-shadow .32s var(--ease-out), border-color .16s var(--ease-out);
}
.s3d-model:hover { border-color: rgba(123, 30, 46, .3); box-shadow: var(--shadow-lift); }
.s3d-model.open { border-color: rgba(123, 30, 46, .4); }
.s3d-model.out { opacity: 0; transform: scale(.97); transition: opacity .22s var(--ease-out), transform .22s var(--ease-out); }
.s3d-model-head { display: flex; align-items: center; gap: 9px; padding: 9px 10px 8px 10px; cursor: default; }
.s3d-model.is-ready .s3d-model-head { cursor: pointer; }
.s3d-model-pic { flex: none; width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #fff; border: 1px solid var(--line-soft); }
.s3d-model-pic.empty { background: linear-gradient(135deg, rgba(123, 30, 46, .12), rgba(245, 197, 24, .18)); }
.s3d-model-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.s3d-model-tt b { font: 700 13px var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s3d-model-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s3d-model-step { display: flex; align-items: center; gap: 8px; padding: 0 12px 8px; font: 600 11.5px var(--sans); color: var(--accent-deep); }
.s3d-spin { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(123, 30, 46, .2); border-top-color: var(--accent); animation: s3d-spin .9s linear infinite; }
@keyframes s3d-spin { to { transform: rotate(360deg); } }
.s3d-model-err { padding: 0 12px 8px; font-size: 11.5px; line-height: 1.45; color: var(--danger-ink); }
.s3d-model-notes { padding: 0 12px 8px; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.s3d-model .lab-el-acts { padding-top: 0; }
.s3d-remake .nf-drawer-in { padding: 0; }
.s3d-remake-in { display: flex; flex-direction: column; gap: 6px; padding: 0 8px 10px; }
.s3d-remake-in textarea { font: 12.5px var(--sans); line-height: 1.4; padding: 7px 10px; border-radius: 10px; resize: vertical; }
.s3d-remake-in .btn { align-self: flex-start; padding: 5px 11px; font-size: 11.5px; }

/* a model's three menus: cards in the strip under the canvas (#s3d-tools,
   laid out with the builders' in app.css), the Design | Animation |
   Interactivity track in its head (builders.css .lt-modes) */
.s3d-edit-wait { font-size: 12px; color: var(--muted); padding: 2px 0 6px; }
.s3d-card .lt-card-b { display: block; }
.lt-ask .s3d-ask { flex-direction: column; align-items: stretch; margin: 0; }
.s3d-ctl { margin-bottom: 7px; }
.s3d-ctl label { width: 84px; font-size: 12px; color: var(--muted); line-height: 1.25; }
.s3d-ctl label.em-switch { width: 100%; }
.s3d-ctl .mono { min-width: 40px; text-align: right; font: 400 11px var(--mono); color: var(--muted); }
.s3d-ctl select { flex: 1; min-width: 0; padding: 5px 10px; font-size: 12px; border-radius: 10px; }
.s3d-ctl input.em-text { flex: 1; min-width: 0; padding: 5px 10px; font-size: 12.5px; border-radius: 10px; }
.s3d-ctl input[type=color] { width: 34px; height: 26px; padding: 2px; border-radius: 8px; cursor: pointer; }
.s3d-ctl input[type=color][data-empty="1"] { opacity: .45; }
.s3d-ctl .s3d-none { padding: 2px 8px; font-size: 10.5px; }
.s3d-ctl.em-off { opacity: .42; }
.s3d-ctl.em-off input, .s3d-ctl.em-off select, .s3d-ctl.em-off button { cursor: not-allowed; }
.s3d-extra-note { margin: 4px 0 8px; padding: 7px 10px; border-radius: 10px; background: rgba(245, 197, 24, .18); border: 1px solid rgba(245, 197, 24, .45); font-size: 11.5px; line-height: 1.4; color: var(--ink); }
.s3d-ask { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.s3d-ask-ic { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: var(--accent-soft); color: var(--accent-deep); }
.s3d-ask-ic svg { width: 13px; height: 13px; }
.s3d-ask input { flex: 1; min-width: 0; padding: 6px 10px; font-size: 12.5px; border-radius: 999px; }
.s3d-ask .btn.icon { flex: none; width: 29px; height: 29px; padding: 0; display: grid; place-items: center; }
.s3d-ask .btn.icon svg { width: 14px; height: 14px; }

/* the window over the stage: the pad and the notebook (the lab window, wider) */
.s3d-win { width: 560px; max-height: min(84vh, 760px); }
.s3d-win-body { overflow-y: auto; padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.s3d-pad-bar { display: flex; align-items: center; gap: 8px; }
.s3d-pad-tools { flex: none; width: auto; }
.s3d-pad-tools button { flex: none; padding: 4px 12px; overflow: visible; text-overflow: clip; }
.s3d-pad-size { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.s3d-pad-size input { width: 90px; padding: 0; border: 0; background: none; box-shadow: none; }
.s3d-pad-bar .btn { padding: 4px 10px; font-size: 11.5px; }
.s3d-pad { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; border: 1px solid var(--line); background: #fff; touch-action: none; cursor: crosshair; box-shadow: inset 0 2px 6px rgba(26, 26, 26, .06); }
.s3d-pad-foot { display: flex; align-items: center; gap: 6px; }
.s3d-pad-hint { flex: 1; font-size: 11px; color: var(--muted); line-height: 1.4; }
.s3d-note { margin: 0; max-height: 52vh; overflow: auto; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .7); border: 1px solid var(--line-soft); font: 11.5px/1.5 var(--mono); color: var(--ink); white-space: pre-wrap; word-break: break-word; }
@media (max-width: 1100px) { .s3d-win { right: 266px; } }
@media (max-width: 900px) { .s3d-win { right: 12px; left: 12px; width: auto; bottom: 84px; } }
@media (prefers-reduced-motion: reduce) { .s3d-spin { animation: none; } .s3d-model, .s3d-sketch-have { animation: none; } }

/* ---- the Developer card's reel (app.js DEV_REEL_3D) ----
   8s: a cube is sketched on a pad and scanned; Higgsfield's beam lifts it off
   as a spinning wireframe that snaps solid, tries on three looks from the
   swatches, then winds up and is flung into the menu. The base styles are the
   still that reduced motion shows (app.css stills every .reel). */
.reel-3d .s3-pad { left: 7%; top: 17%; width: 29%; height: 62%; border-radius: 8px; background: #FFFFFF; overflow: hidden; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); transform-origin: 50% 60%; animation: s3-pad 8s infinite; }
.reel-3d .s3-pad::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(20, 20, 20, .12) 1px, transparent 1.2px); background-size: 9px 9px; }
.reel-3d .s3-pad svg { position: absolute; left: 14%; top: 12%; width: 72%; height: 76%; overflow: visible; }
.reel-3d .s3-pad path { fill: none; stroke: #2A2A2A; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 0; animation: s3-draw 8s infinite; }
.reel-3d .s3-scan { left: -4%; right: -4%; top: 0; height: 3px; background: #F5C518; box-shadow: 0 0 12px 3px rgba(245, 197, 24, .6); opacity: 0; animation: s3-scan 8s infinite; }
.reel-3d .s3-beam { left: 36%; top: 47%; width: 20%; height: 2px; border-radius: 1px; opacity: 0; transform-origin: 0 50%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .8) 30%, #F5C518); box-shadow: 0 0 10px rgba(245, 197, 24, .6); animation: s3-beam 8s infinite; }
.reel-3d .s3-burst { left: 64%; top: 46%; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%; opacity: 0; border: 2px solid #F5C518; box-shadow: 0 0 18px rgba(245, 197, 24, .5), inset 0 0 12px rgba(245, 197, 24, .35); animation: s3-burst 8s cubic-bezier(.15, .7, .3, 1) infinite; }
/* the model: a cube spinning in its own perspective */
.reel-3d .s3-model { left: 64%; top: 46%; width: 54px; height: 54px; margin: -27px 0 0 -27px; perspective: 380px; animation: s3-model 8s infinite; }
.reel-3d .s3-cube { inset: 0; transform-style: preserve-3d; transform: rotateX(-24deg) rotateY(35deg); animation: s3-spin 4s linear infinite; }
.reel-3d .s3-cube b { inset: 0; border: 1.5px solid rgba(255, 255, 255, .2); border-radius: 3px; background-color: #8E2A3C; animation: s3-face 8s infinite; }
.reel-3d .s3-cube .f1 { transform: translateZ(27px); }
.reel-3d .s3-cube .f2 { transform: rotateY(90deg) translateZ(27px); filter: brightness(.8); }
.reel-3d .s3-cube .f3 { transform: rotateY(180deg) translateZ(27px); filter: brightness(.6); }
.reel-3d .s3-cube .f4 { transform: rotateY(-90deg) translateZ(27px); filter: brightness(.7); }
.reel-3d .s3-cube .f5 { transform: rotateX(90deg) translateZ(27px); filter: brightness(1.2); }
.reel-3d .s3-cube .f6 { transform: rotateX(-90deg) translateZ(27px); filter: brightness(.5); }
.reel-3d .s3-shadow { left: 64%; top: 74%; width: 60px; height: 10px; margin-left: -30px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); animation: s3-shadow 8s infinite; }
/* the look swatches, and the ring that hops between them */
.reel-3d .s3-bar { left: 52%; top: 82%; width: 24%; height: 12%; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); animation: s3-bar 8s infinite; }
.reel-3d .s3-bar b { top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.reel-3d .s3-bar .w1 { left: 22%; background: #8E2A3C; }
.reel-3d .s3-bar .w2 { left: 50%; background: #F5C518; }
.reel-3d .s3-bar .w3 { left: 78%; background: #2A2A2A; }
.reel-3d .s3-ring { left: 22%; top: 50%; width: 19px; height: 19px; margin: -9.5px 0 0 -9.5px; border-radius: 50%; border: 2px solid #FFFFFF; box-shadow: 0 0 10px rgba(245, 197, 24, .6); animation: s3-ring 8s infinite; }
.reel-3d .cap {
  left: 6%; bottom: 7%; z-index: 5; font: 800 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: #F5C518; text-shadow: 0 0 12px rgba(245, 197, 24, .45); opacity: 0;
}
.reel-3d .cap.p1 { animation: s3-cap1 8s infinite; }
.reel-3d .cap.p2 { animation: s3-cap2 8s infinite; }
.reel-3d .cap.p3 { animation: s3-cap3 8s infinite; }
.reel-3d .cap.p4 { animation: s3-cap4 8s infinite; }
@keyframes s3-pad {
  0% { opacity: 0; transform: scale(.6) rotate(-6deg); animation-timing-function: cubic-bezier(.3, 1.6, .5, 1); }
  4%, 30% { opacity: 1; transform: scale(1) rotate(0deg); animation-timing-function: cubic-bezier(.6, 0, .9, .5); }
  35%, 100% { opacity: 0; transform: scale(.85) rotate(4deg); }
}
@keyframes s3-draw { 0%, 4% { stroke-dashoffset: 100; } 22%, 100% { stroke-dashoffset: 0; } }
@keyframes s3-scan { 0%, 22% { opacity: 0; top: 0; } 23% { opacity: 1; top: 0; } 29% { opacity: 1; top: 100%; } 30%, 100% { opacity: 0; top: 100%; } }
@keyframes s3-beam { 0%, 28% { opacity: 0; transform: scaleX(0); } 31% { opacity: 1; transform: scaleX(1); } 34%, 100% { opacity: 0; transform: scaleX(1) translateX(40%); } }
@keyframes s3-burst {
  0%, 32.9% { opacity: 0; transform: scale(.4); } 33% { opacity: 1; transform: scale(.4); } 38% { opacity: 0; transform: scale(2.4); }
  38.1%, 44.9% { opacity: 0; transform: scale(.4); } 45% { opacity: 1; transform: scale(.4); } 50%, 100% { opacity: 0; transform: scale(2.4); }
}
/* off the pad · in with a squash · a squash as it fills and on each new look · wind-up · flung up out of frame */
@keyframes s3-model {
  0%, 30% { opacity: 0; transform: translate(-80px, 0) scale(.2, .2); animation-timing-function: cubic-bezier(.2, .9, .3, 1.3); }
  33% { opacity: 1; transform: translate(0, 0) scale(1.25, .8); animation-timing-function: cubic-bezier(.3, 1.6, .5, 1); }
  36%, 44% { opacity: 1; transform: translate(0, 0) scale(1, 1); }
  45.5% { opacity: 1; transform: translate(0, 0) scale(1.18, .84); animation-timing-function: cubic-bezier(.3, 1.6, .5, 1); }
  48%, 59% { opacity: 1; transform: translate(0, 0) scale(1, 1); }
  60.5% { opacity: 1; transform: translate(0, 0) scale(1.12, .9); animation-timing-function: cubic-bezier(.3, 1.6, .5, 1); }
  63%, 69% { opacity: 1; transform: translate(0, 0) scale(1, 1); }
  70.5% { opacity: 1; transform: translate(0, 0) scale(1.12, .9); animation-timing-function: cubic-bezier(.3, 1.6, .5, 1); }
  73%, 84% { opacity: 1; transform: translate(0, 0) scale(1, 1); animation-timing-function: cubic-bezier(.5, 0, .75, 0); }
  87% { opacity: 1; transform: translate(0, 8px) scale(1.2, .78); animation-timing-function: cubic-bezier(.55, 0, .3, 1); }
  90% { opacity: 1; transform: translate(0, -150px) scale(.5, 1.5); }
  91%, 100% { opacity: 0; transform: translate(0, -150px) scale(.3, .3); }
}
@keyframes s3-spin { from { transform: rotateX(-24deg) rotateY(0deg); } to { transform: rotateX(-24deg) rotateY(360deg); } }
@keyframes s3-face {
  0%, 44% { background-color: rgba(245, 197, 24, 0); border-color: #F5C518; }
  45.5%, 59% { background-color: #8E2A3C; border-color: rgba(255, 255, 255, .2); }
  60.5%, 69% { background-color: #F5C518; border-color: rgba(255, 255, 255, .2); }
  70.5%, 82% { background-color: #2A2A2A; border-color: rgba(255, 255, 255, .2); }
  84%, 100% { background-color: #8E2A3C; border-color: rgba(255, 255, 255, .2); }
}
@keyframes s3-shadow { 0%, 30% { opacity: 0; transform: scale(.3); } 34%, 86% { opacity: 1; transform: scale(1); } 89%, 100% { opacity: 0; transform: scale(.4); } }
@keyframes s3-bar { 0%, 47% { opacity: 0; transform: translateY(10px); animation-timing-function: cubic-bezier(.3, 1.5, .5, 1); } 51%, 82% { opacity: 1; transform: translateY(0); } 85%, 100% { opacity: 0; transform: translateY(6px); } }
@keyframes s3-ring {
  0%, 58% { left: 22%; transform: scale(1); animation-timing-function: cubic-bezier(.3, 1.5, .5, 1); }
  60.5% { left: 50%; transform: scale(1.25); } 62%, 68% { left: 50%; transform: scale(1); animation-timing-function: cubic-bezier(.3, 1.5, .5, 1); }
  70.5% { left: 78%; transform: scale(1.25); } 72%, 100% { left: 78%; transform: scale(1); }
}
@keyframes s3-cap1 { 0%, 4% { opacity: 0; transform: translateY(6px); } 7%, 26% { opacity: 1; transform: translateY(0); } 29%, 100% { opacity: 0; transform: translateY(-4px); } }
@keyframes s3-cap2 { 0%, 29% { opacity: 0; transform: translateY(6px); } 32%, 45% { opacity: 1; transform: translateY(0); } 48%, 100% { opacity: 0; transform: translateY(-4px); } }
@keyframes s3-cap3 { 0%, 48% { opacity: 0; transform: translateY(6px); } 51%, 82% { opacity: 1; transform: translateY(0); } 85%, 100% { opacity: 0; transform: translateY(-4px); } }
@keyframes s3-cap4 { 0%, 85% { opacity: 0; transform: translateY(6px); } 88%, 97% { opacity: 1; transform: translateY(0); } 99%, 100% { opacity: 0; transform: translateY(-4px); } }
