
  /* Layout: full-bleed 3D stage, spec-sheet control column on the right (stacks below on phones). */
  :root {
    --stage: #e9e7e3; --panel: #f8f7f4; --ink: #1c1c1e; --muted: #6d6a65; --line: #dcd9d3;
    --chip: #ffffff; --sel: #1c1c1e; --sel-ink: #f8f7f4; --focus: #2b59c3; --vig: rgba(40, 36, 30, 0.16);
    --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
    --f-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
    --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
    --stage: #1b1c1e; --panel: #232427; --ink: #efeeeb; --muted: #9c9a95; --line: #36373b;
    --chip: #2c2d31; --sel: #efeeeb; --sel-ink: #1c1c1e; --focus: #8fb0ff; --vig: rgba(0, 0, 0, 0.4); color-scheme: dark; } }
  :root[data-theme="dark"] {
    --stage: #1b1c1e; --panel: #232427; --ink: #efeeeb; --muted: #9c9a95; --line: #36373b;
    --chip: #2c2d31; --sel: #efeeeb; --sel-ink: #1c1c1e; --focus: #8fb0ff; --vig: rgba(0, 0, 0, 0.4); color-scheme: dark; }

  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  html, body { height: 100%; margin: 0; }
  body { background: var(--stage); color: var(--ink); font: 14px/1.45 var(--f-body); }
  #app { display: flex; height: 100%; }
  #stage { flex: 1; position: relative; min-width: 0; }
  #stage canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
  .hud { position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); bottom: 14px; display: flex; gap: 14px; align-items: baseline;
         color: var(--muted); font: 12px var(--f-mono); pointer-events: none; }
  .hud b { color: var(--ink); font-weight: 500; }
  .vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 75% 70% at 50% 58%, transparent 40%, var(--vig) 100%); }
  #views { position: absolute; top: 14px; left: max(16px, env(safe-area-inset-left, 0px)); display: flex; gap: 6px; flex-wrap: wrap; }

  /* control centre: three steps as tabs, one pane at a time, a summary bar that is always visible */
  #panel { width: 340px; display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-left: 1px solid var(--line); }
  #panel > * { padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
  .head { padding-block: 16px 10px; }
  .head h1 { font: 700 20px/1.1 var(--f-display); font-stretch: 85%; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
  .head p { margin: 4px 0 0; color: var(--muted); font: 11.5px/1.5 var(--f-mono); }
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .steps button { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 4px; font-weight: 600; }
  .steps i { font: 600 10.5px/1 var(--f-mono); font-style: normal; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; border: 1px solid currentColor; }
  .panes { flex: 1; overflow-y: auto; padding-block: 12px 16px; min-height: 0; }
  .pane { display: grid; gap: 4px; }
  .lead { margin: 0 0 8px; color: var(--muted); font-size: 12.5px; }
  .next { margin-top: 10px; width: 100%; padding-block: 9px; font-weight: 600; }
  .sum { border-top: 1px solid var(--line); padding-block: 10px; display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--panel); }
  .sum div { display: grid; min-width: 0; line-height: 1.35; }
  .sum b { font-weight: 600; font-size: 13px; }
  .sum span { font: 11px var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
  button.primary { background: var(--sel); color: var(--sel-ink); border-color: var(--sel); font-weight: 600; flex: none; }
  .light { position: absolute; top: 14px; right: max(16px, env(safe-area-inset-right, 0px)); border: 1px solid var(--line); border-radius: 6px;
           background: color-mix(in srgb, var(--panel) 90%, transparent); backdrop-filter: blur(6px); }
  .light summary { cursor: pointer; list-style: none; padding: 7px 11px; font: 500 13px var(--f-body); }
  .light summary::-webkit-details-marker { display: none; }
  .light summary::after { content: " ▾"; color: var(--muted); }
  .light[open] { padding-bottom: 8px; }
  .light .row { padding-inline: 11px; width: 250px; grid-template-columns: 66px 1fr 40px; }
  section { border-top: 1px solid var(--line); padding-block: 12px; display: grid; gap: 8px; }
  .pane > section:first-child { border-top: 0; padding-top: 0; }
  h2 { margin: 0; font: 600 11px var(--f-body); letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }

  .seg { display: flex; flex-wrap: wrap; gap: 6px; }
  button, .file { font: 500 13px var(--f-body); color: var(--ink); background: var(--chip); border: 1px solid var(--line);
                  border-radius: 6px; padding: 7px 11px; cursor: pointer; }
  button:hover, .file:hover { border-color: var(--muted); }
  button.on { background: var(--sel); color: var(--sel-ink); border-color: var(--sel); }
  button:focus-visible, input:focus-visible, .file:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
  #views button { background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(6px); }
  #views button.on { background: var(--sel); color: var(--sel-ink); border-color: var(--sel); }

  .swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .sw { width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1px solid var(--line); position: relative; }
  .sw.on { outline: 2px solid var(--ink); outline-offset: 2px; background-clip: padding-box; }
  .sw[data-v="match"] { background: conic-gradient(var(--bagc, #d9271d) 0 50%, var(--chip) 0); }
  .swname { font: 12px var(--f-mono); color: var(--muted); margin-left: 4px; }

  .row { display: grid; grid-template-columns: 84px 1fr 58px; align-items: center; gap: 10px; }
  .row label { color: var(--muted); font-size: 12px; }
  .row output { font: 12px var(--f-mono); text-align: right; font-variant-numeric: tabular-nums; }
  input[type=range] { width: 100%; accent-color: var(--ink); }
  .check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
  .file input { display: none; }
  .note { margin: 0; color: var(--muted); font-size: 12px; }
  .moq { margin: 0; font: 12px var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
  .moq b { color: var(--ink); font-weight: 500; }
  #sizeSeg button { min-width: 44px; font-family: var(--f-mono); }
  button.ghost { background: transparent; }

  .samples { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .samples h3 { grid-column: 1 / -1; margin: 6px 0 0; font: 600 12px var(--f-body); color: var(--ink); display: flex; gap: 6px; align-items: baseline; }
  .samples h3:first-child { margin-top: 0; }
  .samples h3 span { font: 11px var(--f-mono); color: var(--muted); font-weight: 400; }
  .sample { display: flex; align-items: center; gap: 8px; text-align: left; padding: 6px 8px; min-width: 0; }
  .sample .dot { width: 18px; height: 18px; border-radius: 50%; flex: none; border: 1px solid var(--line); }
  .sample span { display: grid; min-width: 0; line-height: 1.25; }
  .sample b { font-weight: 600; font-size: 12px; text-wrap: balance; }
  .sample small { font: 10.5px var(--f-mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sample.on small { color: inherit; opacity: 0.8; }

  .editor { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: var(--chip); display: grid; place-items: center; }
  #editor { touch-action: none; display: block; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); }
  #editor:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
  .props { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
  .propsHead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  .props textarea, .props select, .props input[type=url] { font: 13px var(--f-body); color: var(--ink); background: var(--chip);
    border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; width: 100%; resize: vertical; }
  .warn { color: #b4541c; }

  @media (max-width: 760px) {
    #app { flex-direction: column; height: auto; }
    #stage { flex: none; height: 58vh; }
    #panel { width: auto; border-left: 0; border-top: 1px solid var(--line); }
    .panes { overflow: visible; }
    .sum { position: sticky; bottom: 0; padding-bottom: max(10px, env(safe-area-inset-bottom, 0px)); z-index: 5; }
    .steps { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--panel); padding-top: 8px; }
  }
  @media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

:root{color-scheme:light;font-family:Arial,sans-serif;color:#15372d;background:#fff}*{box-sizing:border-box}html,body{margin:0!important;min-height:100%;background:white!important;color:#15372d!important}body{display:grid!important;grid-template-columns:minmax(0,1fr) 330px;grid-template-rows:76px minmax(400px,1fr) 104px;height:100svh!important;overflow:auto!important}#panel,#views,.light,.hud,.vignette{display:none!important}.showcase-header{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;padding:0 40px;border-bottom:1px solid #e7ece8}.showcase-header a{color:#15372d;text-decoration:none;min-height:44px;display:flex;align-items:center;font-size:14px}.showcase-header>a:first-child{height:27px;min-height:0;overflow:hidden;align-items:flex-start}.showcase-header img{width:130px;height:auto}.showcase-tools{grid-column:2;grid-row:2/4;align-self:stretch;padding:40px 24px;background:#f7f9f5;border-left:1px solid #e7ece8;display:flex;flex-direction:column;justify-content:center;gap:28px}.showcase-intro>span{font-size:10px;font-weight:700;letter-spacing:1.8px;color:#57805e}.showcase-intro .showcase-intro-title{font-size:34px;letter-spacing:-1.5px;margin:10px 0;color:inherit;line-height:normal}.showcase-intro p{font-size:14px;line-height:1.6;margin:0;color:#617269}.bag-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.bag-choice{padding:10px 3px;border:1px solid #dce4db;border-radius:14px;background:white;color:#50675a;cursor:pointer;display:grid;justify-items:center;gap:5px;font:inherit;font-size:11px;min-height:86px;transition:background .15s,border-color .15s}.bag-choice svg{width:44px;height:44px;fill:#e7ddc4;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round}.bag-choice[aria-pressed=true]{background:#e5efdf;border-color:#238143;color:#16472a;box-shadow:0 0 0 1px #238143}.bag-choice:hover{border-color:#238143}.colour-label{font-size:12px;display:flex;justify-content:space-between;margin-bottom:12px;color:#637367}.colour-label strong{font-weight:500;color:#173e2a}.colour-choices{display:flex;gap:4px;justify-content:space-between}.colour-choice{border:2px solid transparent;background:transparent;border-radius:50%;width:42px;height:42px;padding:4px;cursor:pointer}.colour-choice span{display:block;width:100%;height:100%;border-radius:50%;box-shadow:inset 0 0 0 1px #00000012}.colour-choice[aria-pressed=true]{border-color:#238143}.colour-choice[aria-pressed=true] span:after{content:'✓';display:grid;place-content:center;height:100%;font-size:16px;color:white;text-shadow:0 1px 3px #000}#app{grid-column:1;grid-row:2;display:block!important;height:100%!important;min-height:0!important;width:100%!important}#stage{position:relative!important;width:100%!important;height:100%!important;padding:0!important;background:white!important}#stage canvas{touch-action:none}.showcase-footer{grid-column:1;grid-row:3;text-align:center;padding:0 16px 12px;color:#66766b;font-size:12px}.showcase-footer h1{font-size:20px;color:#173e2a;margin:0}.showcase-footer p{margin:6px 0}.showcase-footer button{border:1px solid #dce4db;border-radius:24px;background:#fff;color:#214730;min-height:40px;min-width:44px;padding:8px 16px;margin:2px;font:inherit;cursor:pointer}.showcase-footer button:hover{background:#eef3e9}button:focus-visible,a:focus-visible{outline:3px solid #148143;outline-offset:3px}#showcase-loading{position:fixed;inset:76px 330px 104px 0;display:grid;place-content:center;background:#fff;z-index:5;color:#345440;font-size:14px}#showcase-loading[hidden]{display:none}.showcase-tools select[hidden]{display:none!important}
@media(max-width:760px){body{grid-template-columns:100%;grid-template-rows:60px minmax(260px,1fr) 88px auto;height:100svh!important;min-height:650px}.showcase-header{padding:0 20px}.showcase-header img{width:116px}.showcase-header>a:first-child{height:24px}.showcase-header a{font-size:12px}.showcase-tools{grid-column:1;grid-row:4;padding:14px 16px max(16px,env(safe-area-inset-bottom));gap:15px;border-left:0;border-top:1px solid #e7ece8;border-radius:24px 24px 0 0}.showcase-intro{display:none}.bag-choices{grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.bag-choice{min-height:75px;padding:7px 2px;font-size:10px;border-radius:12px}.bag-choice svg{width:36px;height:36px}.colour-picker{display:flex;align-items:center;justify-content:space-between;gap:10px}.colour-label{display:grid;gap:4px;margin:0;font-size:11px;min-width:48px}.colour-choices{gap:1px}.colour-choice{width:40px;height:40px;padding:4px}.showcase-footer{padding:0 12px 7px}.showcase-footer h1{font-size:17px}.showcase-footer p{font-size:11px;margin:4px 0}.showcase-footer button{min-height:36px;padding:6px 14px}#showcase-loading{inset:60px 0 265px}}@media(max-width:350px){.colour-choice{width:35px;height:35px}.bag-choices{gap:4px}}
