/* ==========================================================================
   THE UPLOAD STUDIO (studio.js)
   The site's own dialog plate - bone paper, steel double ring, uppercase labels, copper focus - holding the part
   on the left and three short steps of questions on the right. On a phone the studio is the whole screen: the
   part on top, the questions under it.

   The viewer's controls are the workshop's instruments: dark steel for what you press (a rule-marked dock whose
   copper jaw names the tool in use, one strip of that tool's options, a history capsule, the menus), bone paper
   for what you read (the size tag with its steel eyelet, the dimensions drawn on the part, the reading of a drag,
   a measurement). One thing is solid copper at a time: the jaw.
   ========================================================================== */
.studio { border: 0; padding: 0; margin: auto; background: transparent; max-width: none; max-height: none; overflow: visible; }
.studio::backdrop { background: rgba(8,6,4,.74); backdrop-filter: blur(2px); }
.st-plate {
  position: relative; display: flex; flex-direction: column;
  width: min(1320px, calc(100vw - 32px)); height: min(880px, calc(100vh - 32px));
  border-radius: 10px; overflow: hidden;
  background: var(--grain), linear-gradient(90deg, #d8ccbd 0%, #e2d7c9 15%, #e6dccf 50%, #e1d5c8 85%, #ddd1c2 100%);
  background-blend-mode: multiply, normal;
  box-shadow: 0 0 0 4px #8a8377, 0 0 0 5px #3d3934, 0 30px 60px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.7);
  color: #2b2723; font-family: var(--sans);
}
.studio *, .studio *::before, .studio *::after { box-sizing: border-box; }
/* anything the script hides stays hidden, whatever display its own rule gives it */
.studio [hidden] { display: none !important; }

/* ---- the head ---- */
.st-head { display: flex; align-items: flex-start; gap: 24px; padding: 18px 64px 14px 24px; }
.st-eyebrow { position: static; display: block; margin: 0 0 8px; }
.st-title { margin: 0 0 4px; font: 600 26px/1.1 var(--serif); color: #0a0a0a; }
.st-sub { margin: 0; font: 400 14px/20px var(--sans); color: #3a342c; }
.st-close {
  position: absolute; right: 16px; top: 14px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid #6d6153;
  background: transparent; color: #3e3930; font: 400 22px/1 var(--sans); cursor: pointer;
}
.st-close:hover { border-color: var(--copper); color: var(--copper); }

/* ---- the body: the part, and the questions ---- */
.st-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 392px; gap: 0; padding: 0 16px 16px; }

/* ==========================================================================
   THE PART
   ========================================================================== */
#st-studio {
  --sv-ink: #141210; --sv-glass: rgba(20,18,16,.86); --sv-glass-hi: rgba(20,18,16,.93); --sv-ring: rgba(184,149,110,.22);
  --sv-on: #efe4d2; --sv-on-hi: #fbf4e8; --sv-on-dim: rgba(239,228,210,.62);
  --sv-copper: #7a4c22; --sv-copper-lit: #d9a56a; --sv-focus: #b87333; --sv-bronze: #b8956e; --sv-bronze-dk: #8b7355;
  --sv-paper: #f6f1e8; --sv-paper-ink: #2b2723; --sv-muted: #6d6153; --sv-bed: #d8d4cc;
  --sv-rust: #9a2f1e; --sv-rust-bg: rgba(122,34,24,.92); --sv-rust-lit: #e07a62;
  --sv-ax-x: #d0805f; --sv-ax-y: #93ad80; --sv-ax-z: #86a6c4;          /* printer X, Y (depth), Z (up), on steel */
  --sv-axp-x: #9a4a31; --sv-axp-y: #52703f; --sv-axp-z: #34506b;       /* the same, on paper */
  --sv-ease: cubic-bezier(.2,.8,.2,1);
  --sv-spring: cubic-bezier(.2,.9,.25,1.04);
}
@supports (transition-timing-function: linear(0, 1)) {
  #st-studio { --sv-spring: linear(0, .06 3%, .23 8%, .52 16%, .78 25%, .94 34%, 1.02 43%, 1.035 50%, 1.02 62%, 1.005 76%, 1); }
}
@supports (background: color-mix(in oklab, red 50%, transparent)) {
  #st-studio { --sv-glass: color-mix(in oklab, #141210 86%, transparent); }
}
.st-view {
  position: relative; min-height: 0; border-radius: 8px; overflow: hidden; background: #d8d4cc; touch-action: pan-y;
  box-shadow: inset 0 0 0 1px rgba(60,50,40,.22), inset 0 2px 10px rgba(0,0,0,.08);
}
.st-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.st-view:not(.has-part) .st-canvas { visibility: hidden; }
#st-studio .st-canvas:focus-visible { outline: 2px solid var(--sv-focus); outline-offset: -2px; }

/* the overlay: nothing in it takes the pointer except what is meant to be pressed */
#st-studio .sv-ui { position: absolute; inset: 0; z-index: 3; pointer-events: none; font-family: var(--sans); }
/* the reset carries only the id's weight, so every control's own rule below outranks it */
#st-studio :where(.sv-ui button, .sv-pop button, .sv-sheet button) {
  appearance: none; -webkit-appearance: none; margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
#st-studio :where(.sv-ui button[aria-disabled="true"], .sv-pop button[aria-disabled="true"], .sv-sheet button[aria-disabled="true"]) { cursor: default; }
#st-studio .sv-ic { display: block; flex: 0 0 auto; width: 20px; height: 20px; }
#st-studio .sv-ui :focus-visible:not(input), #st-studio .sv-pop :focus-visible:not(input), #st-studio .sv-sheet :focus-visible:not(input, canvas) { outline: 2px solid var(--sv-focus); outline-offset: 2px; }
#st-studio .sv-ui :focus:not(:focus-visible), #st-studio .sv-pop :focus:not(:focus-visible), #st-studio .sv-sheet :focus:not(:focus-visible) { outline: none; }

/* the steel: glass over the bed */
#st-studio .sv-dock, #st-studio .sv-ctx, #st-studio .sv-hist, #st-studio .sv-parts, #st-studio .sv-fit, #st-studio .sv-status, #st-studio .sv-pop, #st-studio .sh-dock, #st-studio .sh-busy {
  background: var(--sv-glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: inset 0 0 0 1px var(--sv-ring), inset 0 1px 0 rgba(255,236,210,.06), 0 10px 24px -14px rgba(0,0,0,.55);
  color: var(--sv-on);
}
#st-studio .sv-pop { background: var(--sv-glass-hi); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #st-studio .sv-dock, #st-studio .sv-ctx, #st-studio .sv-hist, #st-studio .sv-parts, #st-studio .sv-fit, #st-studio .sv-status, #st-studio .sv-pop, #st-studio .sh-dock, #st-studio .sh-busy { background: rgba(20,18,16,.94); }
}
/* the paper */
#st-studio .sv-dim, #st-studio .sv-livetag-b, #st-studio .sv-mpill {
  background: var(--sv-paper); color: var(--sv-paper-ink); border-radius: 3px;
  box-shadow: 0 1px 2px rgba(20,18,16,.22), 0 0 0 1px rgba(43,39,35,.08), inset 0 1px 0 rgba(255,255,255,.6);
  font: 600 11.5px/22px var(--label); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: 0;
}

/* open and closed: every animated part fades itself, and is out of reach while closed */
#st-studio :where(.sv-ui [data-state]) { transition: opacity .16s var(--sv-ease), visibility 0s linear 0s; }   /* each control's own transition wins */
#st-studio .sv-ui [data-state="closed"] { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .12s var(--sv-ease), visibility 0s linear .12s; }

/* ---- the dock: a steel rule, and the copper jaw that slides to the tool in use ---- */
#st-studio .sv-dock {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 3; pointer-events: auto;
  height: 48px; padding: 4px; display: flex; align-items: center; gap: 2px; border-radius: 12px;
  transition: width .26s var(--sv-spring), opacity .2s var(--sv-ease), visibility 0s linear 0s;
}
#st-studio .sv-dock[data-state="closed"] { transition: width .26s var(--sv-spring), opacity .12s var(--sv-ease), visibility 0s linear .12s; }
#st-studio .sv-dock::before, #st-studio .sh-dock::before {   /* the engraved scale: a major tick every 30px, a minor one every 6px */
  content: ""; position: absolute; top: 0; left: 12px; right: 12px; height: 6px; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(217,165,106,.34) 0 1px, transparent 1px 30px) 0 0 / 100% 6px no-repeat,
    repeating-linear-gradient(90deg, rgba(217,165,106,.22) 0 1px, transparent 1px 6px) 0 0 / 100% 3px no-repeat;
}
#st-studio .sv-dock::after {                   /* a hairline of progress while faces or edges are prepared */
  content: ""; position: absolute; top: 0; left: 12px; height: 1px; pointer-events: none; background: #d9a56a;
  width: calc((100% - 24px) * var(--sv-prog, 0)); opacity: var(--sv-prog-on, 0); transition: width .3s var(--sv-ease), opacity .2s;
}
#st-studio .sv-radios { position: relative; z-index: 1; display: flex; align-items: center; gap: 2px; }
#st-studio .sv-tool {
  position: relative; z-index: 1; flex: 0 0 auto; height: 40px; width: 40px; min-width: 40px; padding: 0 0 0 10px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; color: var(--sv-on-dim);
  transition: width .26s var(--sv-spring), color .15s var(--sv-ease), background-color .15s var(--sv-ease), transform .08s var(--sv-ease);
}
#st-studio .sv-tool-l { font: 600 11px/1 var(--label); letter-spacing: .08em; text-transform: uppercase; opacity: 0; transition: opacity .09s var(--sv-ease); }
#st-studio .sv-measure-l { position: absolute; visibility: hidden; opacity: 1; white-space: nowrap; pointer-events: none; }
#st-studio .sv-tool:hover { color: var(--sv-on); background-color: rgba(239,228,210,.06); }
#st-studio .sv-tool[aria-checked="true"], #st-studio .sv-more.is-lbl { color: var(--sv-on-hi); background-color: transparent; }
#st-studio .sv-tool[aria-checked="true"] .sv-tool-l, #st-studio .sv-more.is-lbl .sv-tool-l, #st-studio .sv-dock.is-legend .sv-tool .sv-tool-l {
  opacity: 1; transition: opacity .14s var(--sv-ease) .06s;
}
#st-studio .sv-dock.is-tiny .sv-tool-l { opacity: 0; }
#st-studio .sv-tool:active { transform: scale(.94); }
#st-studio .sv-tool[aria-disabled="true"] { opacity: .32; pointer-events: none; }
#st-studio .sv-sep { flex: 0 0 1px; width: 1px; height: 20px; margin: 0 6px; background: var(--sv-ring); }
#st-studio .sv-jaw {
  position: absolute; top: 4px; left: 0; z-index: 0; height: 40px; width: var(--sv-jw, 40px); border-radius: 8px; pointer-events: none;
  transform: translateX(var(--sv-jx, 4px)); background: #7a4c22;
  box-shadow: inset 0 1px 0 rgba(255,236,210,.18), 0 1px 2px rgba(0,0,0,.35);
  transition: transform .26s var(--sv-spring), width .26s var(--sv-spring);
}
#st-studio .sv-jaw::after { content: ""; position: absolute; top: -4px; left: 50%; width: 1px; height: 7px; background: #d9a56a; }   /* the zero line */
#st-studio .sv-jaw::before {                   /* the leader up to the options strip */
  content: ""; position: absolute; bottom: calc(100% + 4px); left: 50%; width: 1px; height: 14px;
  background: linear-gradient(to top, #d9a56a, rgba(217,165,106,.35)); transform-origin: 50% 100%;
  transform: scaleY(var(--sv-lead, 0)); transition: transform .16s var(--sv-ease);
}

