/* 3D viewer app: the shared .v3 shell (../viewer.css) plus the 3D-only rules. */
/* ../viewer.css and ../toolbar.css are linked by the page before this file (site/sitegen/apps.py SHARED_CSS). */
/* 3D-only panel parts: crosshair, segmented buttons, ranges, measure list, model tree, measure labels */
.v3-canvas.v3-cross{cursor:crosshair}
.v3-seg{display:flex;gap:4px;margin-bottom:10px}
.v3-seg button{flex:1;min-height:34px;padding:4px}
@media (max-width:900px){.v3-seg button{min-height:44px}}   /* keeps the 44 px tap target of viewer.css */
.v3-seg button[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.v3-range{display:flex;flex-direction:column;gap:4px}
.v3-range span{font-size:12.5px;color:var(--muted)}
.v3-range input{width:100%;accent-color:var(--accent)}
.v3-mlist{margin:6px 0 10px;padding-left:20px}
.v3-mlist li{margin:4px 0}.v3-mlist small{display:block;color:var(--muted);font-size:12px}
.v3-parts-btns{display:flex;gap:6px;margin-bottom:8px}
.v3-tree ul{list-style:none;margin:0;padding-left:14px}
.v3-tree>ul{padding-left:0}
.v3-tree label{display:flex;gap:6px;align-items:center;padding:2px 0;cursor:pointer;font-size:13.5px}
.v3-tree label span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v3-mlabel{position:absolute;left:0;top:0;background:#ff5a1f;color:#fff;font:600 12.5px/1 var(--sans);padding:5px 8px;border-radius:8px;white-space:nowrap;box-shadow:0 2px 8px rgba(0,0,0,.25)}
/* weight / print cost and photo → lithophane panels */
.v3-in{display:flex;align-items:center;gap:6px}
.v3-in input{width:84px;font:inherit;font-size:14px;padding:4px 8px;border-radius:8px;border:1px solid var(--line);background:var(--card);color:var(--ink);text-align:right}
.v3-in select{font:inherit;font-size:14px;padding:4px 6px;border-radius:8px;border:1px solid var(--line);background:var(--card);color:var(--ink)}
.v3-in small{color:var(--muted);min-width:18px}
.v3-kv-col{flex-direction:column;align-items:stretch;gap:6px}
.v3-kv-col select{width:100%}
.v3-detail select{font-size:12.5px;text-overflow:ellipsis}
.v3-bigs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:10px 0 6px}
.v3-big{background:var(--bg2);border-radius:12px;padding:8px 10px;display:flex;flex-direction:column;gap:1px;min-width:0}
.v3-big span{font-size:11.5px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.v3-big b{font-size:18px;font-weight:700;overflow-wrap:anywhere}
.v3-big small{font-size:12px;color:var(--muted)}
.v3-cost .v3-bigs .v3-big:first-child b{color:var(--accent-text)}
.v3-more{margin-top:8px;border-top:1px dashed var(--line);padding-top:6px}
.v3-more summary{cursor:pointer;font-size:13.5px;font-weight:600;padding:4px 0}
.v3-note.warn{color:var(--warn)}
.v3-est b{font-weight:700}
.v3-small-h{font-size:12.5px;color:var(--muted);margin:8px 0 4px}
.v3-lprev{margin:0 0 10px;border-radius:12px;overflow:hidden;background:var(--bg2);display:flex;justify-content:center}
.v3-lprev img{display:block;max-width:100%;max-height:180px;object-fit:contain}
.v3-lbtns{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.v3-lbtns .primary{flex:1 1 100%}
.v3-lbtns button{min-height:44px}
.v3-litho .v3-seg button{font-size:13px}
/* laser depth map: preview canvas, 1:1 dots crop, tone curve, settings card */
.v3-lprev canvas{display:block;max-width:100%;max-height:200px;object-fit:contain}
.v3-lprev canvas.v3-dots{image-rendering:pixelated;max-height:none}
.v3-zcurve-row{display:flex;gap:10px;align-items:center}
.v3-zcurve-row>div{flex:1;display:flex;flex-direction:column;gap:6px}
.v3-zcurve{width:72px;height:72px;flex:none}
.v3-zcurve rect{fill:var(--bg2);stroke:var(--line)}
.v3-zcurve polyline{fill:none;stroke:var(--accent);stroke-width:3}
.v3-zcard{width:100%;box-sizing:border-box;font:12.5px/1.45 var(--mono,ui-monospace,monospace);padding:8px;border-radius:8px;border:1px solid var(--line);background:var(--card);color:var(--ink);resize:vertical;margin:6px 0}


/* Audit 1 Dec 2026: quick weight/cost line on plain viewer pages, and the phone strip with the key numbers over the picture */
.v3-qline{margin:0 0 4px;font-weight:600;font-size:14px;line-height:1.4}
.v3-qline.warn{color:var(--warn);font-weight:500;font-size:13px}
.v3-qcost .ul-fold{margin-top:4px}
.v3-qcost .v3-qmore .v3-cost h3{display:none}
/* the error box keeps a readable width on phones (left:50% alone shrank it to half the stage) */
.v3-err{width:min(440px,calc(100% - 32px));max-width:none;box-sizing:border-box}
/* photo pages (lithophane, relief, laser): the panel has the size and the downloads, so the toolbar's model export and the
   model section (same size again) stay out of the way */
.v3-photo .v3-bar .v3-menu,.v3-photo .v3-info{display:none}
/* STL/OBJ/PLY under ~1 mm or over ~2 m: one line above the result with the likely unit factors (panels.js scaleHint) */
.v3-scale{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:0 0 10px;padding:10px 12px;border-radius:10px;background:var(--warn-bg);color:var(--ink)}
.v3-scale p{flex:1 1 auto;margin:0 6px 0 0;font-weight:600;font-size:14px;line-height:1.4}
.v3-scale button{min-height:44px;padding:0 10px}
.v3-scale button small{color:var(--muted);font-weight:400}
.v3-cost select{max-width:100%;min-width:0;text-overflow:ellipsis}
/* units warning over the picture (units.js): warn = probably wrong units, soft = small model question, set = chosen unit */
/* a banner between the toolbar and the picture: never covers the model (judges, round 2) */
.ul-app>.v3-scale{margin:8px 10px 0;border-radius:10px}
.v3-scale.soft,.v3-scale.set{background:var(--card);border:1px solid var(--line);padding:6px 8px 6px 12px}
.v3-scale.soft p,.v3-scale.set p{flex:1 1 auto;font-weight:500;font-size:13.5px;margin:0}
.v3-scale .v3-scale-k{flex:1 1 100%;font-weight:500;font-size:13px;color:var(--muted);margin:2px 0 0}
.v3-scale-btns{display:flex;flex-wrap:wrap;gap:6px;flex:1 1 100%}
.v3-scale-to{display:flex;flex-wrap:wrap;gap:6px;align-items:center;flex:1 1 100%;font-size:13px;color:var(--muted)}
.v3-scale-to input{width:90px;min-height:40px;font:inherit;padding:4px 8px;border-radius:8px;border:1px solid var(--line);background:var(--card);color:var(--ink)}
.v3-strip.v3-under-scale{display:none!important}
.v3-convbox{display:flex;flex-direction:column;gap:8px;margin:10px 0 4px}
.v3-convbox .ul-next{margin:0}
.v3-scale[hidden]{display:none}
@media (max-width:600px){.v3-scale button{padding:0 8px;font-size:13.5px;min-height:40px}.v3-scale-to{display:none}.v3-scale .v3-scale-k{display:none}}
.v3-other summary{cursor:pointer;font-size:13.5px;color:var(--muted);text-decoration:underline;text-underline-offset:3px;padding:6px 0;list-style:none;min-height:32px}
.v3-other summary::-webkit-details-marker{display:none}
.v3-other-list{display:flex;flex-direction:column;gap:6px;margin-top:4px}
.v3-other-list button{justify-content:flex-start;text-align:left;min-height:44px}
.v3-other-list small{color:var(--muted);font-weight:400}
.v3-photo .v3-bar .v3-prim[data-export]{display:none}
/* wrong-file message inside the drop card (viewer.js / cad.js error), never over it */
.v3-drop-err{margin:12px auto 0;max-width:420px;padding:10px 12px;border-radius:10px;border-left:4px solid var(--warn);background:var(--warn-bg,#fff4ec);color:var(--ink);font-size:14px;line-height:1.45;text-align:left}
.v3-drop-err[hidden]{display:none}
/* the printer choice names its examples ("~2 mm³/s · Classic (Ender 3, Prusa MK3)"): a size smaller so the closed menu shows it whole */
.v3-cost select[data-cost="speed"]{font-size:12.5px}
.v3-ready{margin:0 0 8px;font-weight:600;color:var(--ok,#2f6b1f)}
/* which file is shown, a chip on the picture (panels.js whichLine): a sample is tagged, "Open your own file" is a real button */
.v3-which{position:absolute;z-index:5;left:12px;bottom:12px;max-width:calc(100% - 24px);display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;padding:6px 6px 6px 12px;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--card) 94%,transparent);box-shadow:0 2px 10px rgba(0,0,0,.08)}
.v3-which[hidden]{display:none}
.v3-which-t{flex:1 1 120px;min-width:0;margin:0;font-size:14px;line-height:1.35;overflow-wrap:anywhere}
.v3-which-tool{color:var(--muted)}
.v3-tag{display:inline-block;margin-right:8px;padding:2px 8px;border-radius:999px;background:var(--accent-bg);color:var(--accent-text);font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;vertical-align:1px}
.v3-which .v3-which-open{min-height:44px;padding:0 16px;font-size:14px;font-weight:600;border:1.5px solid var(--ink);border-radius:10px;background:var(--card);color:var(--ink)}
@media (max-width:860px){
  .v3-which{left:8px;right:8px;bottom:8px;max-width:none}.v3-which-t{font-size:13.5px;overflow-wrap:normal}.v3-which .v3-tag{display:table;margin:0 0 3px}.v3-which-tool{display:none}
  .v3-has-which .v3-bar .v3-sp{display:none}.v3-has-which .v3-bar>:is(.v3-prim,.v3-menu){flex:1 0 auto}.v3-has-which .v3-bar>.v3-menu>.v3-b{width:100%;justify-content:center}   /* Open moved to the picture: the bar's Download fills the row */
  .v3-which .v3-which-open{padding:0 12px;font-size:13.5px}
  .v3-convbox .v3-conv{display:none}   /* phones: the toolbar's Download is the one in view; no second orange button */
  .v3-page:not(.v3-photo) .v3-stage{height:min(60vh,100vw);min-height:320px}   /* phones: no tall empty band under the model */
}
@media (min-width:861px){.v3-page .v3-bar .v3-prim{display:none}}   /* desktop: the panel's Download sits beside the picture; no second one */
