/* One shared work surface for the Drawing page and its preview. */
:root {
  font-family: 'DM Sans','Noto Sans KR','Malgun Gothic',sans-serif;
  font-size: 14px;
  font-weight: 400;
  font-synthesis: none;
  color: #282c36;
  background: #edf0f2;
  --ink: #282c36;
  --muted: #66707c;
  --line: #d8dde3;
  --accent: #474e64;
  --soft: #edf0f2;
  --raised: 6px 6px 14px #b6c1cf80,-6px -6px 14px #ffffffeb;
  --inset: inset 3px 3px 6px #b9c4d273,inset -3px -3px 6px #fffffff0;
}
* { box-sizing: border-box; }
html,body { margin: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
button,input,select { font: inherit; color: inherit; }
button { cursor: pointer; transition: background .18s,border-color .18s,box-shadow .18s,color .18s; }
button:disabled { cursor: not-allowed; opacity: .48; }
button,a,input,select,summary { outline-offset: 3px; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,.dropzone:focus-visible { outline: 2px solid #637188; outline-offset: 3px; }
button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none!important; }

.lab { width: 100%; height: 100svh; min-height: 0; display: grid; grid-template-rows: minmax(0,1fr); overflow: hidden; background: radial-gradient(ellipse at 51% 0,#ffffffa8,transparent 66%),#edf0f2; }

.workspace { display: grid; grid-template-columns: 228px minmax(0,1fr) 322px; gap: 14px; padding: 0 16px 16px; min-width: 0; min-height: 0; overflow: hidden; }
.idst-simulator-page { padding: 84px 20px 12px; background: #edf0f2; }
.idst-simulator-page .lab { height: 100%; }
.idst-simulator-page .workspace { padding-left: 0; padding-right: 0; padding-bottom: 0; }
.model-workspace { display: grid; grid-template-rows: minmax(0,1fr) auto; gap: 14px; min-width: 0; min-height: 0; }
.geometry-panel { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; min-width: 0; padding: 15px 18px; border: 1px solid #ffffffd1; border-radius: 17px; background: linear-gradient(145deg,#f6f8faf2,#eaf0f5eb); box-shadow: var(--raised); }
.geometry-panel>section { min-width: 0; }
.geometry-panel .inspection-section { padding-left: 19px; border-left: 1px solid #d7dfe9; align-content: start; gap: 0 15px; }
.geometry-panel .inspection-section .section-heading { margin-bottom: 15px; }
.source-panel,.settings-panel { min-width: 0; min-height: 0; padding: 19px; border: 1px solid #ffffffde; border-radius: 20px; background: linear-gradient(145deg,#f3f6f9,#e8edf3); box-shadow: var(--raised); scrollbar-color: #bdc5cf transparent; scrollbar-width: thin; overscroll-behavior: contain; }
.source-panel { display: flex; flex-direction: column; gap: 11px; overflow: hidden; }
.settings-panel { display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.section-heading { margin: 0 0 12px; }
.section-heading h2 { color: #303541; font-size: 19px; font-weight: 500; letter-spacing: -.55px; line-height: 1.35; margin: 4px 0 0; }
.eyebrow { color: #7c8593; font-size: 9px; font-weight: 500; letter-spacing: .17em; }
.source-panel .section-heading { margin: 0 0 2px; flex-shrink: 0; }
.compact { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 9px; }
.compact h2 { margin: 0; font-size: 14px; letter-spacing: -.25px; }
.compact>span { font-size: 9px; color: #7a8390; white-space: nowrap; }

.dropzone { display: flex; flex-direction: column; justify-content: center; align-items: center; flex-shrink: 0; min-height: 148px; gap: 5px; padding: 16px 9px; border: 1px solid #fff; border-radius: 16px; background: linear-gradient(145deg,#f7f9fb,#e8ecf1); box-shadow: 4px 4px 9px #c9d0da70,-4px -4px 10px #ffffffef; cursor: pointer; text-align: center; }
.dropzone:hover,.dropzone.is-over { border-color: #a6b3c5; background: linear-gradient(145deg,#fafcff,#e4eaf3); box-shadow: 3px 3px 8px #bfc9d666,-3px -3px 9px #ffffff,0 0 0 2px #a8b9ce14; }
.dropzone { position: relative; isolation: isolate; }
.dropzone::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px #8fa4be,0 0 15px 2px #b1c3d945; opacity: .08; animation: drawing-upload-breathe 4.8s ease-in-out infinite; }
.dropzone:hover::after,.dropzone:focus-within::after,.dropzone.is-over::after { animation: none; opacity: .45; }
@keyframes drawing-upload-breathe { 0%,100% { opacity: .08; } 50% { opacity: .7; } }
.dropzone input { position: absolute; clip: rect(0,0,0,0); width: 1px; height: 1px; overflow: hidden; }
.dropzone svg { width: 39px; height: 39px; padding: 8px; margin-bottom: 4px; fill: none; stroke: #626f85; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; border-radius: 50%; background: #edf0f4; box-shadow: var(--inset); }
.dropzone strong { color: #414957; font-size: 13px; font-weight: 500; }
.dropzone>span { color: #6c7582; font-size: 11px; }
.dropzone small { color: #7b8491; font-size: 9px; margin-top: 2px; }
.upload-policy { margin: 0; font-size: 10px; line-height: 1.65; color: #697381; word-break: keep-all; flex-shrink: 0; }
.upload-privacy { margin: 0; padding: 10px 11px; border: 1px solid #ffffffb8; border-radius: 10px; background: #edf1f5; box-shadow: inset 2px 2px 4px #cbd3df55,inset -2px -2px 4px #ffffffb3; font-size: 10px; line-height: 1.7; font-weight: 500; color: #4e5c6d; word-break: keep-all; flex-shrink: 0; }
.source-card { display: flex; align-items: center; min-width: 0; gap: 10px; padding: 11px 0; border-top: 1px solid #d9dfe6; border-bottom: 1px solid #ffffffad; flex-shrink: 0; }
.file-kind { flex-shrink: 0; min-width: 35px; padding: 10px 5px; border: 1px solid #ffffffc9; border-radius: 9px; background: #edf0f4; box-shadow: var(--raised); color: #637084; font-size: 9px; font-weight: 600; text-align: center; letter-spacing: .035em; }
.source-card>div:last-child { min-width: 0; }
.source-card strong { display: block; font-size: 12px; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; color: #3c4552; }
.source-card span { display: block; color: #7a8491; font-size: 10px; line-height: 1.45; margin-top: 3px; }
.file-actions { display: flex; flex-wrap: wrap; flex-shrink: 0; gap: 6px 11px; }
.text-button { border: 0; padding: 0; background: none; color: #58667d; font-size: 11px; font-weight: 500; text-align: left; }
.text-button:hover { color: #293b57; text-decoration: underline; text-underline-offset: 3px; }
.source-status { flex-shrink: 0; font-size: 11px; line-height: 1.55; max-height: 68px; overflow: auto; color: #566f61; word-break: keep-all; }
.source-status:empty { display: none; }
.source-status[data-error=true] { color: #9c493f; background: #f9efed; padding: 9px; border: 1px solid #eedbd7; border-radius: 8px; }
.parts-heading { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; margin-top: 2px; }
.parts-heading h3 { margin: 0; font-size: 13px; color: #404957; font-weight: 500; }
.parts-heading span { color: #778395; font-size: 11px; }
.parts-list { min-height: 22px; flex: 1; overflow: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.part-row { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px solid #e1e6ed; border-radius: 6px; font-size: 11px; line-height: 1.45; color: #697587; overflow-wrap: anywhere; }
.part-row::before { content: ''; display: inline-block; flex: none; width: 6px; height: 6px; border: 1px solid #8996a8; border-radius: 1px; transform: rotate(30deg); }
.part-row.is-selected { background: #e3e9f0; color: #354b66; box-shadow: var(--inset); }
.source-foot { flex-shrink: 0; margin-top: auto; padding-top: 11px; border-top: 1px solid #dce2e9; color: #607468; font-size: 10px; line-height: 1.55; }
.source-foot small { display: block; color: #7b8491; font-size: 9px; margin-top: 3px; }
.connection-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #829a8b; box-shadow: 0 0 0 3px #cbdacf3b; margin-right: 7px; }

.viewer-panel { position: relative; min-width: 0; min-height: 0; overflow: hidden; border: 1px solid #ffffffd1; border-radius: 22px; background: radial-gradient(ellipse at 43% 30%,#fafbfc 0,#f1f3f4 44%,#e8edf1 100%); box-shadow: inset 3px 3px 8px #b9c4d13d,inset -3px -3px 8px #ffffffed,4px 5px 14px #bac5d24d; }
.viewer { position: absolute; inset: 0; touch-action: none; }
.viewer canvas { display: block; width: 100%; height: 100%; }
.idst-sim-dimension { padding: 4px 8px!important; border: 1px solid #ffffffcf; border-radius: 9px!important; background: #f6f9fcbd!important; color: #596e87!important; box-shadow: 2px 3px 8px #8090a11f; backdrop-filter: blur(8px); font-size: 11px!important; }
.viewer-top { position: absolute; z-index: 2; top: 21px; left: 22px; right: 22px; display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; }
.model-tag { padding: 5px 10px; border: 1px solid #ffffffbc; border-radius: 20px; background: #ffffff55; box-shadow: 0 2px 8px #79889a0d; color: #7b8592; font-size: 10px; backdrop-filter: blur(8px); }
.model-tag[data-kind=estimated] { color: #8d7652; border-color: #e0d7c6; background: #fffcf1dd; }
.units-tag { margin-left: auto; font-size: 9px; color: #85909d; letter-spacing: .12em; }
.units-tag b { font-size: 12px; font-weight: 500; letter-spacing: 0; color: #5e6a7d; margin-left: 5px; }
.view-modes { position: absolute; z-index: 2; bottom: 44px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; padding: 5px; border: 1px solid #ffffffd9; border-radius: 25px; background: #f7f9fba6; box-shadow: 5px 5px 16px #abb7c64d,-3px -3px 12px #ffffffab; backdrop-filter: blur(18px); }
.view-modes button { min-width: 58px; padding: 8px 14px; border: 1px solid transparent; border-radius: 18px; background: transparent; color: #6e7887; font-size: 12px; white-space: nowrap; }
.view-modes button[aria-pressed=true] { color: #f5f7fc; border-color: #565d72; background: linear-gradient(145deg,#52596e,#343a4d); box-shadow: inset 1px 1px 1px #a2a7b84a,2px 3px 7px #39445838; }
.view-controls { position: absolute; z-index: 2; right: 16px; top: 62px; display: flex; flex-direction: column; gap: 3px; padding: 5px; border: 1px solid #ffffffd9; border-radius: 16px; background: #f8faff8c; box-shadow: 4px 5px 12px #b4bfcc38,-2px -2px 8px #ffffffa6; backdrop-filter: blur(16px); }
.view-controls button { display: grid; place-items: center; width: 34px; height: 30px; padding: 0; border: 0; border-radius: 9px; background: none; color: #637188; font-size: 10px; font-weight: 500; }
.view-controls button:hover { background: #ffffff9c; box-shadow: var(--raised); }
.viewer-bottom { position: absolute; z-index: 2; bottom: 17px; left: 22px; right: 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #6a7789; pointer-events: none; }
.viewer-bottom>span:first-child { max-width: 65%; font-size: 10px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mouse-hint { font-size: 10px; color: #929aa6; }

.material-section,.dimension-section { flex-shrink: 0; }
.material-section .section-heading { display: flex; flex-direction: column; gap: 3px; margin-bottom: 13px; }
.material-section .section-heading h2 { margin: 0; }
.field-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; color: #465165; margin: 0 0 5px; }
.field-label span { font-size: 9px; color: #778498; }
select { width: 100%; height: 35px; padding: 6px 29px 6px 11px; border: 1px solid #ffffffb8; border-radius: 9px; background-color: #e9edf2; box-shadow: var(--inset); color: #465266; font-size: 11px; line-height: 1.5; }
select:focus { background-color: #f4f7fa; }
.material-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: 5px; margin: 9px 0 11px; align-items: stretch; }
.material-option { position: relative; min-width: 0; padding: 6px 2px 5px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; border: 1px solid transparent; border-radius: 10px; background: none; color: #5e6e83; font-size: 10px; line-height: 1.3; text-align: center; overflow-wrap: anywhere; }
.material-option:hover { background: #ffffff75; border-color: #fff; }
.material-option[aria-pressed=true] { color: #3e516d; background: #e8edf3; border-color: #c9d2df; box-shadow: var(--inset); font-weight: 500; }
.material-option>span:first-child { display: block; flex: none; width: 29px; height: 29px; margin: 0 auto 6px; border: 1px solid #ffffff45; border-radius: 50%; background: linear-gradient(130deg,#ffffffb8 0,#ffffff18 30%,#00000014 53%,#ffffff6e 76%,#00000018),var(--swatch); box-shadow: inset 0 1px 1px #ffffffba,inset 0 -1px 2px #0003,2px 4px 6px #6d7a8b3b; }
.material-option[aria-pressed=true]>span:first-child { outline: 1px solid #7488a4; outline-offset: 3px; }
.material-option>span:last-child { max-width: 100%; }
.material-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; line-height: 1.5; color: #7e8997; margin-top: 8px; }
.material-meta>span:first-child { color: #68788d; font-weight: 500; }
.material-meta>span:last-child { flex: none; font-variant-numeric: tabular-nums; }
.spec-note { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; margin: 7px 0 0; padding: 6px 8px; max-height: 43px; overflow: hidden; border: 1px solid #ffffffd6; border-radius: 7px; background: #e7edf3; color: #65768d; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.settings-panel section+section { border-top: 1px solid #dbe1e8; padding-top: 12px; }
.dimension-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.dimension-fields label { display: grid; grid-template-columns: 15px 1fr; align-items: center; gap: 4px; color: #7a8594; font-size: 10px; }
.dimension-fields b { color: #5c6c85; font-size: 10px; font-weight: 600; }
.dimension-fields input { grid-column: 1/-1; width: 100%; height: 33px; padding: 5px 8px; border: 1px solid #ffffffb8; border-radius: 9px; background: #e9edf2; box-shadow: var(--inset); color: #424e61; text-align: right; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.dimension-fields input:focus { background: #f4f7fb; }
.dimension-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 10px; color: #748194; }
.dimension-actions label { display: flex; align-items: center; gap: 5px; }
.dimension-actions input { width: 12px; height: 12px; margin: 0; accent-color: #76879e; }
.dimension-actions .text-button { font-size: 10px; }
.inspection-section { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; flex-shrink: 0; }
.inspection-section .section-heading { grid-column: 1/-1; }
.range-label { display: flex; justify-content: space-between; align-items: center; height: 18px; margin: 0 0 8px; font-size: 11px; color: #69768a; }
.range-label span { font-size: 10px; color: #8792a1; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 7px; border: 1px solid #ffffffab; border-radius: 10px; background: #dce2e9; box-shadow: inset 1px 2px 3px #b6bfcb70,inset -1px -1px 2px #fff; cursor: pointer; margin: 7px 0; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 19px; height: 19px; border: 1px solid #fff; border-radius: 50%; background: linear-gradient(145deg,#ffffff,#dfe5ed); box-shadow: 2px 3px 5px #9ca9bc73,-2px -2px 4px #fff; }
input[type=range]::-moz-range-thumb { width: 17px; height: 17px; border: 1px solid #fff; border-radius: 50%; background: linear-gradient(145deg,#fff,#dfe5ed); box-shadow: 2px 3px 5px #9ca9bc73,-2px -2px 4px #fff; }
input[type=range]:disabled { opacity: .43; cursor: not-allowed; }
.section-toggle input { accent-color: #7487a0; width: 12px; height: 12px; }
.settings-panel .metrics { display: grid; grid-template-columns: 1fr 1fr; flex-shrink: 0; gap: 12px; padding: 11px 13px; border: 1px solid #5b6275; border-radius: 12px; background: linear-gradient(135deg,#4c5366,#303647); box-shadow: inset 1px 1px 1px #a4abb44d,3px 4px 9px #5f6d8326; }
.metrics>div+div { padding-left: 12px; border-left: 1px solid #b4bdcd30; }
.metrics>div>span { display: block; font-size: 9px; color: #b4bece; margin-bottom: 4px; }
.metrics strong { display: block; color: #f3f5fa; font-size: 21px; font-weight: 500; line-height: 1.15; letter-spacing: -.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metrics strong small { color: #c0c9d6; font-size: 9px; font-weight: 400; letter-spacing: 0; }
.settings-panel .technical-summary { flex-shrink: 0; min-width: 0; padding: 12px; border: 1px solid #ffffffc7; border-radius: 14px; background: linear-gradient(135deg,#e7edf3,#f0f4f8); box-shadow: inset 2px 2px 5px #bdc8d459,inset -2px -2px 5px #ffffffbf; }
.technical-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.technical-heading h3 { margin: 0; color: #414d60; font-size: 13px; font-weight: 500; letter-spacing: -.3px; }
.technical-heading>span { color: #738197; font-size: 8px; letter-spacing: .09em; white-space: nowrap; }
.technical-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 13px 15px; margin: 0; }
.technical-grid>div { min-width: 0; padding: 7px 8px; border: 1px solid #ffffffb8; border-radius: 9px; background: linear-gradient(145deg,#f3f6fa,#e8edf3); box-shadow: 2px 2px 5px #b8c4d252,-2px -2px 5px #ffffffcf; }
.technical-grid dt { color: #56667d; font-size: 10px; line-height: 1.3; }
.technical-grid dt small { display: block; margin-top: 2px; color: #78879a; font-size: 8px; line-height: 1.25; }
.technical-grid dd { margin: 4px 0 0; color: #3d4d64; font-size: 18px; font-weight: 500; line-height: 1.2; letter-spacing: -.4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.technical-grid .metric-status { font-size: 14px; line-height: 1.55; letter-spacing: -.2px; }
.mesh-detail { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; padding-top: 9px; border-top: 1px solid #dce3eb; font-size: 10px; color: #66768c; }
.mesh-detail small { margin-left: 5px; font-size: 8px; color: #7b8a9e; }
.mesh-detail strong { font-size: 11px; font-weight: 500; color: #4b5c74; font-variant-numeric: tabular-nums; }
.model-summary { margin: 7px 0 0; color: #728298; font-size: 9px; line-height: 1.4; }
.export-controls { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); flex-shrink: 0; gap: 7px; margin-top: auto; padding-top: 2px; }
.export-controls button { display: flex; justify-content: center; align-items: center; gap: 5px; min-width: 0; height: 36px; padding: 5px 3px; border: 1px solid #ffffffcf; border-radius: 10px; background: linear-gradient(145deg,#f7f9fb,#e8edf2); box-shadow: 4px 4px 8px #b4c0ce80,-4px -4px 8px #ffffffeb; color: #536780; font-size: 10px; font-weight: 500; white-space: nowrap; }
.export-controls button:first-child { color: #3e516d; border-color: #c4cfdc; background: linear-gradient(145deg,#f4f7fb,#dde5ef); }
.export-controls button:hover { border-color: #aabbd0; box-shadow: var(--inset); }
.export-controls button svg { width: 12px; height: 12px; }

.busy-layer { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 15px; padding: 25px; background: radial-gradient(ellipse at 50% 35%,#454c5e 0,#2e3545 48%,#232a37 100%); color: #f3f6fc; text-align: center; }
.busy-layer strong { margin-top: 17px; font-size: 20px; font-weight: 500; letter-spacing: -.4px; }
.busy-layer>span { max-width: 390px; font-size: 13px; line-height: 1.8; color: #c5cedd; }
.busy-layer .busy-file { max-width: 90%; font-size: 11px; color: #a8b4c7; overflow-wrap: anywhere; }
.busy-layer>button { margin-top: 8px; padding: 8px 24px; border: 1px solid #8793a866; border-radius: 18px; color: #d5deed; background: #ffffff07; font-size: 12px; }
.busy-layer>button:hover { background: #ffffff12; }
.brand-stage { position: relative; display: grid; place-items: center; width: 166px; height: 166px; border: 1px solid #b8c6dd2b; border-radius: 50%; box-shadow: inset 5px 5px 16px #151a2530,inset -5px -5px 16px #8492ae12; }
.brand-stage::after { content: ''; position: absolute; inset: -6px; border: 1px solid transparent; border-top-color: #d8e4fa; border-right-color: #9aaac338; border-radius: 50%; animation: brand-processing 2.6s linear infinite; }
.brand-stage img { width: 118px; height: 118px; object-fit: contain; }
.brand-stage canvas { position: absolute; width: 180px; height: 180px; inset: -7px; }
.busy-timing { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 20px; width: fit-content; max-width: 100%; padding: 10px 17px; border: 1px solid #a9bbd438; border-radius: 12px; background: #ffffff07; color: #c8d2e4; font-size: 12px; line-height: 1.7; font-variant-numeric: tabular-nums; white-space: pre-wrap; box-shadow: inset 2px 2px 7px #1018271a; }
.busy-timing strong,.busy-timing b { margin: 0; font-size: 14px; font-weight: 500; color: #eef4ff; letter-spacing: 0; }
.busy-timing span { white-space: nowrap; }
.busy-timing small { color: #a8b8d0; font-size: 10px; }
.viewer-error { position: absolute; z-index: 3; inset: 20%; display: flex; flex-direction: column; justify-content: center; gap: 15px; color: #4d5c72; text-align: center; font-size: 15px; }
.viewer-error span { font-size: 13px; line-height: 1.7; }
@keyframes brand-processing { to { transform: rotate(360deg); } }

.original-dialog,.info-dialog { width: min(1000px,94vw); height: 88svh; max-height: 88svh; overflow: hidden; padding: 0; border: 1px solid #ffffffc9; border-radius: 20px; background: #f3f5f8; color: #364357; box-shadow: 0 18px 70px #0f1e3d38; }
.info-dialog { width: min(820px,94vw); height: auto; max-height: 84svh; }
.original-dialog::backdrop,.info-dialog::backdrop { background: #29344c73; backdrop-filter: blur(8px); }
.original-dialog header,.info-dialog header { display: flex; justify-content: space-between; align-items: center; height: 54px; padding: 0 23px; border-bottom: 1px solid #d8e0e8; background: #f8f9fb; font-size: 14px; }
.original-dialog header strong,.info-dialog header strong { font-weight: 500; }
.original-dialog header button,.info-dialog header button { border: 0; background: none; font-size: 28px; color: #758296; }
.original-dialog #original-content { display: grid; place-items: center; height: calc(100% - 54px); overflow: auto; }
.original-dialog iframe { width: 100%; height: 100%; border: 0; }
.original-dialog img { max-width: 100%; max-height: 100%; object-fit: contain; }
.info-content { max-height: calc(84svh - 54px); padding: 25px; overflow: auto; overscroll-behavior: contain; }
.analysis-lead h2 { font-size: 22px; font-weight: 500; letter-spacing: -.5px; margin: 7px 0 12px; }
.analysis-lead p { margin: 0 0 20px; color: #5f6c7d; font-size: 14px; line-height: 1.8; word-break: keep-all; }
.analysis-details { display: grid; gap: 18px; }
.analysis-details>div { padding-left: 16px; border-left: 2px solid #c6d3e2; }
.analysis-details span { display: block; color: #8090a4; font-size: 11px; margin: 0 0 4px; }
.analysis-details strong { color: #415775; font-size: 14px; font-weight: 500; line-height: 1.6; }
.analysis-details p { color: #5e6e82; font-size: 13px; line-height: 1.8; margin: 6px 0 0; word-break: keep-all; }
.calculation-notes { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.calculation-notes h3 { margin: 0; font-size: 14px; font-weight: 500; }
.calculation-notes p,.formats p { color: #69768a; font-size: 13px; line-height: 1.8; margin: 8px 0; }
.formats dl { margin: 0 0 20px; font-size: 14px; line-height: 1.75; }
.formats dt { font-weight: 500; margin-top: 16px; }
.formats dt:first-child { margin-top: 0; }
.formats dd { color: #627287; margin: 4px 0; }

/* The complete desktop control set fits the available screen height. */
@media(min-width:1025px) and (max-height:820px) {
  .workspace { gap: 11px; padding: 0 12px 12px; grid-template-columns: 218px minmax(0,1fr) 306px; }
  .source-panel,.settings-panel { padding: 13px 15px; border-radius: 17px; }
  .source-panel { gap: 8px; }
  .settings-panel { gap: 9px; }
  .model-workspace { gap: 11px; }
  .geometry-panel { gap: 14px; padding: 11px 14px; border-radius: 15px; }
  .geometry-panel .inspection-section { padding-left: 13px; gap: 0 12px; }
  .geometry-panel .inspection-section .section-heading { margin-bottom: 10px; }
  .section-heading h2 { font-size: 17px; }
  .eyebrow { font-size: 8px; }
  .dropzone { min-height: 115px; padding: 10px 7px; gap: 4px; border-radius: 13px; }
  .dropzone svg { width: 32px; height: 32px; padding: 6px; margin-bottom: 1px; }
  .dropzone strong { font-size: 12px; }
  .dropzone>span { font-size: 10px; }
  .upload-policy { font-size: 10px; line-height: 1.55; }
  .upload-privacy { padding: 5px 9px; line-height: 1.6; }
  .source-card { padding: 8px 0; gap: 8px; }
  .source-card strong { font-size: 12px; }
  .source-card span { font-size: 10px; }
  .file-kind { padding: 8px 4px; font-size: 8px; }
  .text-button { font-size: 10px; }
  .part-row { font-size: 10px; padding: 6px 5px; }
  .parts-heading h3 { font-size: 12px; }
  .source-foot { padding-top: 8px; font-size: 10px; }
  .source-foot small { font-size: 9px; }
  .material-section .section-heading { gap: 2px; margin-bottom: 8px; }
  .material-section .section-heading h2 { font-size: 17px; }
  .field-label { font-size: 11px; margin-bottom: 4px; }
  .field-label span { font-size: 9px; }
  select { height: 32px; font-size: 11px; padding: 4px 23px 4px 9px; border-radius: 8px; }
  .material-grid { margin: 6px 0 8px; gap: 4px; }
  .material-option { padding: 6px 2px 5px; font-size: 10px; border-radius: 8px; }
  .material-option>span:first-child { width: 24px; height: 24px; margin-bottom: 5px; }
  .material-meta { margin-top: 5px; font-size: 10px; }
  .spec-note { margin-top: 6px; padding: 3px 6px; max-height: 35px; font-size: 9px; line-height: 1.5; }
  .settings-panel section+section { padding-top: 9px; }
  .compact { margin-bottom: 7px; }
  .compact h2 { font-size: 13px; }
  .compact>span { font-size: 8px; }
  .dimension-fields { gap: 7px; }
  .dimension-fields label { gap: 3px; font-size: 9px; }
  .dimension-fields input { height: 29px; font-size: 13px; border-radius: 8px; }
  .dimension-actions { margin-top: 6px; font-size: 9px; }
  .dimension-actions .text-button { font-size: 9px; }
  .range-label { height: 16px; margin-bottom: 5px; font-size: 10px; }
  .range-label span { font-size: 9px; }
  input[type=range] { margin: 6px 0; height: 6px; }
  input[type=range]::-webkit-slider-thumb { width: 17px; height: 17px; }
  .settings-panel .metrics { padding: 9px 11px; }
  .metrics>div>span { font-size: 8px; margin-bottom: 3px; }
  .metrics strong { font-size: 19px; }
  .metrics strong small { font-size: 8px; }
  .technical-heading { margin-bottom: 7px; }
  .technical-heading h3 { font-size: 12px; }
  .technical-heading>span { font-size: 7px; }
  .settings-panel .technical-summary { padding: 10px; }
  .technical-grid { gap: 7px 12px; }
  .technical-grid>div { padding: 5px 6px; }
  .technical-grid dt { font-size: 9px; }
  .technical-grid dt small { display: inline; margin-top: 0; margin-left: 3px; font-size: 8px; }
  .technical-grid dd { margin-top: 3px; font-size: 15px; }
  .technical-grid .metric-status { font-size: 12px; line-height: 1.5; }
  .technical-foot { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-top: 8px; padding-top: 7px; border-top: 1px solid #dce3eb; }
  .mesh-detail { margin-top: 0; padding-top: 0; border: 0; font-size: 9px; }
  .mesh-detail small { display: none; }
  .mesh-detail strong { font-size: 10px; }
  .model-summary { margin: 0; max-width: 126px; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .export-controls { gap: 6px; }
  .export-controls button { height: 33px; font-size: 10px; gap: 4px; border-radius: 8px; }
  .export-controls button svg { width: 11px; height: 11px; }
}
@media(min-width:1025px) and (max-height:590px) {
  .source-panel,.settings-panel { padding: 11px 13px; }
  .settings-panel { gap: 7px; }
  .material-section .section-heading { flex-direction: row; align-items: baseline; gap: 10px; margin-bottom: 7px; }
  .material-section .section-heading .eyebrow { order: 1; font-size: 7px; letter-spacing: .07em; }
  .material-section .section-heading h2 { font-size: 15px; }
  .dropzone { min-height: 98px; }
  .dropzone svg { width: 26px; height: 26px; padding: 5px; }
  .source-panel { gap: 7px; }
  .source-panel .section-heading { display: flex; gap: 9px; align-items: baseline; }
  .source-panel .section-heading h2 { font-size: 15px; margin: 0; }
  .source-panel .section-heading .eyebrow { order: 1; font-size: 7px; }
  .material-grid { margin: 5px 0 6px; }
  .material-option { font-size: 8px; }
  .material-option>span:first-child { width: 22px; height: 22px; margin-bottom: 4px; }
  .settings-panel section+section { padding-top: 7px; }
  .compact { margin-bottom: 5px; }
  .settings-panel .metrics { padding: 7px 10px; }
  .metrics strong { font-size: 17px; }
  .dimension-fields input { height: 27px; }
  .dimension-actions { margin-top: 5px; }
  .export-controls button { height: 29px; }
  .source-status { max-height: 46px; font-size: 10px; }
  .spec-note { max-height: 28px; font-size: 8px; }
  .technical-heading { margin-bottom: 6px; }
  .settings-panel .technical-summary { padding: 8px; }
  .technical-grid { gap: 6px 10px; }
  .technical-grid dt small { display: none; }
  .technical-grid dd { font-size: 13px; }
  .technical-grid .metric-status { font-size: 11px; line-height: 1.4; }
  .technical-foot { margin-top: 6px; padding-top: 5px; }
  .geometry-panel { padding-top: 9px; padding-bottom: 9px; }
}
@media(min-width:1500px) and (min-height:850px) {
  .workspace { grid-template-columns: 256px minmax(0,1fr) 356px; gap: 20px; padding: 0 22px 22px; }
  .source-panel,.settings-panel { padding: 24px; gap: 19px; border-radius: 23px; }
  .dropzone { min-height: 172px; }
  .upload-policy { font-size: 11px; line-height: 1.75; }
  .source-card strong { font-size: 13px; }
  .part-row { font-size: 12px; padding: 10px 7px; }
  .field-label { font-size: 12px; }
  select { height: 39px; font-size: 12px; }
  .material-grid { margin: 13px 0 17px; }
  .material-option { font-size: 11px; padding: 8px 3px; }
  .material-option>span:first-child { width: 34px; height: 34px; margin-bottom: 8px; }
  .material-meta { font-size: 11px; }
  .dimension-fields input { height: 38px; font-size: 16px; }
  .compact h2 { font-size: 15px; }
  .metrics strong { font-size: 26px; }
  .metrics>div>span { font-size: 10px; }
  .settings-panel .metrics { padding: 16px; }
  .technical-heading { margin-bottom: 15px; }
  .technical-heading h3 { font-size: 14px; }
  .technical-grid { gap: 17px 18px; }
  .technical-grid>div { padding: 9px; }
  .technical-grid dt { font-size: 11px; }
  .technical-grid dt small { font-size: 9px; }
  .technical-grid dd { font-size: 21px; }
  .technical-grid .metric-status { font-size: 15px; }
  .mesh-detail { margin-top: 17px; padding-top: 11px; font-size: 11px; }
  .mesh-detail strong { font-size: 12px; }
  .model-summary { font-size: 10px; }
  .export-controls button { height: 41px; font-size: 11px; }
}
@media(min-width:1025px) {
  .view-modes { top: 19px; bottom: auto; }
}
@media(min-width:1025px) and (max-width:1170px) {
  .workspace { grid-template-columns: 200px minmax(0,1fr) 294px; gap: 10px; }
  .source-panel,.settings-panel { padding-left: 12px; padding-right: 12px; }
  .mouse-hint { display: none; }
  .geometry-panel { grid-template-columns: 1fr; gap: 10px; }
  .geometry-panel .inspection-section { padding-left: 0; border-left: 0; grid-template-columns: 1fr 1fr; }
  .geometry-panel .inspection-section .section-heading { display: none; }
}

/* On narrow screens, the workspace scrolls while the page stays in one viewport. */
@media(max-width:1024px) {
  html,body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  .lab { height: 100svh; min-height: 0; display: grid; grid-template-rows: minmax(0,1fr); overflow: hidden; }
  .workspace { grid-template-columns: minmax(0,1fr) 310px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 0 14px 16px; gap: 13px; }
  .idst-simulator-page { padding: 76px 14px 12px; }
  .idst-simulator-page .lab { height: 100%; }
  .model-workspace { min-height: 650px; grid-template-rows: minmax(400px,1fr) auto; }
  .geometry-panel { grid-template-columns: 1fr; gap: 17px; }
  .geometry-panel .inspection-section { border-left: 0; padding-left: 0; }
  .source-panel { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; overflow: visible; }
  .source-panel .section-heading { grid-column: 1/-1; display: flex; align-items: baseline; gap: 12px; }
  .source-panel .section-heading h2 { margin: 0; }
  .dropzone { grid-row: 2/5; min-height: 138px; }
  .upload-privacy { grid-column: 1/-1; grid-row: 5; }
  .upload-policy { grid-column: 2; grid-row: 2; }
  .source-card { grid-column: 2; grid-row: 3; }
  .source-card { padding: 0; border: 0; }
  .source-status,.file-actions,.source-foot { grid-column: 1/-1; }
  .parts-heading,.parts-list { display: none; }
  .source-foot { padding-top: 8px; }
  .viewer-panel { min-height: 400px; }
  .settings-panel { gap: 14px; overflow: visible; }
  .spec-note { max-height: none; }
  .mouse-hint { display: none; }
  .export-controls { margin-top: 7px; }
}
@media(max-width:600px) {
  .workspace { display: flex; flex-direction: column; gap: 13px; padding: 0 12px 16px; }
  .idst-simulator-page { padding: 70px 10px calc(82px + env(safe-area-inset-bottom,0px)); }
  .source-panel,.model-workspace,.settings-panel { flex-shrink: 0; }
  .model-workspace { min-height: 0; grid-template-rows: 445px auto; }
  .geometry-panel { padding: 19px 20px; }
  .source-panel { padding: 17px 15px; gap: 11px 14px; }
  .source-panel .section-heading h2 { font-size: 17px; }
  .dropzone { min-height: 144px; padding: 12px 6px; }
  .dropzone strong { font-size: 12px; }
  .dropzone>span { font-size: 10px; }
  .dropzone small { font-size: 9px; }
  .upload-policy { font-size: 10px; line-height: 1.65; }
  .source-card strong { font-size: 11px; }
  .source-card span { font-size: 9px; }
  .file-kind { min-width: 29px; padding: 7px 3px; font-size: 8px; }
  .viewer-panel { min-height: 445px; border-radius: 19px; }
  .viewer-top { top: 16px; left: 16px; right: 16px; }
  .view-controls { top: 57px; right: 12px; }
  .viewer-bottom { left: 17px; right: 17px; }
  .viewer-bottom>span:first-child { max-width: 95%; }
  .view-modes { bottom: 43px; }
  .view-modes button { min-width: 55px; padding: 8px 13px; }
  .settings-panel { padding: 22px 20px; gap: 19px; }
  .section-heading h2 { font-size: 20px; }
  .material-section .section-heading { margin-bottom: 16px; }
  .field-label { font-size: 12px; margin-bottom: 7px; }
  .field-label span { font-size: 10px; }
  select { height: 41px; font-size: 12px; }
  .material-grid { margin: 12px 0 17px; gap: 6px; }
  .material-option { padding: 9px 3px; font-size: 11px; }
  .material-option>span:first-child { width: 31px; height: 31px; margin-bottom: 8px; }
  .material-meta { font-size: 11px; }
  .spec-note { font-size: 11px; padding: 8px 9px; margin-top: 10px; }
  .compact { margin-bottom: 12px; }
  .compact h2 { font-size: 15px; }
  .compact>span { font-size: 10px; }
  .dimension-fields { gap: 10px; }
  .dimension-fields input { height: 40px; font-size: 16px; }
  .dimension-fields label,.dimension-fields b,.dimension-actions,.dimension-actions .text-button { font-size: 11px; }
  .range-label { font-size: 12px; margin-bottom: 10px; }
  .range-label span { font-size: 11px; }
  .settings-panel .metrics { padding: 15px; }
  .technical-grid dt { font-size: 11px; }
  .technical-grid dt small { font-size: 9px; }
  .technical-grid dd { font-size: 20px; }
  .technical-grid .metric-status { font-size: 15px; }
  .technical-heading h3 { font-size: 14px; }
  .mesh-detail { font-size: 11px; }
  .model-summary { font-size: 10px; }
  .metrics>div>span { font-size: 10px; }
  .metrics strong { font-size: 25px; }
  .metrics strong small { font-size: 10px; }
  .export-controls button { height: 42px; font-size: 11px; }
  .info-content { padding: 20px; }
  .busy-layer { padding: 20px; gap: 13px; }
  .busy-layer strong { font-size: 18px; line-height: 1.5; }
  .busy-layer>span { font-size: 12px; }
  .busy-timing { padding: 8px 12px; gap: 5px 12px; font-size: 11px; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
}