/* ---- the options strip: only the tool in use, joined to the jaw ---- */
#st-studio .sv-ctx {
  position: absolute; left: 0; bottom: 74px; z-index: 3; pointer-events: auto;
  height: 40px; padding: 4px; border-radius: 10px; display: grid; overflow: hidden;
  transform: translateX(var(--sv-cx, 0px)); transform-origin: 50% 100%;
  transition: transform .26s var(--sv-spring), width .22s var(--sv-spring), opacity .16s var(--sv-ease), visibility 0s linear 0s;
}
#st-studio .sv-ctx[data-state="closed"] {
  transform: translateX(var(--sv-cx, 0px)) translateY(6px) scale(.97);
  transition: transform .22s var(--sv-ease), width .22s var(--sv-spring), opacity .12s var(--sv-ease), visibility 0s linear .12s;
}
#st-studio .sv-ctx-l {
  grid-area: 1 / 1; display: flex; align-items: center; gap: 4px; width: max-content; white-space: nowrap;
  opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .09s var(--sv-ease), transform .14s var(--sv-ease);
}
#st-studio .sv-ctx-l.is-on { opacity: 1; transform: none; pointer-events: auto; transition: opacity .14s var(--sv-ease) .06s, transform .14s var(--sv-ease) .06s; }
#st-studio .sv-chip {
  position: relative; flex: 0 0 auto; height: 32px; padding: 0 10px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px;
  font: 600 11px/1 var(--label); letter-spacing: .08em; text-transform: uppercase; color: var(--sv-on);
  box-shadow: inset 0 0 0 1px rgba(239,228,210,.14); transition: background-color .15s var(--sv-ease), transform .08s var(--sv-ease);
}
#st-studio .sv-chip .sv-ic { width: 16px; height: 16px; }
#st-studio .sv-chip:hover { background-color: rgba(239,228,210,.06); }
#st-studio .sv-chip:active { transform: scale(.94); }
#st-studio .sv-chip[aria-pressed="true"], #st-studio .sv-chip[aria-expanded="true"] {
  background-color: rgba(122,76,34,.55); color: var(--sv-on-hi); box-shadow: inset 0 0 0 1px rgba(217,165,106,.5);
}
#st-studio .sv-chip[aria-disabled="true"] { opacity: .35; }
#st-studio .sv-turn b { font: 700 11px/1 var(--label); }
#st-studio .sv-turn span { color: var(--sv-on-dim); }
#st-studio [data-ax="x"] > .sv-scrub-h, #st-studio .sv-turn b[data-ax="x"], #st-studio .sv-read-x i[data-ax="x"] { color: var(--sv-ax-x); }
#st-studio [data-ax="y"] > .sv-scrub-h, #st-studio .sv-turn b[data-ax="y"], #st-studio .sv-read-x i[data-ax="y"] { color: var(--sv-ax-y); }
#st-studio [data-ax="z"] > .sv-scrub-h, #st-studio .sv-turn b[data-ax="z"], #st-studio .sv-read-x i[data-ax="z"] { color: var(--sv-ax-z); }
#st-studio [data-ax="p"] > .sv-scrub-h { color: var(--sv-bronze); }
#st-studio .sv-hair { flex: 0 0 1px; width: 1px; height: 18px; margin: 0 4px; background: var(--sv-ring); }
#st-studio .sv-coach { padding: 0 8px; font: 400 12px/1 var(--sans); color: var(--sv-on-dim); }
#st-studio .sv-x { width: 32px; padding: 0; justify-content: center; }
#st-studio .sv-lock { display: grid; place-items: center; width: 22px; height: 32px; color: var(--sv-on-dim); pointer-events: auto; }
#st-studio .sv-lock .sv-ic { width: 15px; height: 15px; }
#st-studio .sv-read { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 104px; padding: 0 8px; font-family: var(--label); font-variant-numeric: tabular-nums; }
#st-studio .sv-read-d { font: 600 13px/1 var(--label); color: var(--sv-on-hi); }
#st-studio .sv-read-d:empty { display: none; }
#st-studio .sv-read-x { font: 400 10.5px/1 var(--label); color: var(--sv-on-dim); }
#st-studio .sv-read-x i { font-style: normal; }

/* a number you can type, or drag across its letter like a vernier */
#st-studio .sv-scrub {
  position: relative; flex: 0 0 auto; width: 88px; height: 32px; border-radius: 6px; padding-right: 6px;
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center;
  background: rgba(239,228,210,.06); box-shadow: inset 0 0 0 1px rgba(239,228,210,.10); transition: background-color .12s, box-shadow .12s;
}
#st-studio .sv-scrub-h {
  height: 100%; display: grid; place-items: center; font: 700 11px/1 var(--label); cursor: ew-resize;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
#st-studio .sv-scrub input {
  width: 100%; min-width: 0; height: 100%; margin: 0; padding: 0 4px 0 0; border: 0; border-radius: 0; outline: none; background: transparent;
  text-align: right; font: 500 13px/1 var(--label); font-variant-numeric: tabular-nums; color: var(--sv-on); letter-spacing: 0;
}
#st-studio .sv-unit { font: 400 10px/1 var(--label); color: var(--sv-on-dim); letter-spacing: 0; text-transform: none; }
#st-studio .sv-scrub:focus-within { box-shadow: inset 0 0 0 1.5px var(--sv-bronze); }
#st-studio .sv-scrub::after, #st-studio .sv-scrub::before { content: ""; position: absolute; bottom: 0; pointer-events: none; opacity: 0; transition: opacity .12s; }
#st-studio .sv-scrub::after {
  left: 4px; right: 4px; height: 3px;
  background: repeating-linear-gradient(90deg, rgba(217,165,106,.35) 0 1px, transparent 1px 4px); background-position-x: var(--sv-dx, 0px);
}
#st-studio .sv-scrub::before { left: 10px; width: 1px; height: 8px; background: #d9a56a; }
#st-studio .sv-scrub:hover::after, #st-studio .sv-scrub:hover::before, #st-studio .sv-scrub.is-scrub::after, #st-studio .sv-scrub.is-scrub::before { opacity: 1; }
#st-studio .sv-scrub.is-scrub { background: rgba(122,76,34,.35); }
#st-studio .sv-scrub.is-bad, #st-studio .sv-dim.is-bad { box-shadow: inset 0 0 0 1px var(--sv-rust-lit); }

/* ---- the history capsule, once there is something to undo ---- */
#st-studio .sv-hist {
  position: absolute; left: 12px; bottom: 16px; z-index: 3; pointer-events: auto;
  height: 48px; padding: 4px; display: flex; gap: 2px; border-radius: 12px; transform: none; transform-origin: 0 100%;
  transition: opacity .18s var(--sv-ease), transform .18s var(--sv-ease), visibility 0s linear 0s;
}
#st-studio .sv-hist[data-state="closed"] { transform: scale(.92); transition: opacity .12s var(--sv-ease), transform .12s var(--sv-ease), visibility 0s linear .12s; }
#st-studio .sv-hb { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; color: var(--sv-on-dim); transition: background-color .15s, color .15s, transform .08s; }
#st-studio .sv-hb:hover { color: var(--sv-on); background-color: rgba(239,228,210,.06); }
#st-studio .sv-hb:active { transform: scale(.94); }
#st-studio .sv-hb[aria-disabled="true"] { opacity: .3; background: none; }

/* ---- the corner: the size tag, and the parts chip ---- */
#st-studio .sv-tl { position: absolute; top: 12px; left: 12px; z-index: 3; display: flex; align-items: flex-start; gap: 8px; max-width: calc(100% - 100px); }
#st-studio .sv-size { flex: 0 1 auto; min-width: 0; pointer-events: auto; filter: drop-shadow(0 1px 2px rgba(20,18,16,.28)); }
#st-studio .sv-size-face {
  position: relative; display: grid; grid-template-rows: auto auto 0fr; min-width: 150px; padding: 5px 6px 5px 24px;
  background: var(--sv-paper); color: var(--sv-paper-ink);
  clip-path: polygon(6px 0, 100% 0, 100% 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
  transition: grid-template-rows .18s var(--sv-ease), box-shadow .15s;
}
#st-studio .sv-size-face::before {            /* the eyelet: the dialog's own steel double ring, in miniature */
  content: ""; position: absolute; left: 8px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%;
  background: var(--sv-bed); box-shadow: 0 0 0 1.5px #8a8377, 0 0 0 2.5px #3d3934;
}
#st-studio .sv-tl.is-clash .sv-size-face { box-shadow: inset 2px 0 0 var(--sv-rust); }
#st-studio .sv-size-name {
  display: none; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 0 3px;
  font: 600 10px/1.2 var(--label); letter-spacing: .08em; text-transform: uppercase; color: var(--sv-muted);
}
#st-studio .sv-size.is-named .sv-size-name { display: block; }
#st-studio .sv-size-row { display: flex; align-items: center; gap: 8px; min-height: 22px; }
#st-studio .sv-size-v {
  flex: 1 1 auto; text-align: left; white-space: nowrap; font: 600 13px/22px var(--label); font-variant-numeric: tabular-nums; color: #2b2723; letter-spacing: 0;
}
#st-studio .sv-size-v i { font-style: normal; font-weight: 400; color: #8b7355; margin: 0 1px; }
#st-studio .sv-size-v:hover b { text-decoration: underline; text-decoration-color: rgba(122,76,34,.45); text-underline-offset: 3px; }
#st-studio .sv-size.is-empty .sv-size-v { font: 600 10.5px/22px var(--label); letter-spacing: .08em; text-transform: uppercase; color: var(--sv-muted); }
#st-studio .sv-size.is-empty .sv-units { display: none; }
#st-studio .sv-units { flex: 0 0 auto; display: inline-flex; gap: 1px; }
#st-studio .sv-units button { width: 26px; height: 22px; border-radius: 3px; font: 600 10px/22px var(--label); letter-spacing: .06em; text-transform: uppercase; color: var(--sv-muted); }
#st-studio .sv-units button[aria-checked="true"] { background: #2b2723; color: #f6f1e8; }
#st-studio .sv-size :focus-visible:not(input), #st-studio .sv-livetag-b:focus-visible:not(input) { outline-color: #7a4c22; outline-offset: 1px; }
#st-studio .sv-size-more { min-height: 0; overflow: hidden; }
#st-studio .sv-size-words { display: flex; align-items: baseline; gap: 8px; min-height: 16px; font: 400 11.5px/16px var(--sans); color: var(--sv-muted); }
#st-studio .sv-size-w:empty { display: none; }
#st-studio .sv-size-ask { font: 600 11px/16px var(--sans); color: #7a4c22; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(122,76,34,.4); }
#st-studio .sv-size-cmp { display: flex; align-items: center; gap: 6px; padding-top: 3px; }
#st-studio .sv-cmp, #st-studio .sv-real {
  height: 22px; padding: 0 6px; border-radius: 3px; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
  font: 500 10.5px/22px var(--label); color: var(--sv-muted); box-shadow: inset 0 0 0 1px rgba(43,39,35,.14);
}
#st-studio .sv-cmp b { font-weight: 600; color: var(--sv-paper-ink); }
#st-studio .sv-cmp .sv-ic { width: 11px; height: 11px; }
#st-studio .sv-cmp:hover, #st-studio .sv-real:hover { box-shadow: inset 0 0 0 1px rgba(122,76,34,.5); color: var(--sv-paper-ink); }
#st-studio .sv-size.is-empty :is(.sv-size-words, .sv-size-cmp) { display: none; }
#st-studio .st-view.sv-short .sv-size-cmp { display: none; }
#st-studio .sv-size-meta { padding-top: 2px; font: 400 11px/16px var(--label); font-variant-numeric: tabular-nums; color: var(--sv-muted); opacity: 0; transition: opacity .12s var(--sv-ease); white-space: pre; }
#st-studio .sv-size:not(.is-empty):is(:hover, :focus-within) .sv-size-face, #st-studio .st-view[data-tool="scale"] .sv-size:not(.is-empty) .sv-size-face { grid-template-rows: auto auto 1fr; }
#st-studio .sv-size:not(.is-empty):is(:hover, :focus-within) .sv-size-meta, #st-studio .st-view[data-tool="scale"] .sv-size:not(.is-empty) .sv-size-meta { opacity: 1; }
#st-studio .sv-parts {
  flex: 0 0 auto; position: relative; height: 28px; padding: 0 8px 0 10px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px;
  font: 600 11px/1 var(--label); letter-spacing: .08em; text-transform: uppercase; pointer-events: auto;
  transition: opacity .18s var(--sv-ease), transform .18s var(--sv-ease), visibility 0s linear 0s;
}
#st-studio .sv-parts[data-state="closed"] { transform: scale(.92); }
#st-studio .sv-parts .sv-ic { width: 16px; height: 16px; color: var(--sv-on-dim); }
#st-studio .sv-parts .sv-ic:last-of-type { width: 14px; height: 14px; }
#st-studio .sv-parts b { font-weight: 600; color: var(--sv-on-hi); }
#st-studio .sv-clash-dot { display: none; width: 6px; height: 6px; border-radius: 50%; background: var(--sv-rust-lit); }
#st-studio .sv-parts.is-clash .sv-clash-dot { display: block; position: absolute; top: 4px; right: 4px; }

