/* ============================================================
   F13LD.mesh · ui12.css — v0.12.0 layout (Lab / Sweep pattern)
   Tokens, header, view-strip / work-area / dock grid, phone layout.
   Component styles: viewstrip.css (view strip + viewport overlays),
   rail.css (recipes, parts, welds, editor), dock.css (dock, drawer,
   progress strip, inspector).
   Mesh tool colours (brand): tile #FCEAF5 / stroke #6B0A4C; --mesh is the
   on-dark accent derived from the pair (as Lab does with #E06A6F).
   ============================================================ */
:root{
  --mesh:#E46BB0; --mesh-deep:#6B0A4C; --mesh-tile:#FCEAF5; --mesh-ink:#F3B5DA;
  --mesh-soft:rgba(107,10,76,0.34); --mesh-ring:rgba(228,107,176,0.45);
  --s1:#0c0e16; --s2:#12141f; --s3:#181b29;
  --hair:rgba(255,255,255,0.07); --hair2:rgba(255,255,255,0.13);
  --t1:#e4e6f2; --t2:#9a9fb7; --t3:#5f6582; --sec:#5f9470;
  --neon:#c8f542; --brand-green:#1D9E75; --good:#34d399; --bad:#fb7185; --warn:#f59e0b;
  --mono:'JetBrains Mono','IBM Plex Mono',ui-monospace,monospace;
}
body{font-family:'Exo 2',system-ui,sans-serif;overflow-x:hidden}
#container{max-width:1680px;margin:0 auto;width:100%}
/* header */
#hdr .fh-tool-name{color:var(--mesh)}
#hdr .fh-right{display:flex;align-items:center;gap:8px;min-width:0}
.fh-act{display:inline-flex;align-items:center;gap:6px;font:600 12.5px 'Exo 2',sans-serif;letter-spacing:.03em;padding:6px 13px;border-radius:20px;border:.5px solid #1d2030;background:transparent;color:#8a8fa8;cursor:pointer;white-space:nowrap}
.fh-act:hover{color:var(--mesh);border-color:var(--mesh)}
.fh-act svg{flex:none}
#statusPill{gap:6px;padding:3px 10px 3px 6px}
#statusPill .mdot{display:none}
#statusPill .st-wave{transform-origin:50% 50%}
#statusPill.busy .st-h{animation:stRipple 1.1s ease-in-out infinite}
#statusPill.busy .st-v{animation:stRippleV 1.1s ease-in-out infinite .28s}
@keyframes stRipple{0%,100%{transform:translateY(0)}50%{transform:translateY(-9px)}}
@keyframes stRippleV{0%,100%{transform:translateX(0)}50%{transform:translateX(9px)}}
@media (prefers-reduced-motion:reduce){#statusPill.busy .st-wave{animation:none}}
#statusPill .st-mark{flex:none}
/* recipe view = column: view strip, work area, progress, dock */
#recipeView{flex-direction:column;margin:0;gap:0;position:relative}
#workArea{flex:1;min-height:0;display:grid;grid-template-columns:300px minmax(0,1fr) 280px;gap:12px;padding:12px 14px}
#rail,#inspector{min-height:0;display:flex;flex-direction:column;gap:12px;overflow-y:auto;scrollbar-width:thin}
#previewArea{min-height:0}
#legacyHold{display:none}
#toast{position:absolute;left:50%;bottom:64px;transform:translateX(-50%);background:#141725;border:1px solid var(--mesh-ring);color:var(--t1);font:500 13px 'Exo 2',sans-serif;padding:9px 16px;border-radius:9px;z-index:60;box-shadow:0 10px 30px rgba(0,0,0,.5);opacity:0;transition:opacity .2s;pointer-events:none;max-width:calc(100% - 32px)}
#toast.on{opacity:1}
/* phone: one column, viewport first, dock stays at the bottom */
@media (max-width:860px){
  #container{height:auto;min-height:100vh}
  #hdr .fh-act .lbl,.fh-version,#hdr .fh-divider{display:none}
  #hdr .fh-act{padding:6px 8px}
  #statusPill span{display:none}
  #recipeView{flex:none}
  #workArea{grid-template-columns:minmax(0,1fr);padding:10px}
  #previewArea{order:-1;height:56vh;flex:none}
  #rail,#inspector{overflow:visible}
  #dockWrap{position:sticky;bottom:0;z-index:25}
}
/* empty state (no recipe yet) */
#dropzone{margin:14px;border-color:var(--hair2);background:radial-gradient(ellipse at 50% 40%,rgba(107,10,76,.10),transparent 60%)}
#dropzone:hover,#dropzone.dragover{border-color:var(--mesh);background:radial-gradient(ellipse at 50% 40%,rgba(107,10,76,.22),transparent 65%)}
.dz-icon{font-size:0;opacity:1;color:var(--mesh);margin-bottom:14px}
.dz-main{font:600 16px 'Exo 2',sans-serif;color:var(--t1)}
.dz-sub{font:500 12.5px var(--mono);color:var(--t3)}
.dz-pick{color:var(--mesh);font-weight:600}

/* v0.13.1: the viewer handles its own touch gestures (rotate, pinch zoom, pan) — the browser must not zoom or scroll the page from the canvas. */
#rmCanvas{touch-action:none}
/* v0.13.2: the canvas draws at up to 1.5× screen pixels (20-raymarcher.js); show it at the size of its pane.
   Without this, on high-density screens (phones, Windows scaling above 100 %) it showed at its pixel size and
   the pane cropped its right and bottom — the model sat off-centre. Absolute, so its pixel size never feeds back
   into the pane's layout. */
#rmCanvas{position:absolute;inset:0;width:100%;height:100%;display:block}
