/* The Section builder and the Animation builder (Developer → …): the Element
   builder's lab for whole sections and for motion (app.js LAB_KINDS,
   server/labs.js). What differs from the Element builder lives here; the
   Animation builder's studio has its own sheet, animstudio.css. */

/* ---- what each builder shows in the lab's Claude panel ---- */
.lab-start-blender, .lab-start-unreal { display: none; }
body.lab-animations :is(.lab-start-blender, .lab-start-unreal) { display: block; }
body.lab-animations .lab-start-chrome { display: none; }
body:not(.lab-elements) #lab-cursor-quick, body:not(.lab-elements) #lab-cursor { display: none; }
body:not(.lab-elements) :is(#lab-hf-toggle, #lab-hf) { display: none; }

/* ---- the Section builder's Select and Move, in the tools' head ----
   (and the 3D Studio's Design | Animation | Interactivity, on the same track) */
.lt-modes { display: none; }
body.dev-lab.lab-sections .lt-modes, body.dev-3d .lt-modes.s3d-modes:not([hidden]) {
  display: inline-flex; flex: none; gap: 2px; padding: 2px; margin-left: 6px;
  border-radius: 999px; background: rgba(26, 26, 26, .06); box-shadow: inset 0 2px 6px rgba(26, 26, 26, .08);
}
.lt-modes button {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px 0 8px; border: 1px solid transparent; border-radius: 999px;
  background: none; color: var(--muted); font: 600 11.5px var(--sans); cursor: pointer;
  transition: transform .32s var(--ease-spring), background .16s var(--ease-out), color .16s var(--ease-out), box-shadow .32s var(--ease-out);
}
.lt-modes button[hidden] { display: none; }
.lt-modes button svg { width: 13px; height: 13px; flex: none; }
.lt-modes button:hover { color: var(--ink); }
.lt-modes button:active { transform: scale(.94); transition-duration: .06s; }
.lt-modes button.on { background: var(--accent-soft); border-color: rgba(123, 30, 46, .3); color: var(--accent-deep); box-shadow: 0 0 10px rgba(123, 30, 46, .12); }
.lt-modes button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.lt-folded .lt-modes { display: none !important; }

/* ---- asking Claude about one part: the strip's first card ---- */
.lt-card.lt-ask { width: 268px; border-color: rgba(217, 119, 87, .45); background: rgba(255, 255, 255, .78); }
.lt-ask .lt-card-h { color: #A64B28; }
.lt-ask .lt-card-b { display: flex; flex-direction: column; gap: 6px; }
.lt-ask textarea.em-text { width: 100%; min-height: 58px; resize: none; font: 12.5px/1.45 var(--sans); padding: 7px 9px; border-radius: 10px; }
.lt-ask-row { display: flex; align-items: center; gap: 6px; }
.lt-ask-row .btn { margin-left: auto; padding: 5px 12px; font-size: 11.5px; }
.lt-ask-part { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 10.5px var(--mono); color: var(--muted); padding: 2px 7px; border-radius: 999px; background: rgba(26, 26, 26, .06); }
.ll-more .lt-card.lt-ask { width: auto; }

/* ---- the other Developer tools, on the Element builder's layout ----
   Site styles is a page of its own, but
   it is laid out as the builders are, so everything sits where it does
   there: a list down the left in the Claude column's paper (where the
   builders' elements are), the canvas — white, edge to edge, no card around
   it — and the tools in two arms: a strip of cards under the canvas, and a
   side panel down its right that carries on with the cards that did not fit
   across. They meet on hairlines; the side panel's width and the strip's
   height drag on their seams, and fold away together — the same sizes and
   the same fold as the builders' (app.js labGripWire, labDockFold, dtDeal).

   <div class="dt-cockpit">
     <aside class="dt-list">…</aside>
     <section class="dt-stage">
       <div class="dt-canvas">…</div>
       <div class="lt-dock"><div class="lt-head">…<button class="lt-fold"></div><div class="lt-body"></div></div>
       <div class="ll-panel"><div class="ll-scroll">…<div class="ll-more"></div></div></div>
       <div class="lab-grip is-side"></div><div class="lab-grip is-strip"></div>
     </section>
   </div> */
.dt-cockpit {
  --ll-w: var(--ll-size, 300px); --lt-h: var(--lt-size, 232px);
  flex: 1; min-height: 0; display: grid; grid-template-columns: var(--dt-list-w, 320px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
}
body.lt-folded .dt-cockpit { --ll-w: 0px; --lt-h: 40px; }
.dt-list {
  --clay: #D97757; --cl-ink: #141413; --cl-muted: #7C7A72; --cl-paper: #FAF9F5; --cl-line: rgba(20, 20, 19, .11); --cl-line-soft: rgba(20, 20, 19, .07);
  --cl-rest: 0 1px 2px rgba(20, 20, 19, .05), 0 2px 8px rgba(20, 20, 19, .045);
  --cl-lift: 0 6px 18px rgba(20, 20, 19, .1), 0 2px 26px rgba(217, 119, 87, .1);
  display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden;
  background: var(--cl-paper); border-right: 1px solid var(--cl-line); color: var(--cl-ink);
}
.dt-list-head { flex: none; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 10px 12px 8px 14px; }
.dt-list-title { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 7px; font: 700 12.5px var(--sans); color: var(--cl-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-list-title svg { flex: none; width: 14px; height: 14px; color: var(--clay); }
.dt-list-head .btn { flex: none; padding: 5px 12px 5px 9px; font-size: 12px; box-shadow: none; }
.dt-list-head .btn svg { width: 13px; height: 13px; }
.dt-list-rows { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.dt-list-kicker { font: 700 10px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--cl-muted); padding: 6px 2px 0; }
.dt-list-foot { flex: none; margin: 0; padding: 10px 14px 14px; font-size: 11.5px; line-height: 1.45; color: var(--cl-muted); border-top: 1px solid var(--cl-line); }
/* a row in the list: one white card, as the builders' elements are; the one
   on the canvas wears the clay edge of the element being worked on */
.dt-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px;
  border-radius: 14px; border: 1px solid var(--cl-line-soft); background: #FFFFFF; box-shadow: var(--cl-rest);
  font: inherit; color: var(--cl-ink); cursor: pointer; text-decoration: none;
  animation: menu-row-in .46s var(--ease-spring) both; animation-delay: calc(var(--i, 0) * 26ms);
  transition: transform .32s var(--ease-spring), box-shadow .32s var(--ease-out), border-color .16s var(--ease-out);
}
.dt-row:hover { transform: translateY(-2px); box-shadow: var(--cl-lift); border-color: var(--cl-line); }
.dt-row:active { transform: scale(.985); transition-duration: .06s; box-shadow: none; }
.dt-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dt-row.on, .dt-row.on:hover { border-color: rgba(217, 119, 87, .55); box-shadow: 0 0 0 3px rgba(217, 119, 87, .12), var(--cl-rest); }
.dt-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #FFFFFF; }
.dt-canvas { position: absolute; top: 0; left: 0; right: var(--ll-w); bottom: var(--lt-h); min-width: 0; }
.dt-stage > :is(.lt-dock, .ll-panel) {
  position: absolute; z-index: 6; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: #FFFFFF; border: 0; border-radius: 0; box-shadow: none;
}
.dt-stage > .lt-dock { left: 0; right: var(--ll-w); bottom: 0; height: var(--lt-h); border-top: 1px solid var(--line-soft); }
.dt-stage > .ll-panel { right: 0; top: 0; bottom: 0; width: var(--ll-w); border-left: 1px solid var(--line-soft); }
body.lt-folded .dt-stage > .lt-dock { right: 0; }
body.lt-folded .dt-stage > .ll-panel, body.lt-folded .dt-stage > .lt-dock > .lt-body { display: none; }
.dt-stage > .lab-grip { display: block; position: absolute; z-index: 7; }
.dt-stage > .lab-grip.is-side { top: 0; bottom: 0; right: calc(var(--ll-w) - 4px); width: 9px; cursor: col-resize; }
.dt-stage > .lab-grip.is-strip { left: 0; right: var(--ll-w); bottom: calc(var(--lt-h) - 4px); height: 9px; cursor: row-resize; }
body.lt-folded .dt-stage > .lab-grip { display: none; }
.dt-stage .ll-panel > .ll-scroll > .lt-head:first-child { border-top: 0; }
.dt-stage .lt-head.ll-sub { border-bottom: 0; border-top: 1px solid var(--line-soft); }
/* a card's controls in either arm */
.dt-stage .lt-card-b { display: flex; flex-direction: column; gap: 8px; }
.dt-stage .ll-more .lt-card { flex: none; }
.dt-hint { margin: 0; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
@media (max-width: 1100px) { .dt-cockpit { --dt-list-w: 260px; } }
/* phones and small tablets: one column — the list, the canvas, then the tools in full */
@media (max-width: 768px), (pointer: coarse) and (max-width: 1024px) {
  .dt-cockpit { display: flex; flex-direction: column; flex: none; }
  .dt-list { max-height: 34vh; border-right: 0; border-bottom: 1px solid var(--cl-line); }
  .dt-stage { overflow: visible; }
  .dt-canvas { position: relative; inset: auto; height: 62vh; }
  .dt-stage > :is(.lt-dock, .ll-panel) { position: static; width: auto; height: auto; border-left: 0; }
  .dt-stage > .lt-dock > .lt-body { flex-wrap: wrap; overflow: visible; }
  .dt-stage > .lt-dock .lt-card { flex: 1 1 260px; }
  body.lt-folded .dt-stage > .ll-panel, body.lt-folded .dt-stage > .lt-dock > .lt-body { display: flex; }
  .dt-stage > .lab-grip, .dt-stage .lt-fold { display: none; }
}
@media (prefers-reduced-motion: reduce) { .dt-row { animation: none; } }

/* ---- the tools' reels: the Section builder (6s) ----
   A page of three sections; a part of the middle one is picked (a maroon
   ring), carried across to a new spot by the cursor, and a question about it
   pops up. Base styles are the still that reduced motion shows. */
.reel-sb .sb-page { left: 16%; top: 9%; width: 54%; height: 84%; border-radius: 8px; background: #FFFFFF; box-shadow: 0 14px 36px rgba(0, 0, 0, .5); overflow: hidden; }
.reel-sb .sb-band { left: 6%; right: 6%; border-radius: 5px; }
.reel-sb .sb-band.s1 { top: 6%; height: 24%; background: linear-gradient(135deg, rgba(123, 30, 46, .14), rgba(245, 197, 24, .22)); animation: sb-band 6s var(--ease-out) infinite; }
.reel-sb .sb-band.s2 { top: 35%; height: 36%; background: #F4F2F1; animation: sb-band 6s var(--ease-out) infinite; animation-delay: .12s; }
.reel-sb .sb-band.s3 { top: 76%; height: 18%; background: #1D1012; animation: sb-band 6s var(--ease-out) infinite; animation-delay: .24s; }
.reel-sb .sb-card { top: 14%; width: 27%; height: 72%; border-radius: 4px; background: #FFFFFF; border: 1px solid rgba(0, 0, 0, .08); }
.reel-sb .sb-card::before { content: ''; position: absolute; left: 12%; right: 12%; top: 12%; height: 34%; border-radius: 3px; background: rgba(123, 30, 46, .16); }
.reel-sb .sb-card::after { content: ''; position: absolute; left: 12%; width: 60%; top: 58%; height: 6px; border-radius: 3px; background: rgba(20, 20, 20, .6); }
.reel-sb .sb-card.c1 { left: 4%; }
.reel-sb .sb-card.c2 { left: 36.5%; animation: sb-card 6s cubic-bezier(.65, 0, .35, 1) infinite; }
.reel-sb .sb-card.c3 { left: 69%; animation: sb-card3 6s cubic-bezier(.65, 0, .35, 1) infinite; }
.reel-sb .sb-pick { left: 34.4%; top: 40.2%; width: 9.6%; height: 26.2%; border-radius: 5px; border: 2px solid #F5C518; box-shadow: 0 0 0 3px rgba(123, 30, 46, .55), 0 0 18px rgba(245, 197, 24, .45); opacity: 0; animation: sb-pick 6s cubic-bezier(.65, 0, .35, 1) infinite; }
.reel-sb .sb-ask { left: 62%; top: 22%; padding: 6px 10px; border-radius: 10px 10px 10px 3px; background: #FFFFFF; color: #141414; font: 700 10px var(--sans); white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(6px) scale(.9); animation: sb-ask 6s var(--ease-out) infinite; }
.reel-sb .sb-cur { left: 40%; top: 56%; width: 14px; height: 18px; animation: sb-cur 6s cubic-bezier(.65, 0, .35, 1) infinite; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.reel-sb .sb-cur svg { width: 100%; height: 100%; fill: #FFFFFF; stroke: #141414; stroke-width: 1.2; }
@keyframes sb-band { 0%, 4% { opacity: 0; transform: translateY(8px); } 12%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes sb-pick { 0%, 22% { opacity: 0; transform: none; } 26%, 36% { opacity: 1; transform: none; } 52%, 70% { opacity: 1; transform: translateX(174%); } 78%, 100% { opacity: 0; transform: translateX(174%); } }
@keyframes sb-card { 0%, 36% { transform: none; } 52%, 92% { transform: translateX(120%); } 100% { transform: none; } }
@keyframes sb-card3 { 0%, 36% { transform: none; } 52%, 92% { transform: translateX(-120%); } 100% { transform: none; } }
@keyframes sb-ask { 0%, 58% { opacity: 0; transform: translateY(6px) scale(.9); } 64%, 86% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; transform: translateY(-4px); } }
@keyframes sb-cur { 0% { transform: translate(60px, 40px); } 20%, 36% { transform: none; } 52%, 70% { transform: translateX(62px); } 80% { transform: translate(70px, -26px); } 100% { transform: translate(60px, 40px); } }

/* ---- the tools' reels: the Animation builder (5s) ----
   A dot rides a drawn motion path with a stretch at each end while the
   playhead sweeps a timeline of keyframes below. */
.reel-ab .ab-path { position: absolute; left: 8%; top: 10%; width: 84%; height: 46%; overflow: visible; }
.reel-ab .ab-path path { fill: none; stroke: rgba(245, 197, 24, .75); stroke-width: 1.6; stroke-dasharray: 4 5; }
.reel-ab .ab-ball { fill: #8E2A3C; stroke: #F5C518; stroke-width: 2; filter: drop-shadow(0 0 5px rgba(245, 197, 24, .6));
  offset-path: path('M14 70 C 60 -10, 120 120, 186 24'); offset-rotate: 0deg; transform-box: fill-box; transform-origin: center;
  animation: ab-dot 5s cubic-bezier(.65, 0, .35, 1) infinite; }
.reel-ab .ab-tl { left: 8%; right: 8%; bottom: 9%; height: 32%; border-radius: 7px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); }
.reel-ab .ab-row { left: 6%; right: 4%; height: 2px; background: rgba(255, 255, 255, .14); }
.reel-ab .ab-row.r1 { top: 28%; } .reel-ab .ab-row.r2 { top: 52%; } .reel-ab .ab-row.r3 { top: 76%; }
.reel-ab .ab-row s { top: -4px; width: 9px; height: 9px; margin-left: -4.5px; transform: rotate(45deg); background: #F5C518; border-radius: 1.5px; box-shadow: 0 0 8px rgba(245, 197, 24, .5); }
.reel-ab .ab-row.r1 s:nth-child(1) { left: 0; } .reel-ab .ab-row.r1 s:nth-child(2) { left: 46%; } .reel-ab .ab-row.r1 s:nth-child(3) { left: 100%; }
.reel-ab .ab-row.r2 s:nth-child(1) { left: 18%; } .reel-ab .ab-row.r2 s:nth-child(2) { left: 72%; }
.reel-ab .ab-row.r3 s:nth-child(1) { left: 0; } .reel-ab .ab-row.r3 s:nth-child(2) { left: 30%; } .reel-ab .ab-row.r3 s:nth-child(3) { left: 62%; } .reel-ab .ab-row.r3 s:nth-child(4) { left: 92%; }
.reel-ab .ab-row.r3 s { background: #C9405A; box-shadow: 0 0 8px rgba(201, 64, 90, .6); }
.reel-ab .ab-head { left: 6%; top: -6px; bottom: -6px; width: 2px; background: #FFFFFF; box-shadow: 0 0 8px rgba(255, 255, 255, .7); animation: ab-head 5s linear infinite; }
.reel-ab .ab-head::before { content: ''; position: absolute; left: -4px; top: -2px; width: 10px; height: 8px; border-radius: 2px 2px 5px 5px; background: #FFFFFF; }
@keyframes ab-dot {
  0% { offset-distance: 0%; transform: scale(1); } 8% { offset-distance: 0%; transform: scale(1.35, .7); }
  50% { offset-distance: 100%; transform: scale(.8, 1.2); } 58% { offset-distance: 100%; transform: scale(1.35, .7); }
  100% { offset-distance: 0%; transform: scale(1); }
}
@keyframes ab-head { from { left: 6%; } to { left: 92%; } }

/* ---- the Animation builder's dashboard (app.js abd*) ----
   Every animation as a card over the canvas, in the Sites page's own cloth:
   the near-black sheet with its 24px grid, Michroma for the heading, square
   corners, white words, gold for what you point at. Each card plays its
   animation, carries its checks as the status pill, and says how it was made
   in its bottom-right corner — a Blender tag with Blender's logo, Higgsfield,
   or Claude. Over the tools under and beside the canvas; under the studio. */
.abd, .abd-back { display: none; }
body.dev-lab.lab-animations .abd:not([hidden]) { display: block; }
body.dev-lab.lab-animations .abd-back:not([hidden]) { display: inline-flex; }
.abd {
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wide: "Michroma", "Manrope", system-ui, sans-serif;
  --abd-grid:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 24px 24px;
  --abd-sheet: var(--abd-grid), linear-gradient(165deg, #161616 0%, #0B0B0B 55%, #0E0607 100%);
  position: absolute; inset: 0; z-index: 20; overflow: auto; overscroll-behavior: contain;
  background: radial-gradient(70% 55% at 100% 0%, rgba(160, 160, 160, .1), transparent 70%),
    radial-gradient(60% 50% at 0% 100%, rgba(123, 30, 46, .3), transparent 70%), #050505;
  color: #F4F4F4; font-family: var(--sans);
  animation: abd-in .34s var(--ease-out);
}
@keyframes abd-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.abd-in { max-width: 1440px; margin: 0 auto; padding: 30px 28px 40px; }
.abd-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.abd-title {
  margin: 0 auto 0 0; display: inline-flex; align-items: center; gap: 12px;
  font: 400 19px/1.3 var(--wide); letter-spacing: .02em; text-transform: uppercase; font-synthesis: none; color: #FFFFFF;
}
.abd-count {
  font: 700 11px/17px var(--sans); letter-spacing: 0; padding: 0 7px; min-width: 21px; text-align: center;
  color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
}
.abd-count:empty { display: none; }
/* how it was made: a smoked track, the picked one a white thumb with black words */
.abd-made-seg {
  display: inline-flex; gap: 2px; padding: 2px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .5);
}
.abd-made-seg button {
  height: 26px; padding: 0 12px; border: 0; background: transparent; cursor: pointer;
  font: 700 11.5px var(--sans); color: rgba(255, 255, 255, .78);
  transition: background .2s var(--ease-out), color .2s var(--ease-out), transform .32s var(--ease-spring);
}
.abd-made-seg button:hover { color: #FFFFFF; background: rgba(255, 255, 255, .1); }
.abd-made-seg button:active { transform: scale(.94); transition-duration: .06s; }
.abd-made-seg button.on { background: #FFFFFF; color: #000; }
.abd-search {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; width: 220px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .2);
}
.abd-search:focus-within { border-color: var(--gold); }
.abd-search svg { width: 14px; height: 14px; flex: none; color: rgba(255, 255, 255, .6); }
.abd-search input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  font: 500 13px var(--sans); color: #FFFFFF; outline: none;
}
.abd-search input::placeholder { color: rgba(255, 255, 255, .5); }
.abd-new {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px 0 11px; cursor: pointer;
  font: 700 12.5px var(--sans); color: #000; background: #FFFFFF; border: 1px solid #FFFFFF;
  transition: background .2s var(--ease-out), border-color .2s var(--ease-out), box-shadow .32s var(--ease-out), transform .32s var(--ease-spring);
}
.abd-new svg { width: 14px; height: 14px; }
.abd-new:hover { background: var(--gold); border-color: var(--gold); transform: translateY(-1px); box-shadow: 0 14px 30px -16px rgba(178, 58, 78, .85); }
.abd-new:active { transform: translateY(1px) scale(.97); transition-duration: .06s; }
/* as many as the canvas holds, the way the sites deal across their page */
.abd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; margin-top: 22px; }
@media (max-width: 760px) { .abd-in { padding: 20px 16px 30px; } }
.abd-none { margin: 28px 0 0; max-width: 52ch; color: rgba(255, 255, 255, .72); font-size: 14px; }
/* the cards: the site cards, in the sheet's cloth */
.abd .pcard {
  border-radius: 0; background: var(--abd-sheet); border-color: rgba(255, 255, 255, .14); color: #F4F4F4;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, .06), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.abd .pcard:hover {
  background: var(--abd-grid), linear-gradient(165deg, #1D1D1D 0%, #111 55%, #170A0C 100%);
  border-color: rgba(245, 197, 24, .6); box-shadow: 0 16px 34px -16px rgba(123, 30, 46, .8);
}
.abd .pcard:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.abd .pthumb { aspect-ratio: 8 / 5; background: #FFFFFF; border-bottom-color: rgba(255, 255, 255, .1); }
.abd .pthumb::after { display: none; }   /* the animation plays to the card's edge */
.abd .pcard h3 { color: #FFFFFF; font: 700 16px var(--sans); letter-spacing: -.005em; }
.abd .pcard .meta { color: rgba(255, 255, 255, .64); }
.abd .pcard .pill {
  border-radius: 0; background: rgba(0, 0, 0, .78); color: rgba(255, 255, 255, .72); border-color: rgba(255, 255, 255, .2);
  font-family: var(--sans);
}
.abd .pcard .pill.ready { color: #3FCF95; border-color: rgba(63, 207, 149, .45); }
.abd .pcard .pill.error { color: #FF8F86; border-color: rgba(255, 120, 110, .45); }
.abd .pcard .pill.busy { color: #F0A3B0; border-color: rgba(178, 58, 78, .6); }
.abd .pcard-actions { align-items: center; flex-wrap: wrap; row-gap: 8px; }
.abd .pcard-actions .btn { white-space: nowrap; }
.abd .pcard-actions .btn {
  border-radius: 0; color: rgba(255, 255, 255, .78); background: transparent; border: 1px solid rgba(255, 255, 255, .2); box-shadow: none;
  font-family: var(--sans);
}
.abd .pcard-actions .btn:hover { color: #000; background: var(--gold); border-color: var(--gold); }
/* how it was made, bottom right: Blender's logo on its tag (Higgsfield's too); Claude's spark */
.abd-tags { margin-left: auto; display: inline-flex; gap: 5px; align-items: center; }
.abd-made {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px 0 5px;
  font: 700 10.5px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .86);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .18);
}
.abd-made svg, .abd-made img { width: 16px; height: 16px; flex: none; }
.abd-made.is-blender { color: #FFFFFF; background: rgba(232, 125, 13, .14); border-color: rgba(232, 125, 13, .6); }
.abd-made.is-higgsfield { padding: 0 8px; }
.abd-made.is-higgsfield img { width: auto; height: 11px; }
.abd-made.is-claude svg { color: #E0855F; }
/* one animation open: back to them all, beside the 3D toggle over the canvas */
.abd-back {
  align-items: center; gap: 6px; height: 29px; padding: 0 12px 0 10px; cursor: pointer;
  font: 700 12px var(--sans); letter-spacing: .02em; color: var(--ink);
  background: var(--glass-2); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow-rest), inset 0 1px 0 rgba(255, 255, 255, .8);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: transform .32s var(--ease-spring), box-shadow .32s var(--ease-out), background .32s var(--ease-out);
}
.abd-back svg { width: 14px; height: 14px; }
.abd-back:hover { background: #FFFFFF; transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.abd-back:active { transform: translateY(1px) scale(.96); transition-duration: .06s; }
body.as-on .abd-back { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  .reel-ab .ab-ball { offset-distance: 30%; }
  .lt-modes button { transition: none; }
  .abd { animation: none; }
  .abd-made-seg button, .abd-new, .abd-back, .abd .pcard { transition: none; }
  .abd-new:hover, .abd-back:hover, .abd .pcard:hover { transform: none; }
}

/* ---- the Animation builder: Blender's tools under the canvas (blendertools.js) ----
   The strip's head switches between the animation's own tools and Blender's.
   Blender's are cards in the order a model is made, each tool a chip that
   lays a step in the Build card, which stays pinned at the strip's left. */
body.dev-lab.lab-sections #lab-bl-modes { display: none; }
body.dev-lab.lab-animations #lab-bl-modes {
  display: inline-flex; flex: none; gap: 2px; padding: 2px; margin-left: 6px;
  border-radius: 999px; background: rgba(26, 26, 26, .06); box-shadow: inset 0 2px 6px rgba(26, 26, 26, .08);
}
.lt-body.bl-body { gap: 8px; padding-left: 0; }
.lt-body.bl-body > .lt-card { width: 196px; }
.lt-body.bl-body > .bl-wide { width: 268px; }
.lt-body.bl-body > .lt-card.bl-build {
  position: sticky; left: 0; z-index: 2; width: 300px;
  border-radius: 0 12px 12px 0; border-left: 0; background: #FFFFFF;
  box-shadow: 8px 0 16px -10px rgba(26, 26, 26, .25);
}
.bl-build .lt-card-b { display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.bl-into { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 11.5px; color: var(--muted); }
.bl-into b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 700; }
.bl-into input, .bl-build .bl-on { width: 100%; padding: 5px 8px; border-radius: 8px; font-size: 12px; }
.bl-steps { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; overscroll-behavior: contain; }
.bl-empty { padding: 6px 2px; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.bl-step { display: flex; align-items: center; gap: 3px; padding: 2px 2px 2px 4px; border-radius: 7px; background: rgba(26, 26, 26, .04); transition: background .5s var(--ease-out); }
.bl-step.bl-new { background: rgba(245, 197, 24, .35); transition-duration: .06s; }
.bl-n { flex: none; min-width: 16px; font: 600 10px var(--mono); color: var(--accent-deep); text-align: center; }
.bl-step-t { flex: 1; min-width: 0; padding: 3px 4px; border: 1px solid transparent; border-radius: 5px; background: none; font: 11.5px var(--sans); color: var(--ink); text-overflow: ellipsis; }
.bl-step-t:hover { border-color: var(--line-soft); }
.bl-step-t:focus { outline: none; border-color: rgba(123, 30, 46, .4); background: #FFFFFF; }
.bl-ib { flex: none; width: 20px; height: 20px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 5px; background: none; color: var(--muted); cursor: pointer; opacity: .55; }
.bl-ib svg { width: 11px; height: 11px; }
.bl-step:hover .bl-ib, .bl-ib:focus-visible { opacity: 1; }
.bl-ib:hover { background: rgba(26, 26, 26, .07); color: var(--ink); }
.bl-ib:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.bl-row { flex: none; display: flex; align-items: center; gap: 5px; }
.bl-row #bl-go { margin-left: auto; }
.bl-build .btn.sm, .bl-card .bl-add { padding: 4px 10px; font-size: 11.5px; }
.bl-watch { display: inline-grid; place-items: center; width: 28px; padding: 4px 0 !important; }
.bl-watch svg { width: 14px; height: 14px; }
.bl-card .bl-add { margin: 2px 0 6px; }
.bl-sub { margin: 6px 0 4px; font: 700 9.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); opacity: .75; }
.bl-sub:first-child { margin-top: 0; }
.bl-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.bl-t {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border: 1px solid var(--line-soft); border-radius: 7px;
  background: rgba(255, 255, 255, .9); color: var(--ink); font: 600 11px var(--sans); cursor: pointer; white-space: nowrap;
  transition: transform .32s var(--ease-spring), background .16s var(--ease-out), border-color .16s var(--ease-out), color .16s var(--ease-out);
}
.bl-t kbd { font: 500 9.5px var(--mono); color: var(--muted); opacity: .7; }
.bl-t:hover { background: var(--accent-soft); border-color: rgba(123, 30, 46, .3); color: var(--accent-deep); }
.bl-t:active { transform: scale(.94); transition-duration: .06s; }
.bl-t:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.bl-num { width: 100%; padding: 4px 7px; border-radius: 7px; font-size: 12px; }
.bl-check { display: flex; align-items: center; gap: 6px; margin: 4px 0; font-size: 11.5px; color: var(--ink); }

/* ---- the model as it is built, over the canvas ----
   A dark viewport where the canvas is, in the manner of Blender's own: the
   newest stage turning in a model viewer, a Live mark while stages arrive,
   and every stage so far along the bottom. In the studio it floats. */
.bl-live {
  position: absolute; z-index: 5; top: 12px; left: 12px; right: calc(var(--ll-w, 0px) + 12px); bottom: calc(var(--lt-h, 0px) + 12px);
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 40%, #3A3A3E 0%, #232326 70%); color: #F2F2F2;
  border: 1px solid rgba(0, 0, 0, .4); border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
  animation: bl-live-in .3s var(--ease-out) both;
}
.bl-live[hidden] { display: none; }
@keyframes bl-live-in { from { opacity: 0; transform: translateY(8px) scale(.99); } }
body.as-on .bl-live { z-index: 40; top: 70px; left: auto; right: 24px; bottom: auto; width: 460px; height: 340px; }
.bl-live-head { flex: none; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 8px 0 10px; border-bottom: 1px solid rgba(255, 255, 255, .08); background: rgba(0, 0, 0, .18); }
.bl-live-head .spacer { flex: 1; }
.bl-live-ic { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: var(--cta-grad); color: #FFFFFF; }
.bl-live-ic svg { width: 14px; height: 14px; }
.bl-live.is-unreal .bl-live-ic { background: #0E0E0E; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.bl-live-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.bl-live-t b { font: 700 12.5px var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-live-t span { font-size: 11px; color: rgba(255, 255, 255, .62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-live-dot { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: rgba(245, 197, 24, .16); color: #F5C518; font: 700 9.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.bl-live-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #F5C518; animation: bl-pulse 1.2s ease-in-out infinite; }
.bl-live-dot[hidden] { display: none; }
@keyframes bl-pulse { 50% { opacity: .25; transform: scale(.7); } }
.bl-live-views { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.bl-live-views button { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px 0 7px; border: 0; border-radius: 999px; background: none; color: rgba(255, 255, 255, .7); font: 600 11px var(--sans); cursor: pointer; }
.bl-live-views button svg { width: 13px; height: 13px; }
.bl-live-views button.on { background: rgba(255, 255, 255, .16); color: #FFFFFF; }
.bl-live-views button:disabled { opacity: .35; cursor: default; }
.bl-live .bl-ib { width: 28px; height: 28px; color: rgba(255, 255, 255, .7); opacity: 1; }
.bl-live .bl-ib svg { width: 14px; height: 14px; }
.bl-live .bl-ib:hover { background: rgba(255, 255, 255, .1); color: #FFFFFF; }
.bl-live button:focus-visible { outline: 2px solid #F5C518; outline-offset: 1px; }
.bl-live-view {
  position: relative; flex: 1; min-height: 0; display: grid; place-items: center;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 32px 32px; background-position: center;
}
.bl-live-view model-viewer { width: 100%; height: 100%; background: transparent; --poster-color: transparent; --progress-bar-color: #F5C518; }
.bl-live-view img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bl-live-wait { max-width: 380px; padding: 20px; text-align: center; font-size: 12.5px; line-height: 1.55; color: rgba(255, 255, 255, .72); }
.bl-live-spin { width: 34px; height: 34px; margin: 0 auto 12px; border: 2px solid rgba(255, 255, 255, .14); border-top-color: #F5C518; border-radius: 50%; animation: bl-spin 1s linear infinite; }
@keyframes bl-spin { to { transform: rotate(360deg); } }
.bl-live-rail { flex: none; display: flex; gap: 4px; padding: 7px 8px; overflow-x: auto; border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(0, 0, 0, .18); }
.bl-live-rail:empty { display: none; }
.bl-stage { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 4px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; background: rgba(255, 255, 255, .05); color: rgba(255, 255, 255, .78); font: 600 11px var(--sans); text-transform: capitalize; cursor: pointer; }
.bl-stage span { min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .12); font: 600 10px var(--mono); }
.bl-stage:hover { background: rgba(255, 255, 255, .1); color: #FFFFFF; }
.bl-stage.on { border-color: rgba(245, 197, 24, .6); background: rgba(245, 197, 24, .14); color: #FFFFFF; }
.bl-stage.on span { background: #F5C518; color: #141414; }
.bl-stage.bl-follow { padding: 0 10px; text-transform: none; color: #F5C518; }
@media (prefers-reduced-motion: reduce) { .bl-live, .bl-live-dot::before, .bl-live-spin { animation: none; } }