/* ---- real size, 1:1: the calibration card, the bar, the coin that proves it ---- */
#st-studio .st-view.sv-real :is(.sv-dock, .sv-ctx, .sv-hist, .sv-cube, .sv-fit, .sv-draw, .sv-dim, .sv-livetag, .sv-mpill, .sv-check, .sv-parts, .sv-pin, .sv-refl, .sv-inch) { display: none !important; }
#st-studio .sv-calib {
  position: absolute; inset: 12px; z-index: 6; display: grid; place-items: center; pointer-events: auto; overflow: auto;
  background: rgba(216,212,204,.94); border-radius: 8px;
}
#st-studio .sv-calib.is-sheet { position: fixed; inset: 0; z-index: 50; border-radius: 0; background: #d8d4cc; }
/* on a phone, real size takes the whole screen: the more glass, the more of the part at its true size */
@media (max-width: 820px), (max-height: 560px) {
  #st-studio .st-view.sv-real { position: fixed; inset: 0; z-index: 40; height: auto; min-height: 0; border-radius: 0; }
}
#st-studio .sv-cal-in { max-width: 560px; padding: 18px; text-align: center; color: var(--sv-paper-ink); }
#st-studio .sv-cal-h { margin: 0 0 6px; font: 600 20px/1.25 var(--serif); color: #1a1714; }
#st-studio .sv-cal-p { margin: 0 0 12px; font: 400 13.5px/1.5 var(--sans); color: #2b2723; }
#st-studio .sv-cal-box { display: grid; place-items: center; min-height: 120px; margin: 0 0 12px; }
#st-studio .sv-cal-shape { display: block; box-shadow: inset 0 0 0 2px #7a4c22, 0 0 0 1px rgba(246,241,232,.9); background: rgba(122,76,34,.06); }
#st-studio .sv-cal-shape.is-ruler { border-radius: 2px; background: repeating-linear-gradient(90deg, #7a4c22 0 1.5px, transparent 1.5px var(--tick)) 0 0 / 100% 12px no-repeat, rgba(246,241,232,.8); }
#st-studio .sv-cal-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 6px; }
#st-studio .sv-cal-row input { width: min(320px, 60vw); accent-color: #7a4c22; }
#st-studio .sv-cal-row .sv-chip, #st-studio .sv-cal-b .sv-chip { background: #2b2723; color: #f6f1e8; }
#st-studio .sv-cal-b { display: flex; justify-content: center; gap: 8px; margin: 4px 0 8px; }
#st-studio .sv-cal-ok { background: #7a4c22 !important; }
#st-studio .sv-cal-s { margin: 0; font: 400 12px/1.4 var(--sans); color: var(--sv-muted); }
#st-studio .sv-realbar {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 12px;
  background: var(--sv-glass); color: var(--sv-on); box-shadow: inset 0 0 0 1px var(--sv-ring), 0 10px 24px -14px rgba(0,0,0,.55); pointer-events: auto; white-space: nowrap;
}
#st-studio .sv-real-l { padding: 0 8px; font: 600 11px/1 var(--label); letter-spacing: .08em; text-transform: uppercase; color: #d9a56a; }
#st-studio .sv-real-seg { display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: rgba(239,228,210,.06); }
#st-studio .sv-real-seg button { height: 32px; padding: 0 10px; border-radius: 6px; font: 600 11px/1 var(--label); letter-spacing: .04em; color: var(--sv-on-dim); }
#st-studio .sv-real-seg button[aria-checked="true"] { background: rgba(239,228,210,.14); color: var(--sv-on-hi); }
#st-studio .sv-coin { position: absolute; left: 16px; bottom: 16px; z-index: 4; display: flex; align-items: flex-end; gap: 10px; pointer-events: auto; }
#st-studio .sv-coin-c { display: block; flex: 0 0 auto; border-radius: 50%; box-shadow: inset 0 0 0 2px #7a4c22, 0 0 0 1px rgba(246,241,232,.9); }
#st-studio .sv-coin span { display: grid; gap: 2px; padding: 6px 8px; border-radius: 4px; background: rgba(246,241,232,.92); font: 400 12px/1.35 var(--sans); color: var(--sv-paper-ink); }
#st-studio .sv-coin .st-link { font-size: 12px; padding: 0; text-align: left; }
#st-studio .st-view.sv-compact .sv-realbar { bottom: 12px; max-width: calc(100% - 24px); overflow-x: auto; }
#st-studio .st-view.sv-compact .sv-real-l { display: none; }
#st-studio .st-view.sv-compact .sv-coin { bottom: 76px; }
#st-studio .sv-real { font-weight: 600; }

/* ---- marks: the name of the face under the pointer, the numbered pins, the chooser ---- */
#st-studio .sv-mtag {
  height: 22px; padding: 0 8px; display: inline-flex; align-items: center; white-space: nowrap; pointer-events: none; z-index: 4;
  background: rgba(246,241,232,.95); color: var(--sv-paper-ink); border-left: 2px solid #b8733f; border-radius: 3px;
  box-shadow: 0 1px 3px rgba(20,18,16,.25); font: 600 11px/22px var(--label); font-style: normal; font-variant-numeric: tabular-nums;
}
#st-studio .sv-pin {
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px 12px 12px 2px; display: grid; place-items: center; pointer-events: auto; z-index: 3;
  background: #2b2723; color: #fbf4e8; font: 700 11.5px/1 var(--label); box-shadow: 0 0 0 2px #f6f1e8, 0 2px 6px rgba(20,18,16,.4); cursor: pointer;
  transition: opacity .15s var(--sv-ease);
}
#st-studio .sv-pin[data-k="show"] { background: #9c7a33; }
#st-studio .sv-pin[data-k="clean"] { background: #4f6b82; }
#st-studio .sv-pin[data-k="fit"] { background: #8a4f23; }
#st-studio .sv-pin[data-k="load"] { background: #3d444b; }
#st-studio .sv-pin.is-back { opacity: .35; }
#st-studio .sv-pin.is-pulse { animation: sv-pulse .7s var(--sv-ease) 2; }
@keyframes sv-pulse { 50% { box-shadow: 0 0 0 2px #f6f1e8, 0 0 0 8px rgba(217,165,106,.45); } }
#st-studio .st-view.is-gizmo .sv-pin, #st-studio .st-view.is-orbiting .sv-pin { opacity: .45; }
#st-studio .sv-mk { width: 300px; }
#st-studio .sv-mk-h { margin: 6px 8px 6px; font: 600 14px/1.3 var(--sans); color: #fbf4e8; }
#st-studio .sv-mk-p { margin: 0 8px 8px; font: 400 12.5px/1.45 var(--sans); color: var(--sv-on-dim); }
#st-studio .sv-mk-k { height: auto; min-height: 44px; padding: 6px 10px; align-items: flex-start; }
#st-studio .sv-mk-k .sv-mi-l b { display: block; font: 600 13px/1.3 var(--sans); color: var(--sv-on-hi); }
#st-studio .sv-mk-k .sv-mi-l span { display: block; font: 400 12px/1.35 var(--sans); color: var(--sv-on-dim); }
#st-studio .sv-mk-sw { flex: 0 0 12px; width: 12px; height: 12px; margin-top: 3px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
#st-studio .sv-mk-o { display: grid; gap: 2px; margin: 0 4px 8px; }
#st-studio .sv-mk-o label { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 6px; border-radius: 6px; font: 400 13px/1.3 var(--sans); color: var(--sv-on); cursor: pointer; }
#st-studio .sv-mk-o label:hover { background: rgba(239,228,210,.06); }
#st-studio .sv-mk-o input { accent-color: #d9a56a; }
#st-studio .sv-mk-f { display: grid; gap: 4px; margin: 0 8px 8px; font: 500 11px/1.3 var(--label); letter-spacing: .04em; color: var(--sv-on-dim); }
#st-studio .sv-mk-f input, #st-studio .sv-mk-f textarea {
  width: 100%; min-height: 32px; padding: 6px 8px; border: 0; border-radius: 6px; resize: vertical; background: rgba(239,228,210,.08);
  box-shadow: inset 0 0 0 1px rgba(239,228,210,.18); color: var(--sv-on); font: 400 13px/1.35 var(--sans); letter-spacing: 0;
}
#st-studio .sv-mk-f :is(input, textarea):focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--sv-bronze); }
#st-studio .sv-mk-b { position: sticky; bottom: -6px; display: flex; justify-content: flex-end; gap: 6px; padding: 8px 4px 4px; background: linear-gradient(rgba(20,18,16,0), var(--sv-glass-hi) 30%); }
#st-studio .sv-pop.is-sheet .sv-mk-b { bottom: calc(-12px - env(safe-area-inset-bottom)); padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
#st-studio .sv-pop.is-sheet .sv-mk-b .sv-chip { height: 44px; padding: 0 18px; }
#st-studio .sv-mk-save { background: #7a4c22; color: var(--sv-on-hi); }
#st-studio .sv-pop.is-sheet.sv-mk .sv-mk-o label { min-height: 44px; }

/* ---- what we'll look at: one chip for the part's surface, a list behind it ---- */
#st-studio .sv-check {
  flex: 0 0 auto; position: relative; height: 28px; padding: 0 10px 0 9px; border-radius: 6px; display: inline-flex; align-items: center; gap: 7px;
  font: 600 11px/1 var(--label); letter-spacing: .06em; text-transform: uppercase; pointer-events: auto; white-space: nowrap;
  background: var(--sv-glass); color: var(--sv-on); box-shadow: inset 0 0 0 1px var(--sv-ring), 0 10px 24px -14px rgba(0,0,0,.55);
  -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1);
  transition: opacity .18s var(--sv-ease), transform .18s var(--sv-ease), visibility 0s linear 0s;
}
#st-studio .sv-check[data-state="closed"] { transform: scale(.92); }
#st-studio .sv-ck-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: #93ad80; box-shadow: 0 0 0 2px rgba(147,173,128,.2); }
#st-studio [data-k="look"] > .sv-ck-dot { background: #e07a62; box-shadow: 0 0 0 2px rgba(224,122,98,.22); }
#st-studio [data-k="you"] > .sv-ck-dot { background: #d9a56a; box-shadow: 0 0 0 2px rgba(217,165,106,.22); }
#st-studio [data-k="wait"] > .sv-ck-dot { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(239,228,210,.55); animation: st-spin 1.2s linear infinite; border-top: 1.5px solid #d9a56a; }
#st-studio .st-view.sv-coarse .sv-check { height: 32px; }
#st-studio #sv-check:not(.is-sheet) { width: 340px; }
#st-studio .sv-ck-h { margin: 6px 8px 8px; font: 600 15px/1.2 var(--serif); color: #fbf4e8; }
#st-studio .sv-ck-h span { display: block; margin-top: 3px; font: 600 10px/1.2 var(--label); letter-spacing: .08em; text-transform: uppercase; color: var(--sv-on-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#st-studio .sv-ck { display: grid; grid-template-columns: 8px 1fr; gap: 4px 10px; align-items: start; padding: 8px; border-radius: 8px; }
#st-studio .sv-ck + .sv-ck { border-top: 1px solid var(--sv-ring); border-radius: 0; }
#st-studio .sv-ck .sv-ck-dot { margin-top: 5px; }
#st-studio .sv-ck p { margin: 0; font: 400 13px/1.45 var(--sans); color: var(--sv-on); }
#st-studio .sv-ck-v { grid-column: 2; justify-self: start; padding: 2px 7px; border-radius: 4px; font: 600 10px/1.4 var(--label); letter-spacing: .06em; text-transform: uppercase; color: #93ad80; box-shadow: inset 0 0 0 1px rgba(147,173,128,.4); }
#st-studio .sv-ck[data-k="look"] .sv-ck-v { color: #e8a08a; box-shadow: inset 0 0 0 1px rgba(224,122,98,.45); }
#st-studio .sv-ck[data-k="you"] .sv-ck-v { color: #d9a56a; box-shadow: inset 0 0 0 1px rgba(217,165,106,.45); }
#st-studio .sv-ck > .sv-chip, #st-studio .sv-ck-a { grid-column: 2; justify-self: start; }
#st-studio .sv-ck-a { display: flex; flex-wrap: wrap; gap: 6px; }
#st-studio .sv-ck-f { margin: 6px 8px 4px; font: 400 12px/1.45 var(--sans); color: var(--sv-on-dim); }

/* ---- a status line: brief, in the free space at the top ---- */
#st-studio .sv-status {
  position: absolute; left: 12px; top: 14px; z-index: 3; height: 28px; padding: 0 12px; border-radius: 6px; max-width: calc(100% - 24px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 12px/28px var(--sans); pointer-events: none;
  transform: none; transition: opacity .16s var(--sv-ease), transform .16s var(--sv-ease), visibility 0s linear 0s;
}
#st-studio .sv-status[data-state="closed"] { transform: translateY(-4px); }
#st-studio .sv-status.is-warn { background: var(--sv-rust-bg); color: #fff3ea; }
#st-studio .sv-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---- the view cube: 26 views, and Fit under it ---- */
#st-studio .sv-cube {
  position: absolute; top: 12px; right: 12px; z-index: 3; width: 64px; height: 64px; perspective: 200px; pointer-events: auto;
  cursor: grab; touch-action: none; opacity: .72; border-radius: 8px; transition: opacity .2s var(--sv-ease), visibility 0s linear 0s;
}
#st-studio .sv-cube:hover, #st-studio .sv-cube:focus-within, #st-studio .st-view.is-orbiting .sv-cube:not([data-state="closed"]) { opacity: 1; }
#st-studio .sv-cube:focus-within { outline: 2px solid var(--sv-focus); outline-offset: 2px; }
#st-studio .sv-cube.is-drag { cursor: grabbing; }
#st-studio .sv-cube-in { position: absolute; left: 12px; top: 12px; width: 40px; height: 40px; transform-style: preserve-3d; }
#st-studio .sv-face {
  position: absolute; left: 0; top: 0; width: 40px; height: 40px; display: grid; grid-template: 10px 1fr 10px / 10px 1fr 10px;
  background: rgba(20,18,16,.78); box-shadow: inset 0 0 0 1px rgba(184,149,110,.35); backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
#st-studio .sv-face-l {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none;
  font: 600 7.5px/1 var(--label); letter-spacing: .1em; text-transform: uppercase; color: rgba(239,228,210,.8); user-select: none;
}
#st-studio .sv-z { display: block; }
#st-studio .sv-z.is-hi { background: rgba(122,76,34,.92); }
#st-studio .sv-face:has(.is-face.is-hi) .sv-face-l { color: #fbf4e8; }
#st-studio .f-front  { transform: translateZ(20px); }
#st-studio .f-back   { transform: rotateY(180deg) translateZ(20px); }
#st-studio .f-right  { transform: rotateY(90deg) translateZ(20px); }
#st-studio .f-left   { transform: rotateY(-90deg) translateZ(20px); }
#st-studio .f-top    { transform: rotateX(90deg) translateZ(20px); }
#st-studio .f-bottom { transform: rotateX(-90deg) translateZ(20px); }
#st-studio .sv-cube-kb { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
#st-studio .sv-fit {
  position: absolute; top: 84px; right: 28px; z-index: 3; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  color: var(--sv-on-dim); pointer-events: auto; transition: opacity .16s var(--sv-ease), color .15s, visibility 0s linear 0s;
}
#st-studio .sv-fit .sv-ic { width: 18px; height: 18px; }
#st-studio .sv-fit:hover { color: var(--sv-on-hi); }

/* ---- the paper: a drawing, a document or a photo, in place of the 3D plate ---- */
#st-studio .st-view[data-show="sheet"] :is(.st-canvas, .sv-ui, .st-loading) { display: none !important; }
#st-studio .sv-sheet { position: absolute; inset: 0; z-index: 4; background: var(--sv-bed); font-family: var(--sans); }
#st-studio .sh-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; cursor: grab; }
#st-studio .sv-sheet.is-grab .sh-canvas { cursor: grabbing; }
#st-studio .sh-canvas:focus-visible { outline: 2px solid var(--sv-focus); outline-offset: -2px; }
#st-studio .sh-tl { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 2; display: flex; align-items: flex-start; gap: 8px; pointer-events: none; }
#st-studio .sh-tag { flex: 0 1 auto; min-width: 0; filter: drop-shadow(0 1px 2px rgba(20,18,16,.28)); pointer-events: auto; }
#st-studio .sh-face {
  position: relative; min-width: 150px; max-width: 520px; padding: 5px 12px 6px 24px; background: var(--sv-paper); color: var(--sv-paper-ink);
  clip-path: polygon(6px 0, 100% 0, 100% 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
}
#st-studio .sh-face::before {                  /* the same steel eyelet as the size tag */
  content: ""; position: absolute; left: 8px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%;
  background: var(--sv-bed); box-shadow: 0 0 0 1.5px #8a8377, 0 0 0 2.5px #3d3934;
}
#st-studio .sh-name { padding: 1px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 10px/1.2 var(--label); letter-spacing: .08em; text-transform: uppercase; color: var(--sv-muted); }
#st-studio .sh-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 12.5px/20px var(--label); font-variant-numeric: tabular-nums; color: #2b2723; letter-spacing: 0; }
#st-studio .sh-files { pointer-events: auto; }
#st-studio .sh-dock {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2;
  height: 48px; padding: 4px; display: flex; align-items: center; gap: 2px; border-radius: 12px; white-space: nowrap;
}
#st-studio .sh-b {
  position: relative; z-index: 1; flex: 0 0 auto; height: 40px; min-width: 40px; padding: 0 10px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--sv-on-dim);
  font: 600 11px/1 var(--label); letter-spacing: .08em; text-transform: uppercase;
  transition: color .15s var(--sv-ease), background-color .15s var(--sv-ease), transform .08s var(--sv-ease);
}
#st-studio .sh-b:hover { color: var(--sv-on); background-color: rgba(239,228,210,.06); }
#st-studio .sh-b:active { transform: scale(.94); }
#st-studio .sh-b[aria-disabled="true"] { opacity: .32; background: none; }
#st-studio .sh-b .sv-ic { width: 18px; height: 18px; }
#st-studio .sh-plate { padding: 0 12px 0 10px; color: var(--sv-on); }
#st-studio .sh-zoom { min-width: 64px; font-variant-numeric: tabular-nums; color: var(--sv-on); }
#st-studio .sh-pages { display: inline-flex; align-items: center; gap: 2px; }
#st-studio .sh-pg { min-width: 48px; text-align: center; font: 600 12px/1 var(--label); font-variant-numeric: tabular-nums; color: var(--sv-on); }
#st-studio .sh-busy {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 10px; color: var(--sv-on); font: 500 13px/1 var(--label); pointer-events: none;
}
#st-studio .sh-busy i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(239,228,210,.25); border-top-color: #b8956e; animation: st-spin 1s linear infinite; }
#st-studio .sv-sheet.is-measuring .sh-canvas { cursor: crosshair; }
#st-studio .sh-loupe { position: absolute; left: 0; top: 0; z-index: 5; width: 120px; height: 120px; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 2px #f6f1e8, 0 0 0 3px #7a4c22, 0 8px 20px rgba(20,18,16,.35); }
#st-studio .sh-roles { position: absolute; left: 12px; top: 64px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; max-width: calc(100% - 24px); pointer-events: auto; }
#st-studio .sh-roles span { margin-right: 4px; font: 600 10px/1 var(--label); letter-spacing: .08em; text-transform: uppercase; color: var(--sv-muted); }
#st-studio .sh-roles button { height: 26px; padding: 0 9px; border-radius: 13px; background: rgba(246,241,232,.9); color: var(--sv-paper-ink); font: 500 12px/26px var(--sans); box-shadow: inset 0 0 0 1px rgba(43,39,35,.16); }
#st-studio .sh-roles button[aria-pressed="true"] { background: #2b2723; color: #f6f1e8; box-shadow: none; }
#st-studio .sv-sheet.is-compact .sh-roles { top: 104px; }
#st-studio .sv-sheet.is-compact .sh-roles span { display: none; }
#st-studio .sh-meas[aria-pressed="true"] { background: #7a4c22; color: var(--sv-on-hi); box-shadow: inset 0 1px 0 rgba(255,236,210,.18); }
#st-studio .sh-hint {
  position: absolute; left: 50%; top: 70px; transform: translateX(-50%); z-index: 2; max-width: min(460px, calc(100% - 24px)); padding: 7px 12px;
  border-radius: 4px; border-left: 2px solid #7a4c22; background: rgba(246,241,232,.96); color: var(--sv-paper-ink);
  box-shadow: 0 1px 3px rgba(20,18,16,.2); font: 400 12.5px/1.4 var(--sans); pointer-events: auto; text-align: left;
}
#st-studio .sh-hint .st-link { font-size: 12.5px; padding: 0; }
#st-studio #sh-len { width: 280px; }
#st-studio .sh-len-h { margin: 4px 10px 6px; font: 600 12.5px/1.3 var(--sans); color: var(--sv-on); }
#st-studio .sh-len-f { display: flex; gap: 6px; padding: 6px 4px 4px; }
#st-studio .sh-len-f input { flex: 1; min-width: 0; height: 32px; padding: 0 8px; border: 0; border-radius: 6px; background: rgba(239,228,210,.08); box-shadow: inset 0 0 0 1px rgba(239,228,210,.18); color: var(--sv-on); font: 500 13px/1 var(--label); }
#st-studio .sh-len-f input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--sv-bronze); }
#st-studio .sh-len-f input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--sv-rust-lit); }
#st-studio .sv-sheet.is-compact .sh-hint { top: auto; bottom: 72px; }
#st-studio .sv-sheet:has(.sh-roles:not([hidden])) .sh-hint { top: 100px; }
#st-studio .sv-sheet.is-compact:has(.sh-roles:not([hidden])) .sh-hint { top: auto; }
#st-studio .sv-sheet.is-compact .sh-b span { display: none; }
#st-studio .sv-sheet.is-compact .sh-tl { flex-direction: column; gap: 6px; }
#st-studio .sv-sheet.is-compact .sh-face { min-width: 0; max-width: calc(100vw - 48px); }
#st-studio .sv-sheet.is-compact .sh-dock { bottom: 12px; height: 52px; border-radius: 14px; }
#st-studio .sv-sheet.is-compact .sh-b { height: 44px; min-width: 44px; padding: 0 8px; }
#st-studio .sv-sheet.is-compact .sh-zoom { min-width: 56px; }
#st-studio .sv-sheet.is-compact .sh-pg { min-width: 40px; }
@media (pointer: coarse) {
  #st-studio .sh-b { height: 44px; min-width: 44px; }
  #st-studio .sh-dock { height: 52px; border-radius: 14px; }
}

/* ---- the tooltip ---- */
#st-studio #sv-tip {
  position: absolute; left: 0; top: 0; z-index: 5; height: 26px; padding: 0 8px; border-radius: 6px; white-space: nowrap; pointer-events: none;
  background: #141210; box-shadow: inset 0 0 0 1px rgba(184,149,110,.3); color: #efe4d2; font: 500 12px/26px var(--label);
}
#st-studio #sv-tip kbd, #st-studio .sv-pop kbd {
  display: inline-block; margin-left: 8px; padding: 2px 5px; border-radius: 3px; background: none; box-shadow: inset 0 0 0 1px rgba(184,149,110,.55);
  font: 600 10px/1.2 var(--label); letter-spacing: .04em; color: #d9a56a; vertical-align: 1px;
}

/* ---- paper on the part ---- */
#st-studio .sv-draw { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
#st-studio .sv-draw path { fill: none; stroke-linecap: square; }
#st-studio .sv-dl { stroke: #7a4c22; stroke-width: 1.25; }
#st-studio .sv-ext { stroke: rgba(122,76,34,.45); stroke-width: 1; }
#st-studio .sv-tags { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
#st-studio .sv-tags > * { position: absolute; left: 0; top: 0; }
#st-studio .sv-dim { height: 22px; padding: 0 6px 0 8px; display: inline-flex; align-items: baseline; gap: 3px; border-left: 2px solid var(--sv-axp-x); pointer-events: auto; cursor: ew-resize; touch-action: none; }
#st-studio .sv-dim.is-scrub { background: #efe3cf; }
#st-studio .sv-dim[data-ax="y"] { border-left-color: var(--sv-axp-y); }
#st-studio .sv-dim[data-ax="z"] { border-left-color: var(--sv-axp-z); }
#st-studio .sv-dim .sv-unit, #st-studio .sv-mpill .sv-unit { color: var(--sv-muted); margin-left: 2px; }
#st-studio .sv-dim.is-editing { cursor: default; }
#st-studio .sv-ie {
  width: 64px; height: 20px; margin: 0; padding: 0 4px; border: 0; border-radius: 2px; outline: 1.5px solid #7a4c22; background: #fff;
  font: 600 12px/20px var(--label); font-variant-numeric: tabular-nums; color: #2b2723; text-align: right; letter-spacing: 0;
}
#st-studio .sv-ie-p { font: 400 11px/1 var(--sans); color: var(--sv-muted); margin-right: 6px; }
#st-studio .sv-livetag { z-index: 3; pointer-events: none; transition: opacity .09s var(--sv-ease), visibility 0s linear 0s; }
#st-studio .sv-livetag-b { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; font: 600 12px/24px var(--label); border-left: 2px solid var(--sv-axp-x); pointer-events: none; }
#st-studio .sv-livetag[data-ax="y"] .sv-livetag-b { border-left-color: var(--sv-axp-y); }
#st-studio .sv-livetag[data-ax="z"] .sv-livetag-b { border-left-color: var(--sv-axp-z); }
#st-studio .sv-livetag[data-ax="p"] .sv-livetag-b { border-left-color: #8b7355; }
#st-studio .sv-livetag.is-hold .sv-livetag-b { pointer-events: auto; cursor: text; }
#st-studio .sv-livetag.is-tick .sv-livetag-b { animation: sv-tick .09s linear; }
@keyframes sv-tick { 50% { border-left-color: #d9a56a; } }
#st-studio .sv-mpill {
  min-height: 36px; padding: 5px 10px 5px 8px; border-left: 2px solid #7a4c22; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px;
  text-align: left; line-height: 1; pointer-events: auto; cursor: text;
}
#st-studio .sv-mpill b { font: 600 13px/1 var(--label); }
#st-studio .sv-mpill.is-editing { flex-direction: row; align-items: center; }
#st-studio .sv-mx { font: 400 10px/1 var(--label); color: var(--sv-muted); }
#st-studio .sv-mx i { font-style: normal; }
#st-studio .sv-mx i[data-ax="x"] { color: var(--sv-axp-x); }
#st-studio .sv-mx i[data-ax="y"] { color: var(--sv-axp-y); }
#st-studio .sv-mx i[data-ax="z"] { color: var(--sv-axp-z); }
#st-studio .sv-ret, #st-studio .sv-mdot { width: 0; height: 0; pointer-events: none; }
#st-studio .sv-ret::before, #st-studio .sv-mdot::before {
  content: ""; position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%;
  box-shadow: 0 0 0 1.5px #f6f1e8, 0 0 0 2.5px rgba(20,18,16,.5); transition: transform .09s var(--sv-ease), background-color .09s, border-radius .09s;
}
#st-studio .sv-ret[data-kind="vertex"]::before, #st-studio .sv-mdot::before { left: -4px; top: -4px; width: 8px; height: 8px; background: #7a4c22; }
#st-studio .sv-mdot::before { left: -3.5px; top: -3.5px; width: 7px; height: 7px; }
#st-studio .sv-ret[data-kind="mid"]::before, #st-studio .sv-ret[data-kind="edge"]::before { left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 1px; background: #7a4c22; transform: rotate(45deg); }
#st-studio .sv-ret[data-kind="edge"]::before { background: rgba(122,76,34,.55); }
/* the name of the familiar thing lying beside the part: a paper tag under it, pressed to choose another */
#st-studio .sv-refl {
  height: 24px; padding: 0 6px 0 8px; display: inline-flex; align-items: center; gap: 4px; pointer-events: auto; white-space: nowrap;
  background: rgba(246,241,232,.9); color: var(--sv-muted); border-radius: 3px; border-left: 2px solid #8b7355;
  box-shadow: 0 1px 2px rgba(20,18,16,.18), 0 0 0 1px rgba(43,39,35,.06); font: 600 10.5px/24px var(--label); letter-spacing: .02em;
}
#st-studio .sv-refl:hover { color: var(--sv-paper-ink); background: var(--sv-paper); }
#st-studio .sv-refl .sv-ic { width: 12px; height: 12px; }
#st-studio .sv-refl:focus-visible { outline-color: #7a4c22; outline-offset: 1px; }
#st-studio .st-view.is-gizmo .sv-refl { opacity: 0; transition: opacity .12s; }
#st-studio .sv-refs-h { margin: 4px 10px 6px; font: 600 10px/1.3 var(--label); letter-spacing: .08em; text-transform: uppercase; color: var(--sv-on-dim); }
#st-studio #sv-refs { width: 236px; }
#st-studio #sv-refs .sv-mi[aria-checked="true"]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #d9a56a; margin-left: auto; }
/* the question a unitless file sometimes needs: a paper card over the tools, two answers side by side */
#st-studio .sv-inch {
  position: absolute; left: 50%; bottom: 128px; z-index: 4; width: min(440px, calc(100% - 24px)); transform: translateX(-50%);
  padding: 10px 12px 12px; border-radius: 6px; pointer-events: auto; background: var(--sv-paper); color: var(--sv-paper-ink);
  box-shadow: 0 10px 28px -12px rgba(20,18,16,.55), 0 0 0 1px rgba(43,39,35,.1); border-left: 3px solid #7a4c22;
}
#st-studio .sv-inch[data-state="closed"] { transform: translateX(-50%) translateY(6px); }
#st-studio .sv-inch { width: min(560px, calc(100% - 24px)); }
#st-studio .sv-inch-h { margin: 0 0 8px; font: 400 12.5px/1.45 var(--sans); }
#st-studio .sv-inch-h b { display: block; font: 600 14px/1.3 var(--sans); margin-bottom: 2px; }
#st-studio .sv-inch-h span { color: var(--sv-muted); }
#st-studio .sv-inch-b { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px; }
#st-studio .sv-inch-o em { font: italic 400 11px/1.25 var(--sans); color: var(--sv-muted); }
#st-studio .sv-inch-o[data-first] em { color: rgba(246,241,232,.75); }
#st-studio .sv-inch-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
#st-studio .sv-inch-c { display: inline-flex; align-items: center; gap: 6px; font: 400 12px/1.3 var(--sans); cursor: pointer; }
#st-studio .sv-inch-c input { accent-color: #7a4c22; }
#st-studio .sv-inch-u { font: 600 12px/1.3 var(--sans); color: #7a4c22; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(122,76,34,.45); padding: 6px 0; }
#st-studio .sv-inch-done { display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 400 13px/1.4 var(--sans); }
#st-studio .sv-inch.is-sheet { left: 0; right: 0; bottom: 0; width: auto; transform: none; border-radius: 12px 12px 0 0; border-left: 0; border-top: 3px solid #7a4c22; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
#st-studio .sv-inch.is-sheet[data-state="closed"] { transform: translateY(12px); }
#st-studio .sv-inch.is-sheet .sv-inch-b { grid-template-columns: 1fr; }
#st-studio .sv-inch-o {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 44px; padding: 7px 10px; border-radius: 5px; text-align: left;
  box-shadow: inset 0 0 0 1px rgba(43,39,35,.18); background: rgba(255,255,255,.5);
}
#st-studio .sv-inch-o b { font: 600 12.5px/1.2 var(--sans); }
#st-studio .sv-inch-o span { font: 500 11px/1.2 var(--label); font-variant-numeric: tabular-nums; color: var(--sv-muted); }
#st-studio .sv-inch-o:hover { box-shadow: inset 0 0 0 1.5px #7a4c22; }
#st-studio .sv-inch-o[data-first] { background: #2b2723; color: #f6f1e8; box-shadow: none; }
#st-studio .sv-inch-o[data-first] span { color: rgba(246,241,232,.7); }
#st-studio .sv-inch :focus-visible { outline: 2px solid #b87333; outline-offset: 2px; }

#st-studio .sv-hand { width: 24px; height: 24px; margin: -6px 0 0 -8px; color: #f6f1e8; pointer-events: none; filter: drop-shadow(0 1px 2px rgba(20,18,16,.45)); }
#st-studio .sv-hand .sv-ic { width: 24px; height: 24px; }

/* ---- while the view turns, the controls step back; while a handle is dragged, the drag tag speaks ---- */
#st-studio .st-view.is-orbiting :is(.sv-tl, .sv-status, .sv-dock, .sv-ctx, .sv-hist, .sv-fit, .sv-tags):not([data-state="closed"]) { opacity: .3; transition-duration: .2s; }
#st-studio .st-view.is-gizmo :is(.sv-tl, .sv-ctx, .sv-dim, .sv-draw) { opacity: 0; transition-duration: .12s; }
#st-studio .st-view.no-anim :is(.sv-jaw, .sv-tool, .sv-dock, .sv-ctx, .sv-ctx-l, .sv-tool-l) { transition: none !important; }

/* ---- the menus: the top layer, or a bottom sheet on a phone ---- */
#st-studio .sv-pop {
  position: fixed; inset: auto; left: 0; top: 0; margin: 0; padding: 6px; border: 0; border-radius: 12px; width: 256px; max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain;
  font: 400 13px/1.3 var(--sans); opacity: 0; transform: translateY(6px);
  transition: opacity .18s var(--sv-ease), transform .18s var(--sv-ease), overlay .18s allow-discrete, display .18s allow-discrete;
}
#st-studio .sv-pop:popover-open { opacity: 1; transform: none; }
@starting-style { #st-studio .sv-pop:popover-open { opacity: 0; transform: translateY(6px); } }
#st-studio .sv-pop[data-pop-fallback] { display: none; }
#st-studio .sv-pop[data-pop-fallback][data-open] { display: block; opacity: 1; transform: none; z-index: 30; }   /* above the viewer's own layers */
#st-studio .sv-pop::backdrop { background: transparent; }
#st-studio .sv-mi {
  width: 100%; height: 36px; padding: 0 10px; border-radius: 8px; display: flex; align-items: center; gap: 10px; text-align: left;
  font: 400 13px/1 var(--sans); color: var(--sv-on);
}
#st-studio .sv-mi .sv-ic { width: 16px; height: 16px; color: var(--sv-on-dim); }
#st-studio .sv-mi-l { flex: 1 1 auto; }
#st-studio .sv-mi kbd { margin-left: 0; }
#st-studio .sv-mi:hover, #st-studio .sv-mi:focus-visible { background: rgba(239,228,210,.08); }
#st-studio .sv-mi[aria-disabled="true"] { opacity: .4; background: none; }
#st-studio .sv-mi[aria-checked="true"], #st-studio .sv-mi[aria-checked="true"] .sv-ic { color: #d9a56a; }
#st-studio .sv-mview { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 8px; padding: 8px 10px; }
#st-studio .sv-mview-l { font: 400 13px/1 var(--sans); }
#st-studio .sv-mview kbd { grid-row: 1; grid-column: 2; justify-self: end; }
@media (pointer: coarse) { #st-studio .sv-pop kbd { display: none; } }   /* no keyboard to point at */
#st-studio .sv-seg3 { grid-column: 1 / -1; display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: rgba(239,228,210,.05); }
#st-studio .sv-mi-v {
  flex: 1 1 0; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; gap: 5px;
  font: 600 10px/1 var(--label); letter-spacing: .06em; text-transform: uppercase; color: var(--sv-on-dim);
}
#st-studio .sv-mi-v .sv-ic { width: 14px; height: 14px; }
#st-studio .sv-mi-v:hover { color: var(--sv-on); }
#st-studio .sv-mi-v[aria-checked="true"] { background: rgba(239,228,210,.14); color: var(--sv-on-hi); }
#st-studio .sv-mhr { display: block; height: 1px; margin: 4px 6px; background: var(--sv-ring); }
#st-studio #sv-press { width: 208px; }
#st-studio #sv-press .sv-mi { height: 44px; }   /* opened by a finger: finger-sized rows */
#st-studio #sv-parts-pop:not(.is-sheet) { width: 300px; }
#st-studio #sh-files-pop:not(.is-sheet) { width: 340px; }
#st-studio .sv-fi { flex: 0 0 28px; width: 28px; height: 28px; display: grid; place-items: center; color: var(--sv-on-dim); }
#st-studio .sv-fi .sv-ic { width: 16px; height: 16px; }
#st-studio .sv-px .sv-ps { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#st-studio .sv-pop.is-sheet .sv-fi { width: 44px; flex-basis: 44px; }
#st-studio .sv-plist { display: flex; flex-direction: column; gap: 2px; }
#st-studio .sv-pi { position: relative; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 2px; border-radius: 6px; }
#st-studio .sv-pi.is-sel { background: rgba(239,228,210,.08); box-shadow: inset 2px 0 0 #b87333; }
#st-studio .sv-eye { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; color: var(--sv-on-dim); }
#st-studio .sv-eye[aria-pressed="false"] { color: rgba(239,228,210,.35); }
#st-studio .sv-eye .sv-ic { width: 16px; height: 16px; }
#st-studio .sv-pn { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; font: 400 12.5px/28px var(--sans); color: var(--sv-on); }
#st-studio .sv-ps { flex: 0 0 auto; font: 400 11px/1 var(--label); font-variant-numeric: tabular-nums; color: var(--sv-on-dim); }
#st-studio .sv-pi.is-clash .sv-clash-dot { display: block; flex: 0 0 6px; }
#st-studio .sv-keys { width: 380px; padding: 18px 20px; }
#st-studio .sv-keys-h { margin: 0 0 12px; font: 600 18px/1.2 var(--serif); color: #fbf4e8; }
#st-studio .sv-keys-l { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; margin: 0 0 14px; }
#st-studio .sv-keys-l dt { white-space: nowrap; }
#st-studio .sv-keys-l dt kbd { margin-left: 0; }
#st-studio .sv-keys-l dd { margin: 0; font: 400 13px/1.3 var(--sans); color: var(--sv-on); }
#st-studio .sv-keys .sv-chip .sv-ic { width: 14px; height: 14px; }
#st-studio .sv-grab { display: none; }
#st-studio .sv-pop.is-sheet {
  left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-width: none; max-height: 60svh; overflow: auto; overscroll-behavior: contain;
  border-radius: 16px 16px 0 0; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); transform: none;
  transition: transform .26s var(--sv-ease), overlay .26s allow-discrete, display .26s allow-discrete;
}
@starting-style { #st-studio .sv-pop.is-sheet:popover-open { opacity: 1; transform: translateY(100%); } }
#st-studio .sv-pop.is-sheet:not(:popover-open) { transform: translateY(100%); opacity: 1; }
#st-studio .sv-pop.is-drag { transition: none !important; }
#st-studio .sv-pop.is-sheet .sv-grab {
  display: block; width: 60px; height: 24px; margin: 0 auto; touch-action: none; cursor: grab;
  background: linear-gradient(rgba(239,228,210,.3), rgba(239,228,210,.3)) center / 36px 4px no-repeat; border-radius: 2px;
}
#st-studio .sv-pop.is-sheet .sv-mi { height: 48px; font-size: 15px; }
#st-studio .sv-pop.is-sheet .sv-mi-v { height: 36px; }
#st-studio .sv-pop.is-sheet .sv-pi { height: 48px; }
#st-studio .sv-pop.is-sheet .sv-eye { width: 44px; height: 44px; flex-basis: 44px; }

/* ---- coarse pointers and compact viewers (under 640px, set on the viewer by the script) ---- */
#st-studio .st-view:is(.sv-compact, .sv-coarse) .sv-dock { height: 52px; border-radius: 14px; }
#st-studio .st-view:is(.sv-compact, .sv-coarse) .sv-tool { height: 44px; width: 44px; min-width: 44px; padding-left: 12px; border-radius: 10px; }
#st-studio .st-view:is(.sv-compact, .sv-coarse) .sv-jaw { height: 44px; border-radius: 10px; }
#st-studio .st-view:is(.sv-compact, .sv-coarse) .sv-ctx { height: 44px; border-radius: 12px; }
#st-studio .st-view.sv-coarse:not(.sv-compact) .sv-ctx { bottom: 78px; }
#st-studio .st-view:is(.sv-compact, .sv-coarse) .sv-chip { height: 36px; }
#st-studio .st-view:is(.sv-compact, .sv-coarse) .sv-chip::before { content: ""; position: absolute; inset: -4px 0; }
#st-studio .st-view:is(.sv-compact, .sv-coarse) .sv-scrub { height: 36px; }
#st-studio .st-view:is(.sv-compact, .sv-coarse) .sv-scrub input, #st-studio .st-view:is(.sv-compact, .sv-coarse) .sv-ie { font-size: 16px; }
#st-studio .st-view:is(.sv-compact, .sv-coarse) .sv-hb { width: 44px; height: 44px; }
#st-studio .st-view:is(.sv-compact, .sv-coarse) .sv-hist { height: 52px; border-radius: 14px; }
#st-studio .st-view.sv-coarse .sv-fit { width: 44px; height: 44px; right: 22px; }
#st-studio .st-view.sv-coarse .sv-parts { height: 32px; }
#st-studio .st-view.sv-coarse .sv-parts::before { content: ""; position: absolute; inset: -6px 0; }
#st-studio .st-view.sv-compact .sv-dock { bottom: 12px; }
#st-studio .st-view.sv-compact .sv-sep { height: 22px; margin: 0 4px; }
#st-studio .st-view.sv-compact .sv-tool[data-tool="measure"] { display: none; }
#st-studio .st-view.sv-compact .sv-ctx { bottom: 72px; max-width: calc(100% - 24px); }
#st-studio .st-view.sv-compact .sv-scrub { width: 66px; padding-right: 2px; grid-template-columns: 16px minmax(0, 1fr) 0; }
#st-studio .st-view.sv-compact .sv-scrub input { padding-right: 0; }
#st-studio .st-view.sv-compact .sv-scrub .sv-unit { display: none; }
#st-studio .st-view.sv-compact .sv-ctx .sv-hair { display: none; }
#st-studio .st-view.sv-compact .sv-turn { padding: 0 9px; }
#st-studio .st-view.sv-compact .sv-chip[data-act="snap-rot"] .sv-ic, #st-studio .st-view.sv-narrow .sv-turn span { display: none; }
#st-studio .st-view.sv-compact .sv-coach { font-size: 11.5px; white-space: normal; line-height: 1.2; max-width: 190px; }
#st-studio .st-view.sv-compact .sv-tl { flex-direction: column; gap: 6px; max-width: calc(100% - 92px); }
#st-studio .st-view.sv-compact .sv-size-face { min-width: 0; }
#st-studio .st-view.sv-compact .sv-size-v { font-size: 12.5px; }
#st-studio .st-view.sv-compact .sv-size:not(.is-empty):is(:hover, :focus-within) .sv-size-face { grid-template-rows: auto auto 0fr; }
#st-studio .st-view.sv-compact[data-tool="scale"] .sv-size:not(.is-empty) .sv-size-face { grid-template-rows: auto auto 1fr; }
#st-studio .st-view.sv-compact .sv-cube { width: 56px; height: 56px; }
#st-studio .st-view.sv-compact .sv-cube-in { left: 11px; top: 11px; width: 34px; height: 34px; }
#st-studio .st-view.sv-compact .sv-face { width: 34px; height: 34px; grid-template: 0 1fr 0 / 0 1fr 0; }
#st-studio .st-view.sv-compact .sv-z:not(.is-face) { visibility: hidden; }
#st-studio .st-view.sv-compact .f-front  { transform: translateZ(17px); }
#st-studio .st-view.sv-compact .f-back   { transform: rotateY(180deg) translateZ(17px); }
#st-studio .st-view.sv-compact .f-right  { transform: rotateY(90deg) translateZ(17px); }
#st-studio .st-view.sv-compact .f-left   { transform: rotateY(-90deg) translateZ(17px); }
#st-studio .st-view.sv-compact .f-top    { transform: rotateX(90deg) translateZ(17px); }
#st-studio .st-view.sv-compact .f-bottom { transform: rotateX(-90deg) translateZ(17px); }
#st-studio .st-view.sv-compact .sv-hist { left: auto; right: 12px; bottom: auto; top: 76px; width: 52px; height: auto; flex-direction: column; gap: 4px; transform-origin: 100% 0; }
#st-studio .st-view.sv-compact .sv-status { max-width: calc(100% - 92px); height: auto; min-height: 28px; padding: 6px 12px; white-space: normal; line-height: 16px; }
/* short viewers: fewer things at once */
#st-studio .st-view.sv-short .sv-cube { transform: scale(.75); transform-origin: 100% 0; }
#st-studio .st-view.sv-short .sv-size-face { grid-template-rows: auto auto 0fr !important; }
#st-studio .st-view.sv-short .sv-size-meta { opacity: 0 !important; }
#st-studio .st-view.sv-short.sv-compact .sv-hist { top: 58px; }

/* ---- motion, for those who asked for less ---- */
@media (prefers-reduced-motion: reduce) {
  #st-studio .st-view *, #st-studio .st-view *::before, #st-studio .st-view *::after, #st-studio .sv-pop {
    transition-property: opacity !important; transition-duration: .12s !important; transition-delay: 0s !important;
  }
  #st-studio .sv-livetag.is-tick .sv-livetag-b { animation: none; }
}

/* the empty studio: one big place to drop a file */
.st-drop {
  position: absolute; inset: 16px; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  border: 2px dashed #8a8377; border-radius: 10px; background: rgba(255,255,255,.18); padding: 24px;
}
.st-drop[hidden] { display: none; }            /* its own display rule would outrank the hidden attribute */
.st-drop { overflow: auto; }
.st-drop-art { width: min(360px, 90%); height: auto; margin: 0 0 8px; overflow: visible; }
.st-art-bed { fill: none; stroke: rgba(109,97,83,.35); stroke-width: 1; }
.st-art-banana { fill: #e2c25c; stroke: #8a6d2c; stroke-width: 1.4; stroke-linejoin: round; }
.st-art-stalk { fill: #5a4630; }
.st-art-part { fill: rgba(255,255,255,.35); stroke: #7a4c22; stroke-width: 1.6; stroke-dasharray: 5 4; }
.st-art-t { font: 600 8.5px var(--label, sans-serif); letter-spacing: .08em; text-transform: uppercase; fill: #7a4c22; }
.st-art-card { fill: #6f7f8c; stroke: #45525c; stroke-width: 1.2; }
.st-art-chip { fill: #c7a867; }
.st-drop-h { margin: 0 0 6px; font: 600 22px/1.2 var(--serif); color: #1a1714; }
.st-drop-p { margin: 0 0 16px; max-width: 440px; font: 400 14px/1.5 var(--sans); color: #4a443b; }
.st-doors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: min(560px, 100%); margin: 0 0 14px; }
.st-door {
  display: grid; grid-template-columns: 22px 1fr; gap: 3px 10px; align-items: start; text-align: left; padding: 12px 14px; border-radius: 8px; cursor: pointer;
  border: 1px solid #0c0b0a; background: linear-gradient(180deg, #2c2926 0%, #1a1816 100%); color: #f2ece2; box-shadow: 0 1px 0 rgba(255,255,255,.35), 0 3px 8px rgba(0,0,0,.2);
}
.st-door + .st-door { background: rgba(255,255,255,.5); color: #1a1714; border-color: #8a8377; box-shadow: none; }
.st-door svg { grid-row: span 2; width: 22px; height: 22px; margin: 1px 0 0; stroke: currentColor; }
.st-door b { font: 600 14.5px/1.3 var(--sans); }
.st-door span { font: 400 12px/1.4 var(--sans); opacity: .78; }
.st-door:hover { border-color: #7a4c22; }
.st-door:focus-visible { outline: 2px solid #b87333; outline-offset: 2px; }
.st-trust { display: block; max-width: 520px; margin: 0 0 8px; font: 400 13.5px/1.5 var(--sans); color: #2b2723; text-align: center; }
.st-trust > svg { display: inline-block; width: 15px; height: 15px; margin: 0 5px 0 0; vertical-align: -2px; stroke: #7a4c22; }
.st-trust .st-link { font-size: 13px; padding: 0; }
.st-sample { font-weight: 500; font-size: 13px; }
.st-how-l li b { font: 600 13px/1.35 var(--label); color: #efe4d2; }
#st-studio #st-how { width: 420px; }
@media (max-width: 820px), (max-height: 560px) {
  .st-doors { grid-template-columns: 1fr; }
  .st-drop-art { width: min(280px, 80%); }
}
.st-loading {
  position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(20,18,16,.62); color: #fff; font: 500 14px/1.4 var(--label); letter-spacing: .04em; text-align: center; padding: 20px;
}
.st-loading[hidden] { display: none; }
.st-loading i { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #b8956e; animation: st-spin 1s linear infinite; }
.st-loading.is-failed i { display: none; }
.st-loading.is-failed { background: rgba(20,18,16,.5); }
@keyframes st-spin { to { transform: rotate(360deg); } }
.st-dropping {
  position: absolute; inset: 0; z-index: 20; display: none; align-items: center; justify-content: center; pointer-events: none;
  background: rgba(139,115,85,.28); border: 3px dashed #7a4c22; border-radius: 10px;
}
.st-dropping p { margin: 0; padding: 12px 22px; border-radius: 999px; background: #1f1c18; color: #f2ece2; font: 600 15px/1 var(--sans); }
.st-plate.is-dropping .st-dropping { display: flex; }

/* ==========================================================================
   THE QUESTIONS
   ========================================================================== */
.st-ask { display: flex; flex-direction: column; min-height: 0; padding: 0 4px 0 22px; }
.st-steps { display: flex; gap: 4px; margin: 0 0 14px; padding: 0; list-style: none; }
.st-steps li { flex: 1; }
.st-steps button {
  width: 100%; display: flex; align-items: center; gap: 7px; padding: 8px 6px 9px; border: 0; border-bottom: 2px solid rgba(60,50,40,.18);
  background: none; color: #6d6153; font: 600 11px/1.1 var(--label); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; text-align: left;
}
.st-steps i { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #a49c90; font: 600 11px/1 var(--sans); font-style: normal; }
.st-steps button[aria-current="step"] { color: #1a1714; border-bottom-color: #7a4c22; }
.st-steps button[aria-current="step"] i { background: #1f1c18; border-color: #1f1c18; color: #f2ece2; }
.st-steps button.is-done i { background: #8b7355; border-color: #8b7355; color: #fff; }
.st-form { flex: 1; min-height: 0; overflow: auto; padding-right: 14px; }
.st-form[hidden] { display: none; }
.st-q { margin: 0 0 18px; }
.st-l { display: block; margin: 0 0 8px; font: 500 11px/1.2 var(--label); letter-spacing: .12em; text-transform: uppercase; color: #6d6153; }
.st-opt { text-transform: none; letter-spacing: 0; font-weight: 400; color: #8a8072; font-family: var(--sans); }
.st-form input:not([type=checkbox]):not([type=date]), .st-form select, .st-form textarea, .st-date input {
  display: block; width: 100%; margin-top: 7px; padding: 10px 12px; border: 1px solid #a49c90; border-radius: 4px;
  background: rgba(255,255,255,.55); font: 400 15px/1.3 var(--sans); color: #12100c; letter-spacing: 0; text-transform: none;
}
.st-form textarea { resize: vertical; min-height: 74px; }
.st-form input:focus, .st-form select:focus, .st-form textarea:focus { outline: 2px solid #b87333; outline-offset: 0; border-color: #b87333; }
.st-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.st-two .st-l { margin: 0; }
.st-help { margin: 7px 0 0; font: 400 12.5px/1.45 var(--sans); color: #6d6153; }
.st-err { margin: 7px 0 0; font: 500 13px/1.4 var(--sans); color: #9a2f1e; }
.st-err[hidden] { display: none; }

.st-chips, .st-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.st-chip {
  padding: 7px 12px; border-radius: 999px; border: 1px solid #a49c90; background: rgba(255,255,255,.5);
  color: #2b2723; font: 500 13.5px/1.2 var(--sans); cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.st-chip:hover { border-color: #7a4c22; }
.st-chip.is-on { background: #1f1c18; border-color: #1f1c18; color: #f2ece2; }
.st-chip:focus-visible, .st-btn:focus-visible, .st-link:focus-visible, .st-steps button:focus-visible { outline: 2px solid #b87333; outline-offset: 2px; }
.st-seg .st-chip { border-radius: 6px; }
.st-mini { padding: 5px 10px; font-size: 12.5px; }

.st-qty { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.st-qty > button { width: 38px; height: 40px; border-radius: 4px; border: 1px solid #a49c90; background: rgba(255,255,255,.5); font: 500 18px/1 var(--sans); color: #2b2723; cursor: pointer; }
.st-qty > button:hover { border-color: #7a4c22; }
.st-form .st-qty input[type=number] { display: inline-block; width: 84px; margin: 0; text-align: center; }   /* outranks the full-width field rule */
.st-qchips { display: inline-flex; gap: 5px; margin-left: 6px; flex-wrap: wrap; }

.st-check { display: flex; align-items: flex-start; gap: 9px; margin: 12px 0 0; font: 400 14px/1.4 var(--sans); color: #2b2723; cursor: pointer; }
.st-check input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: #7a4c22; }
.st-date { display: flex; align-items: center; gap: 8px; margin-top: 10px; font: 400 13.5px/1.3 var(--sans); color: #4a443b; }
.st-date input { width: auto; margin: 0; padding: 7px 10px; }

.st-files { list-style: none; margin: 0 0 6px; padding: 0; }
.st-files li { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 6px; border: 1px solid rgba(60,50,40,.16); background: rgba(255,255,255,.4); margin-bottom: 5px; }
.st-files li.is-sel { border-color: #8b7355; background: rgba(139,115,85,.14); }
.st-files li.st-none { display: block; border-style: dashed; color: #6d6153; font-size: 13px; background: none; }
.st-fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; background: none; border: 0; padding: 0; font: 500 13.5px/1.3 var(--sans); color: #1a1714; cursor: pointer; }
.st-fname:disabled { cursor: default; color: #2b2723; }
.st-fname:not(:disabled):hover { text-decoration: underline; text-decoration-color: rgba(122,76,34,.5); text-underline-offset: 3px; }
.st-files li[data-lvl] { margin-left: 16px; padding: 4px 8px; border-style: dashed; background: rgba(255,255,255,.22); }
.st-files li[data-lvl="2"] { margin-left: 30px; }
.st-files li[data-lvl] .st-fname { font-size: 13px; }
.st-fmeta { flex: 0 0 auto; font: 400 11.5px/1.3 var(--sans); color: #6d6153; }
.st-fmeta em { font-style: normal; }
.st-fmeta em.is-bad { color: #9a2f1e; }
.st-fx { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 1px solid transparent; background: none; color: #6d6153; font: 400 17px/1 var(--sans); cursor: pointer; }
.st-fx:hover { border-color: #9a2f1e; color: #9a2f1e; }
.st-mlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.st-mlist li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; border: 1px solid rgba(60,50,40,.16); background: rgba(255,255,255,.4); border-left: 3px solid #8b7355; }
.st-mlist li[data-k="show"] { border-left-color: #c9a45c; }
.st-mlist li[data-k="clean"] { border-left-color: #6f8fa8; }
.st-mlist li[data-k="fit"] { border-left-color: #b8733f; }
.st-mlist li[data-k="load"] { border-left-color: #5d6770; }
.st-mgo { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; font: 500 13px/1.4 var(--sans); color: #1a1714; }
.st-mgo b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-right: 4px; border-radius: 10px; background: #2b2723; color: #f6f1e8; font: 700 11px/1 var(--label); }
.st-mgo span { color: #6d6153; font-weight: 400; }
.st-mgo:hover { text-decoration: underline; text-decoration-color: rgba(122,76,34,.4); text-underline-offset: 3px; }
.st-mtip { margin: -6px 0 16px; }
.st-guide-l { margin: 0 0 6px; padding: 0 0 0 20px; font: 400 13.5px/1.55 var(--sans); color: #1a1714; }
.st-nocal { margin: 8px 0 10px; font: 400 13px/1.5 var(--sans); color: #2b2723; }
.st-nocal summary { cursor: pointer; font-weight: 600; color: #7a4c22; }
.st-nocal ul { margin: 6px 0 0; padding-left: 18px; }
.st-brand { margin-top: 6px; }
.st-look-sub { margin: -4px 0 8px; }
.st-look-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.st-look-l li { display: grid; grid-template-columns: 8px 1fr; gap: 10px; padding: 8px 10px; border-radius: 6px; background: rgba(255,255,255,.4); border: 1px solid rgba(60,50,40,.14); }
.st-look-l p { margin: 0; font: 400 13.5px/1.45 var(--sans); color: #1a1714; }
.st-look-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #8a9a7a; }
.st-look-l li[data-v="check"] .st-look-dot { background: #b8733f; }
.st-look-l li[data-v="you"] .st-look-dot { background: transparent; box-shadow: inset 0 0 0 2px #4f5d69; }
.st-look-l li[data-v="wait"] .st-look-dot { background: transparent; box-shadow: inset 0 0 0 1.5px #a49c90; border-top: 1.5px solid #7a4c22; animation: st-spin 1.1s linear infinite; }
.st-look-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.st-look-row:empty { display: none; }
.st-look-v { padding: 2px 8px; border-radius: 999px; font: 600 10.5px/1.5 var(--label); letter-spacing: .06em; text-transform: uppercase; color: #6d6153; box-shadow: inset 0 0 0 1px rgba(109,97,83,.35); }
.st-look-l li[data-v="check"] .st-look-v { color: #7a4c22; box-shadow: inset 0 0 0 1px rgba(122,76,34,.45); }
.st-look-row .st-chip[aria-pressed="true"] { background: #1f1c18; border-color: #1f1c18; color: #f2ece2; }
.st-look-in { width: 120px !important; margin: 0 !important; padding: 6px 10px !important; font-size: 13.5px !important; }
.st-look-f { margin-top: 8px; }

.st-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 6px;
  border: 1px solid #0c0b0a; background: linear-gradient(180deg, #2c2926 0%, #1a1816 100%); color: #f2ece2;
  font: 600 14px/1 var(--sans); letter-spacing: .02em; text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,.35), 0 3px 8px rgba(0,0,0,.25);
}
.st-btn:hover { border-color: #7a4c22; background: linear-gradient(180deg, #34302c 0%, #201d1a 100%); color: #fff; }
.st-btn.st-ghost { background: transparent; color: #2b2723; border-color: #a49c90; box-shadow: none; }
.st-btn.st-ghost:hover { border-color: #7a4c22; color: #7a4c22; }
.st-link { background: none; border: 0; padding: 4px 0; color: #7a4c22; font: 600 13.5px/1.3 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.st-link:hover { color: #1a1714; }
.st-frow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.st-link.st-quiet { font-weight: 500; font-size: 12px; color: #6d6153; text-decoration-color: rgba(109,97,83,.4); }
#st-studio #st-credits { width: 440px; }
#st-studio .st-cred-p { margin: 0 0 12px; font: 400 12.5px/1.5 var(--sans); color: var(--sv-on-dim); }
#st-studio .st-cred-l { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 7px; }
#st-studio .st-cred-l li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font: 400 13px/1.35 var(--sans); }
#st-studio .st-cred-l a { color: #efe4d2; text-decoration: underline; text-decoration-color: rgba(217,165,106,.5); text-underline-offset: 3px; }
#st-studio .st-cred-l a:hover { color: #fbf4e8; text-decoration-color: #d9a56a; }
#st-studio .st-cred-l span { color: #d9a56a; font: 500 11.5px/1.35 var(--label); }
#st-studio #st-credits :focus-visible { outline: 2px solid var(--sv-focus); outline-offset: 2px; }

.st-nav { display: flex; align-items: center; gap: 12px; padding: 12px 14px 0 0; border-top: 1px solid rgba(60,50,40,.16); margin-top: 6px; }
.st-nav[hidden] { display: none; }
.st-nav-note { flex: 1; font: 400 12px/1.35 var(--sans); color: #6d6153; }
.st-back[hidden] { display: none; }

.st-done { flex: 1; overflow: auto; padding: 6px 14px 0 0; }
.st-done[hidden] { display: none; }
.st-done h3 { margin: 6px 0 10px; font: 600 24px/1.2 var(--serif); color: #0a0a0a; }
.st-done-p { margin: 0 0 10px; font: 400 15px/1.5 var(--sans); }
.st-done-files { margin: 0 0 14px; padding: 0 0 0 18px; font: 500 14px/1.6 var(--sans); }
.st-done-files .st-none { list-style: none; margin-left: -18px; color: #6d6153; font-weight: 400; }
.st-done-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 18px; }
.st-sheetcard { display: grid; grid-template-columns: 108px 1fr; gap: 14px; align-items: start; margin: 0 0 14px; padding: 10px; border-radius: 8px; background: rgba(255,255,255,.45); border: 1px solid rgba(60,50,40,.16); }
.st-sheetimg { width: 108px; height: 140px; border-radius: 4px; overflow: hidden; background: #efe8dc; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(43,39,35,.12); }
.st-sheetimg img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.st-sheetimg span { padding: 8px; font: 400 11.5px/1.35 var(--sans); color: #6d6153; text-align: center; }
.st-sheetcard b { display: block; font: 600 14px/1.3 var(--label); color: #1a1714; }
.st-sheetcard span { display: block; margin: 3px 0 4px; font: 400 13px/1.45 var(--sans); color: #4a443b; }
.st-todo { margin: 0 0 12px; padding: 0 0 0 20px; font: 400 14.5px/1.6 var(--sans); color: #1a1714; }
.st-todo li { margin: 0 0 6px; }
.st-att { display: inline-block; margin: 0 8px 2px 0; padding: 1px 8px; border-radius: 4px; background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 1px rgba(60,50,40,.18); font: 500 13px/1.6 var(--label); }
.st-att .st-link { font-size: 12.5px; padding: 0; }
.st-bigbox { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid #7a4c22; background: rgba(255,255,255,.4); border-radius: 4px; }
.st-bigbox .st-help { margin: 0 0 4px; color: #2b2723; }
.st-didnt.is-lit { padding: 8px 10px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px #b87333; }
.st-whatnext { margin: 14px 0 6px; padding: 10px 12px; border-radius: 6px; background: #2b2723; color: #f2ece2; font: 500 13.5px/1.5 var(--sans); }

/* ---- narrower desktops ---- */
@media (max-width: 1100px) {
  .st-body { grid-template-columns: minmax(0, 1fr) 340px; }
  .st-ask { padding-left: 16px; }
  .st-two { grid-template-columns: 1fr; }
}

/* ---- a phone, or any short screen: the whole screen, the part on top, the questions under it ---- */
@media (max-width: 820px), (max-height: 560px) {
  .studio { margin: 0; }
  .st-plate { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none; }
  .st-head { padding: 14px 58px 10px 16px; }
  .st-title { font-size: 22px; }
  .st-sub { font-size: 13px; line-height: 18px; }
  .st-eyebrow { margin-bottom: 4px; }
  .st-body { display: flex; flex-direction: column; overflow: auto; padding: 0; -webkit-overflow-scrolling: touch; }
  .st-view { flex: 0 0 auto; height: 50vh; height: 50svh; min-height: 300px; border-radius: 0; }
  .st-ask { flex: 0 0 auto; min-height: auto; padding: 14px 16px 16px; }   /* the end space inside, so the sticky bar reaches the bottom edge */
  .st-form, .st-done { overflow: visible; padding-right: 0; }
  .st-nav { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); margin-top: 0;
    background: linear-gradient(180deg, rgba(226,215,201,0) 0%, #e2d7c9 22%); }
  .st-drop { inset: 10px; }
  .st-drop-h { font-size: 19px; }
  .st-two { grid-template-columns: 1fr; }
  .st-steps button { font-size: 10px; letter-spacing: .05em; }
}
/* a phone on its side: the head gets out of the way and the part takes the height of the screen */
@media (max-height: 560px) and (orientation: landscape) {
  .st-sub, .st-eyebrow { display: none; }
  .st-head { padding: 8px 56px 6px 16px; }
  .st-title { font-size: 18px; margin: 0; }
  .st-close { top: 6px; width: 32px; height: 32px; }
  .st-view { height: calc(100vh - 44px); height: calc(100svh - 44px); min-height: 260px; }
}
.st-clip { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid #7a4c22; background: rgba(255,255,255,.4); border-radius: 4px; }
.st-clip .st-help { margin: 0 0 4px; color: #2b2723; }
