/* ═══════════════════════════════════════
   Fonts
═══════════════════════════════════════ */
@font-face { font-family:'Onest'; src:url('/fonts/Onest-Thin.ttf') format('truetype'); font-weight:100; font-display:swap; }
@font-face { font-family:'Onest'; src:url('/fonts/Onest-ExtraLight.ttf') format('truetype'); font-weight:200; font-display:swap; }
@font-face { font-family:'Onest'; src:url('/fonts/Onest-Light.ttf') format('truetype'); font-weight:300; font-display:swap; }
@font-face { font-family:'Onest'; src:url('/fonts/Onest-Regular.ttf') format('truetype'); font-weight:400; font-display:swap; }
@font-face { font-family:'Onest'; src:url('/fonts/Onest-Medium.ttf') format('truetype'); font-weight:500; font-display:swap; }
@font-face { font-family:'Onest'; src:url('/fonts/Onest-SemiBold.ttf') format('truetype'); font-weight:600; font-display:swap; }
@font-face { font-family:'Onest'; src:url('/fonts/Onest-Bold.ttf') format('truetype'); font-weight:700; font-display:swap; }
@font-face { font-family:'Onest'; src:url('/fonts/Onest-ExtraBold.ttf') format('truetype'); font-weight:800; font-display:swap; }
@font-face { font-family:'Onest'; src:url('/fonts/Onest-Black.ttf') format('truetype'); font-weight:900; font-display:swap; }

/* ═══════════════════════════════════════
   Themes & Base Styles
═══════════════════════════════════════ */
[data-theme="dark"] {
  --ink:       #1A1D23;
  --ink-2:     #22262E;
  --darkio: #000000;
  --ink-3:     #2C313B;
  --ink-4:     #363C48;
  --ink-5:     #434A58;
  --ink-6:     #5A6272;
  --zinc:      #8492A6;
  --slate:     #B0BCCD;
  --fog:       #D8E0EA;
  --frost:     #F0F4F8;
  --steel:     #3A6186;
  --steel-2:   #2D4E6B;
  --steel-lt:  #1D3247;
  --steel-bd:  #4A7AA0;
  --steel-txt: #7BAFD0;
  --amber:     #E35e06;
  --amber-2:   #E35e06;
  --amber-dk:  #C47800;
  --amber-bg:  #1E1500;
  --amber-bd:  #5C3800;
  --bg:        var(--ink);
  --sidebar:   var(--ink-2);
  --card:      var(--ink-3);
  --input-bg:  var(--ink-4);
  --border:    var(--ink-5);
  --border-lt: var(--ink-6);
  --txt:       var(--fog);
  --txt-2:     var(--slate);
  --txt-3:     var(--zinc);
  --success:   #3DBA7E;
  --success-bg:#0B1F15;
  --warn:      #E8932A;
  --warn-bg:   #1E1100;
  --error:     #E05050;
  --vp-bg: radial-gradient(ellipse 55% 50% at 50% 50%, rgba(58,97,134,0.14) 0%, transparent 70%),
           linear-gradient(175deg, #141720 0%, #0F1218 60%, #13161D 100%);
  --overlay-bg: rgba(10,13,18,0.88);
  --ctrl-btn-bg: rgba(22,26,35,0.85);
  --theme-icon-moon: block;
  --theme-icon-sun: none;
}


[data-theme="light"] {
  --ink:       #F5F7FA;
  --ink-2:     #EBEEF3;
  --ink-3:     #DDE2EA;
  --ink-4:     #CDD4DE;
  --ink-5:     #B8C2CF;
  --ink-6:     #9AAAB8;
  --zinc:      #6B7A8D;
  --slate:     #3D4F63;
  --fog:       #1E2A38;
  --frost:     #0F1820;
  --steel:     #3A6186;
  --steel-2:   #C8DAEA;
  --steel-lt:  #D8EAFA;
  --steel-bd:  #7BAFD0;
  --steel-txt: #2460A0;
  --amber:     #e37739;
  --amber-2:   #D08800;
  --amber-dk:  #A05E00;
  --amber-bg:  #FFF5DE;
  --amber-bd:  #E8C060;
  --bg:        var(--ink);
  --sidebar:   var(--ink-2);
  --card:      var(--ink-3);
  --input-bg:  #FFFFFF;
  --border:    var(--ink-5);
  --border-lt: var(--ink-6);
  --txt:       var(--fog);
  --txt-2:     var(--slate);
  --txt-3:     var(--frost);
  --success:   #1F8F5A;
  --success-bg:#D6F5E8;
  --warn:      #B85F00;
  --warn-bg:   #FFF0DC;
  --error:     #C03030;
  --color-info-dark: #006fff;
  --color-info-deep: #2b71cb;
  --color-info: #016fff;
  --color-info-transparent-900: rgba(1, 111, 255, .9);
  --color-info-transparent-800: rgba(1, 111, 255, .8);
  --color-info-transparent-600: rgba(1, 111, 255, .6);
  --color-info-medium: #51a0fa;
  --color-info-medium-deep: #559cbe;
  --color-info-light: #7aaeee;
  --color-info-light-base: #57c5f7;
  --color-info-light-plus: #96dbfa;
  --color-info-light-medium: #abe2fb;
  --color-info-light-soft: #c8e5ff;
  --color-info-light-extra: #e6effe;
  --color-info-light-extra-soft: #d1e1ee;
  --color-info-light-overlay-500: rgba(215, 245, 255, .5);
  --color-info-lighter: #f5fafe;
  --color-info-lighter-soft: #e8f0fa;
  --color-info-lightest: #eaf0f5;
  --color-info-lightest-transparent-900: rgba(234, 240, 245, .9);
  --color-info-lightest-transparent-700: rgba(234, 240, 245, .7);
  --color-info-lightest-transparent-240: rgba(234, 240, 245, .24);
  --color-info-lightest-lighten: #f5f8fa;
  --color-info-bright: #24affc;
  --color-info-overlay: rgba(0, 26, 79, .08);
  --color-info-400: #2784ff;
  --color-info-accent: #50acf8;
  --color-danger: #f21827;
  --color-danger-transparent-900: rgba(242, 24, 39, .9);
  --color-danger-transparent-800: rgba(242, 24, 39, .8);
  --color-danger-transparent-50: rgba(242, 24, 39, .05);
  --color-danger-lighten: #f98c93;
  --color-danger-light: #eb5757;
  --color-danger-lighter: #fee;
  --color-danger-lighter-extra: #fff4f4;
  --color-danger-lightest: #f5eaea;
  --color-danger-lightest-transparent-700: hsla(0, 35%, 94%, .7);
  --color-danger-lightest-transparent-400: hsla(0, 35%, 94%, .4);
  --color-danger: red;
  --color-danger-bright-plus: #f21828;
  --vp-bg: radial-gradient(ellipse 55% 50% at 50% 50%, rgba(58,97,134,0.08) 0%, transparent 70%),
           linear-gradient(175deg, #E8EDF4 0%, #DDE3EC 60%, #E4E8F0 100%);
  --overlay-bg: rgba(240,244,248,0.88);
  --ctrl-btn-bg: rgba(235,238,243,0.92);
  --theme-icon-moon: none;
  --theme-icon-sun: block;
}


:root {
  --font:  'Onest', system-ui, sans-serif;
  --mono:  'Google Sans', 'Onest', system-ui, sans-serif;
  --r:     15px;
  --r-lg:  8px;
  --r-xl:  12px;
  --sh-sm: 0 1px 4px rgba(0,0,0,0.12);
  --sh:    0 4px 16px rgba(0,0,0,0.15);
  --sh-lg: 0 10px 40px rgba(0,0,0,0.2);
  --sidebar-w: 340px;
  --panel-w:   320px;
  --bar-h:     48px;
}

*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
html { font-size:13px; -webkit-text-size-adjust:100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--txt);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s, color 0.2s;
}
input, button, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }


.topbar {
  height: var(--bar-h);
  background: var(--ink-2);
  border-bottom: 1px solid var(--ink-5);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 0;
  flex-shrink: 0;
  z-index: 200;
  transition: background 0.2s, border-color 0.2s;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 28px; height: 28px;
  background: var(--amber);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { width: 14px; height: 14px; color: var(--ink); }
.logo-name { font-size: 14px; font-weight: 800; color: var(--frost); letter-spacing: -0.03em; line-height: 1; }
.logo-name em { font-style: normal; font-weight: 300; color: var(--zinc); }
.logo-rule { width: 1px; height: 20px; background: var(--ink-5); margin: 0 16px; }
.topbar-nav { display: flex; gap: 2px; }
.topbar-nav-item {
  padding: 5px 11px;
  font-size: 11.5px; font-weight: 500;
  color: var(--zinc); border-radius: var(--r);
  cursor: pointer; transition: all 0.1s;
  letter-spacing: 0.01em; border: 1px solid transparent;
}
.topbar-nav-item:hover { color: var(--slate); background: var(--ink-3); }
.topbar-nav-item.active {
  color: var(--amber); background: var(--amber-bg);
  border-color: var(--amber-bd); font-weight: 600;
}
.topbar-fill { flex: 1; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
/* .theme-toggle {
  width: 30px; height: 30px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--txt-3);
  transition: all 0.15s;
} */
.theme-toggle:hover { color: var(--amber); border-color: var(--amber-bd); background: var(--amber-bg); }
.theme-toggle svg { width: 15px; height: 15px; }
.icon-moon { display: var(--theme-icon-moon, block); }
.icon-sun  { display: var(--theme-icon-sun, none); }
.tbtn {
  height: 30px; padding: 0 14px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  cursor: pointer; border-radius: var(--r);
  transition: all 0.1s; display: flex; align-items: center; gap: 6px;
}
.tbtn-ghost { background: transparent; color: var(--txt-3); border: 1px solid var(--border); }
.tbtn-ghost:hover { color: var(--fog); border-color: var(--border-lt); background: var(--ink-3); }
.tbtn-accent { background: var(--amber); color: #fff; border: 1px solid var(--amber); font-weight: 700; }
[data-theme="dark"] .tbtn-accent { color: var(--ink); }
.tbtn-accent:hover { background: var(--amber-2); border-color: var(--amber-2); }


.workspace { display: flex; flex: 1; overflow: hidden; min-height: 0; }


.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--sidebar); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
  transition: background 0.2s, border-color 0.2s;
}
.sb-head { padding: 14px 20px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.sb-head-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.sb-title { font-size: 15px; font-weight: 800; color: var(--frost); letter-spacing: -0.03em; }
.sb-subtitle { font-size: 9.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--txt-3); font-family: var(--mono); }
.type-row { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.type-btn {
  padding: 6px; text-align: center;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--txt-3); background: var(--input-bg);
  border: 1px solid var(--border); border-radius: var(--r);
  cursor: pointer; transition: all 0.1s;
}
.type-btn:hover { color: var(--slate); border-color: var(--border-lt); }
.type-btn.sel-active { background: var(--amber); color: #fff; border-color: var(--amber); font-weight: 800; }
[data-theme="dark"] .type-btn.sel-active { color: var(--ink); }

.sb-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; }
.sb-scroll::-webkit-scrollbar { width: 4px; }
.sb-scroll::-webkit-scrollbar-track { background: transparent; }
.sb-scroll::-webkit-scrollbar-thumb { background: var(--ink-5); border-radius: 4px; }

.sec { border-bottom: 1px solid var(--ink-3); }
.sec-head { display: flex; align-items: center; gap: 8px; padding: 11px 20px; flex-shrink: 0; }
.sec-icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; color: var(--darkio); background: var(--#f5f5f5); border-radius: 4px; flex-shrink: 0; }
.sec-icon svg { width: 20px; height: 20px; }
.sec-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--txt-3); font-family: var(--mono); flex: 1; }
.sec-badge { font-size: 9px; font-family: var(--mono); color: var(--steel-txt); background: var(--steel-lt); padding: 2px 7px; border-radius: 20px; font-weight: 600; letter-spacing: 0.04em; border: 1px solid var(--steel-2); }
.sec-body { padding: 0 20px 14px; }

.dims-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.dim-field { display: flex; flex-direction: column; gap: 4px; }
.dim-lbl { font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--txt-3); font-family: var(--mono); }
.dim-wrap { position: relative; }
.dim-input {
  width: 100%; padding: 8px 22px 8px 10px;
  background: var(--input-bg); border: 1px solid var(--border);
  border-radius: var(--r); font-family: var(--mono); font-size: 14px;
  font-weight: 700; color: var(--frost); outline: none;
  transition: border-color 0.1s, box-shadow 0.1s;
  -moz-appearance: textfield;
}
.dim-input::-webkit-inner-spin-button, .dim-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.dim-input:hover:not(:focus) { border-color: var(--border-lt); }
.dim-input:focus { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(232,160,32,0.15); background: var(--ink-3); }
.dim-input:invalid { border-color: var(--error); box-shadow: 0 0 0 2px rgba(224,80,80,0.12); }
.dim-unit { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); font-size: 8.5px; font-family: var(--mono); color: var(--txt-3); pointer-events: none; }
.field-note { font-size: 9.5px; color: var(--txt-3); margin-top: 5px; line-height: 1.5; }
.validator-hint { display: none; font-size: 9px; font-weight: 600; color: var(--error); margin-top: 2px; font-family: var(--mono); letter-spacing: 0.05em; }
.dim-field.has-error .validator-hint { display: block; }
.dim-field.has-error .dim-input { border-color: var(--error) !important; box-shadow: 0 0 0 2px rgba(224,80,80,0.15) !important; }

.chip-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; }
.chip {
  padding: 8px 3px; background: var(--input-bg); border: 1px solid var(--border);
  border-radius: var(--r); text-align: center; font-family: var(--mono);
  font-size: 13px; font-weight: 700; color: var(--txt-2);
  cursor: pointer; transition: all 0.1s; user-select: none; line-height: 1;
}
.chip:hover { border-color: var(--border-lt); color: var(--fog); background: var(--ink-3); }
.chip.sel-active { background: var(--amber); border-color: var(--amber); color: #fff; font-weight: 800; }
[data-theme="dark"] .chip.sel-active { color: var(--ink); }

.mat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.mat-card {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px;
  background: var(--input-bg); border: 1px solid var(--border);
  border-radius: var(--r); cursor: pointer; transition: all 0.1s;
}
.mat-card:hover { border-color: var(--border-lt); background: var(--ink-3); }
.mat-card.sel-active { border-color: var(--amber); background: var(--amber-bg); box-shadow: inset 0 0 0 1px var(--amber-bd); }
.mat-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(0,0,0,0.15); }
.mat-thumb { width: 20px; height: 20px; border-radius: 4px; flex-shrink: 0; object-fit: cover; border: 1px solid rgba(0,0,0,0.18); box-shadow: 0 1px 3px rgba(0,0,0,0.22); }
.mat-label { font-size: 11px; font-weight: 600; color: var(--txt-2); line-height: 1.3; }
.mat-card.sel-active .mat-label { color: var(--amber); }

.acc-section { border-bottom: 1px solid var(--ink-3); }
.acc-trigger { display: flex; align-items: center; gap: 8px; padding: 11px 20px; cursor: pointer; user-select: none; transition: background 0.1s; }
.acc-trigger:hover { background: var(--ink-3); }
.acc-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--darkio); background: var(--steel-lt); border-radius: 4px; flex-shrink: 0; }
.acc-icon svg { width: 30px; height: 30px; }
.acc-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--txt-3); font-family: var(--mono); flex: 1; }
.acc-badge { font-size: 9px; font-family: var(--mono); color: var(--amber); background: var(--amber-bg); border: 1px solid var(--amber-bd); padding: 2px 7px; border-radius: 20px; font-weight: 600; max-width: 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-count { font-size: 9px; font-family: var(--mono); color: var(--steel-txt); background: var(--steel-lt); border: 1px solid var(--steel-2); padding: 2px 7px; border-radius: 20px; font-weight: 600; }
.acc-chevron { width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; color: var(--txt-3); flex-shrink: 0; transition: transform 0.2s ease; }
.acc-chevron svg { width: 11px; height: 11px; }
.acc-section.open .acc-chevron { transform: rotate(180deg); }
.acc-body { overflow: hidden; max-height: 0; transition: max-height 0.28s cubic-bezier(0.4,0,0.2,1), opacity 0.22s ease; opacity: 0; padding: 0 20px; }
.acc-section.open .acc-body { max-height: 600px; opacity: 1; padding: 0 20px 14px; }

.comp-list { display: flex; flex-direction: column; gap: 4px; }
.comp-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  background: var(--input-bg); border: 1px solid var(--border);
  border-radius: var(--r); cursor: pointer; transition: all 0.1s; position: relative;
}

.comp-item:hover { border-color: var(--border-lt); background: var(--ink-3); }
.comp-item:hover::before { background: var(--border-lt); }
.comp-item.sel-active { border-color: var(--amber-bd); background: var(--amber-bg); }
.comp-item.sel-active::before { background: var(--amber); }
.comp-check { width: 14px; height: 14px; border: 1px solid var(--border-lt); border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--ink-4); transition: all 0.1s; }
.comp-item.sel-active .comp-check { background: var(--amber); border-color: var(--amber); }
.comp-item.sel-active .comp-check::after { content: ''; width: 4px; height: 4px; background: #fff; border-radius: 50%; display: block; }
[data-theme="dark"] .comp-item.sel-active .comp-check::after { background: var(--ink); }
.comp-name { font-size: 11.5px; font-weight: 500; color: var(--txt-2); flex: 1; }
.comp-item.sel-active .comp-name { color: var(--amber); font-weight: 600; }
.comp-weight { font-family: var(--mono); font-size: 9.5px; color: var(--txt-3); background: var(--ink-3); padding: 2px 5px; border-radius: 3px; border: 1px solid var(--border); }

.ral-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }
.ral-chip { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 4px 7px; border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; transition: all 0.1s; background: var(--input-bg); }
.ral-chip:hover { border-color: var(--border-lt); transform: translateY(-1px); box-shadow: var(--sh-sm); }
.ral-chip.sel-active { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.ral-swatch { width: 38px; height: 26px; border-radius: 3px; border: 1px solid rgba(0,0,0,0.2); }
.ral-code { font-family: var(--mono); font-size: 8px; color: var(--txt-3); font-weight: 600; }
.ral-label { font-size: 9px; color: var(--txt-2); font-weight: 500; text-align: center; line-height: 1.2; }

.pos-row { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 10px; }
.pos-card { padding: 8px; background: var(--input-bg); border: 1px solid var(--border); border-radius: var(--r); text-align: center; font-size: 11px; font-weight: 600; color: var(--txt-2); cursor: pointer; transition: all 0.1s; }
.pos-card:hover { border-color: var(--border-lt); color: var(--fog); }
.pos-card.sel-active { background: var(--amber); border-color: var(--amber); color: #fff; font-weight: 800; }
[data-theme="dark"] .pos-card.sel-active { color: var(--ink); }

.sb-footer { padding: 12px 20px; border-top: 1px solid var(--border); flex-shrink: 0; background: var(--ink-2); }
.calc-btn {
  width: 100%; height: 40px;
  background: var(--amber); color: #fff;
  border: none; border-radius: var(--r);
  font-family: var(--font); font-size: 11px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; transition: all 0.12s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 2px 12px rgba(232,160,32,0.3);
}
[data-theme="dark"] .calc-btn { color: var(--ink); }
.calc-btn:hover { background: var(--amber-2); box-shadow: 0 4px 20px rgba(232,160,32,0.4); }
.calc-btn:active { transform: scale(0.99); }
.calc-btn svg { width: 14px; height: 14px; }


.viewport { flex: 1; display: flex; flex-direction: column; background: var(--ink); overflow: hidden; min-width: 0; transition: background 0.2s; }
.vp-bar { height: 40px; padding: 0 16px; display: flex; align-items: center; gap: 12px; background: var(--ink-2); border-bottom: 1px solid var(--border); flex-shrink: 0; transition: background 0.2s; }
.vp-bar-label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--txt-3); font-family: var(--mono); }
.three-badge { font-family: var(--mono); font-size: 9px; font-weight: 600; padding: 2px 8px; border-radius: 0px; color: var(--txt-3); background: var(--ink-4); border: 1px solid var(--border); letter-spacing: 0.04em; }
.vp-views { display: flex; gap: 3px; margin-left: auto; }
.vp-view-btn { height: 24px; padding: 0 10px; font-size: 10px; font-weight: 600; font-family: var(--mono); color: var(--txt-3); background: var(--ink-4); border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; transition: all 0.1s; letter-spacing: 0.04em; }
.vp-view-btn:hover { color: var(--fog); border-color: var(--border-lt); }
.vp-view-btn.sel-active { color: var(--amber); background: var(--amber-bg); border-color: var(--amber-bd); font-weight: 700; }

.vp-canvas { flex: 1; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--vp-bg); transition: background 0.2s; }
#renderer-container { position: absolute; inset: 0; width: 100%; height: 100%; }
#renderer-container canvas { display: block !important; width: 100% !important; height: 100% !important; }

#three-loading-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; pointer-events: none; }
.loading-icon { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; color: var(--steel-bd); opacity: 0.35; }
.loading-icon svg { width: 100%; height: 100%; }
.loading-text { font-size: 12px; color: var(--txt-3); font-family: var(--mono); letter-spacing: 0.04em; }
.loading-text strong { color: var(--amber); font-weight: 700; }

#calc-overlay { display: none; position: absolute; inset: 0; z-index: 20; background: var(--overlay-bg); backdrop-filter: blur(6px); align-items: center; justify-content: center; flex-direction: column; gap: 10px; }
#calc-overlay-spinner { width: 28px; height: 28px; border: 2.5px solid var(--ink-5); border-top-color: var(--amber); border-radius: 50%; animation: spin 0.7s linear infinite; }
#calc-overlay-msg { font-family: var(--mono); font-size: 11px; color: var(--amber); letter-spacing: 0.08em; }
@keyframes spin { to { transform: rotate(360deg); } }

.model-tag { position: absolute; bottom: 14px; left: 16px; display: flex; align-items: center; gap: 7px; background: var(--ctrl-btn-bg); border: 1px solid var(--ink-5); border-radius: var(--r); padding: 6px 12px; backdrop-filter: blur(8px); z-index: 10; pointer-events: none; }
.model-tag-label { font-size: 8.5px; font-weight: 700; letter-spacing: 0.2em; color: var(--amber); font-family: var(--mono); }
.model-tag span:last-child { font-size: 11px; color: var(--slate); }

.vp-status { height: 34px; padding: 0 16px; display: flex; align-items: center; gap: 16px; background: var(--ink-2); border-top: 1px solid var(--border); flex-shrink: 0; transition: background 0.2s; }

.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex-shrink: 0; }


.output-panel { width: var(--panel-w); flex-shrink: 0; background: var(--sidebar); border-left: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; transition: background 0.2s; }
.out-head { padding: 14px 20px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.out-title { font-size: 15px; font-weight: 800; color: var(--frost); letter-spacing: -0.03em; margin-bottom: 2px; }
.out-subtitle { font-size: 9.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--txt-3); font-family: var(--mono); }
.out-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; }
.out-scroll::-webkit-scrollbar { width: 4px; }
.out-scroll::-webkit-scrollbar-thumb { background: var(--ink-5); border-radius: 4px; }

.hero-block { margin: 16px 20px 12px; background: linear-gradient(135deg, var(--steel-2) 0%, #1E3550 100%); border: 1px solid var(--steel-bd); border-radius: var(--r-lg); padding: 16px 18px; }
[data-theme="light"] .hero-block { background: linear-gradient(135deg, #C8DAEA 0%, #9FBFD8 100%); }
[data-theme="light"] .pt-hero { background: linear-gradient(135deg, #C8DAEA 0%, #9FBFD8 100%) !important; }
.hero-label { font-size: 8.5px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--steel-txt); font-family: var(--mono); margin-bottom: 6px; }
.hero-value { font-size: 38px; font-weight: 900; color: var(--frost); letter-spacing: -0.04em; line-height: 1; margin-bottom: 4px; }
.hero-unit { font-size: 16px; opacity: 0.55; }
.hero-sub { font-size: 9px; color: var(--steel-txt); font-family: var(--mono); opacity: 0.7; }

.hero-block1 { margin: 16px 20px 12px; background: linear-gradient(135deg, var(--steel-2) 0%, #12b76a 100%); border: 1px solid var(--steel-bd); border-radius: var(--r-lg); padding: 16px 18px; }
[data-theme="light"] .hero-block1 { background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%); }
[data-theme="light"] .pt-hero { background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%) !important; }
.hero-label1 { font-size: 8.5px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--steel-txt); font-family: var(--mono); margin-bottom: 6px; }
.hero-value1 { font-size: 20px; font-weight: 700; color: var(--frost); letter-spacing: -0.04em; line-height: 1; margin-bottom: 4px; }
.hero-unit1 { font-size: 16px; opacity: 0.55; }
.hero-sub1 { font-size: 12px; color: #000000; font-family: var(--mono); opacity: 0.7;padding-bottom: 0px; }
.availbox_link {
    background: #f3f3f3;
    border-radius: 3px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    height: 19px;
    min-width: 32px;
    position: relative;
    color: #000000;
    font-size: 10px;
    line-height: 19px;
    font-weight: 500;
    text-align: center;
    display: block;
    padding: 0;
    padding-right: 11px;
    padding-left: 6px;
    cursor: pointer;
    white-space: nowrap
}
.availbox_link1 {
    background: #dd703e;
    border-radius: 3px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    height: 29px;
    min-width: 32px;
    position: relative;
    color: #fff;
    font-size: 10px;
    line-height: 19px;
    font-weight: 500;
    text-align: center;
    display: block;
    padding: 0;
    padding-right: 11px;
    padding-top: 5px;
    padding-left: 6px;
    cursor: pointer;
    white-space: nowrap
}
.availbox_link::before {
    content: '';
    position: absolute;
    display: block;
    background-image: url(/templates/nnzipc_nz/css/../images/sprite/dots-white.svg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    display: inline-block;
    vertical-align: middle;
    width: 3px;
    height: 11px;
    right: 4px;
    top: 4px
}
.cart_button {
    display: inline-block;
    vertical-align: middle;
    width: 170px;
    position: relative;
    background: #4D88B2;
    border-radius: 3px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px
}

.cart_button:after {
    content: '';
    clear: both;
    display: block
}

.cart_button .jq-number {
    border-radius: 3px 0 0 3px;
    -moz-border-radius: 3px 0 0 3px;
    -webkit-border-radius: 3px 0 0 3px;
    float: left;
    display: block
}

.cart_button .jq-number__field {
    border-radius: 3px 0 0 3px;
    -moz-border-radius: 3px 0 0 3px;
    -webkit-border-radius: 3px 0 0 3px
}

.cart_button .jq-number__field,.cart_button .jq-number__field input {
    height: 40px
}

.cart_button_btn {
    position: relative;
    float: right;
    margin: 0
}

.cart_button_btn:before {
    content: '';
    position: absolute;
    display: block;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    border-radius: 0 3px 3px 0;
    -moz-border-radius: 0 3px 3px 0;
    -webkit-border-radius: 0 3px 3px 0;
    background: rgba(255,255,255,.5);
    z-index: 5;
    display: none
}

.cart_button .btn {
    border-radius: 0 3px 3px 0;
    -moz-border-radius: 0 3px 3px 0;
    -webkit-border-radius: 0 3px 3px 0;
    width: 120px;
    text-align: left;
    font-size: 12px;
    color: #fff;
    padding-left: 38px;
    padding-right: 0
}

.cart_button .btn:before {
    content: '';
    position: absolute;
    display: block;
    background-image: url(/templates/nnzipc_nz/css/../images/sprite/cart-white.svg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    display: inline-block;
    vertical-align: middle;
    width: 17px;
    height: 18px;
    left: 12px;
    top: 11px
}

.cart_button .btn.incart:before {
    background: url(/templates/nnzipc_nz/css/../images/sprite/check-white.svg) no-repeat;
    background-size: 17px 13px;
    width: 17px;
    height: 13px;
    top: 13px
}

.cart_button.short {
    width: 100px
}

.cart_button.short .btn {
    width: 50px;
    height: 40px;
    padding: 0;
    text-indent: -9999px!important
}

.cart_button.short .btn:before {
    left: 50%;
    top: 50%;
    margin: -9px 0 0 -8px
}

.cart_button.short .btn.incart:before {
    width: 100%;
    height: 100%;
    background: url(/templates/nnzipc_nz/css/../images/sprite/check-white.svg) center center no-repeat;
    left: 0!important;
    top: 0!important;
    background-size: 17px 13px;
    margin: 0!important
}

.cart_button.disabled .cart_button_btn:before {
    display: block
}

.cart_button .tooltip {
    min-width: 180px;
    white-space: normal;
    background: #D93A57;
    color: #fff;
    padding: 8px 10px;
    left: auto;
    right: 100%;
    margin-bottom: 16px;
    margin-right: -50px;
    z-index: 10
}

.Button_button__hmbmP {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-family: inherit;
    text-align: center;
    font-weight: 400;
    border-radius: .125rem;
    transition: background-color .3s,color .3s,border-color .3s,opacity .3s;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none
}

.Button_button__hmbmP::-moz-focus-inner {
    border: 0
}

.Button_button__hmbmP:focus {
    outline: none
}

.Button_button__hmbmP:hover {
    cursor: pointer
}

.Button_button__hmbmP[disabled] {
    color: var(--font-color-tertiary);
    background-color: var(--button-disabled-bg-color);
    border-color: var(--button-disabled-border-color);
    transition: color .3s,background-color .3s,border-color .3s;
    pointer-events: none
}

@media only screen and (min-width: 1151px) {
    .Button_button__hmbmP[disabled]:hover {
        color:var(--font-color-tertiary);
        background-color: var(--button-disabled-bg-color);
        border-color: var(--button-disabled-border-color)
    }
}


    .button78 {
        padding:5px 100px;
        padding-bottom: 5px;
        height: 25px;
        background-color: #fd2a38;
        border-color: #fff;
        text-decoration-color: #fff;
        font-size: .875rem;
        
    }



.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.hero-btn {
  width: 100%;
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s ease;
}

.hero-btn:hover {
  opacity: 0.88;
}

.hero-btn--primary {
  background-color: #e35e06; /* red matching the image */
  color: #fff;
}

.hero-consult {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 500;
  color: #333;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  text-decoration: none;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}

.hero-consult:hover {
  border-color: #999;
  background: #f7f7f7;
}
.price-tooltip-wrap {
  position: absolute;
  top: 10px;
  right: 10px;
}

.price-tooltip-icon {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f0efef;
  color: #bbb1b1;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.price-tooltip-icon:hover {
  background: #ebeaea;
}

/* Tooltip box — hidden by default */
.price-tooltip-box {
  display: none;
  position: absolute;
  bottom: -45px;
  right: 0;
  width: 250px;
  background: #fff;
  border: 1px solid #e9e8e8;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #333;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 10;
}

/* Show on hover */
.price-tooltip-wrap:hover .price-tooltip-box {
  display: block;
}
.chips-row { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 20px 14px; }
.chip-status { display: flex; align-items: center; gap: 4px; padding: 4px 9px; font-size: 10px; font-weight: 600; letter-spacing: 0.02em; }
.chip-status svg { width: 9px; height: 9px; }
.chip-status.ok { background: var(--success-bg); color: var(--success); border: 1px solid rgba(61,186,126,0.2); }
.chip-status.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid rgba(232,147,42,0.2); }

.out-group { margin: 0 20px 12px; }
.out-group-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--txt-3); font-family: var(--mono); margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--ink-3);background-color: lightgray;padding-left: 6px;padding-top: 6px;border-radius: 15px;}
.metric-row { display: flex; align-items: baseline; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--ink-3); }
.metric-row:last-child { border-bottom: none; }
.metric-name { font-size: 11px; font-weight: 500; color: var(--txt-2); }
.metric-value { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--fog); }
.metric-unit { font-size: 9.5px; font-weight: 400; color: var(--txt-3); margin-left: 2px; }

.comp-sum-item { display: flex; align-items: center; justify-content: space-between; padding: 6px 9px; background: var(--input-bg); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 4px; }
.comp-sum-name { font-size: 11px; font-weight: 500; color: var(--txt-2); }
.comp-sum-val { font-family: var(--mono); font-size: 10.5px; color: var(--amber); font-weight: 700; max-width: 50%; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp-sum-val.none { color: var(--txt-3); font-weight: 400; }

.bom-table { width: 100%; border-collapse: collapse; font-size: 10.5px; margin-bottom: 8px; }
.bom-table th { text-align: left; padding: 4px 6px; font-size: 8.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--txt-3); font-family: var(--mono); border-bottom: 1px solid var(--ink-5); }
.bom-table td { padding: 5px 6px; border-bottom: 1px solid var(--ink-3); color: var(--txt-2); font-weight: 500; }
.bom-table tr:last-child td { border-bottom: none; }
.bom-table td:last-child { text-align: right; font-family: var(--mono); }
.bom-table tr:hover td { background: var(--ink-4); }

.out-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 6px; flex-shrink: 0; background: var(--ink-2); }
.exp-btn { flex: 1; height: 32px; border-radius: var(--r); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; transition: all 0.1s; border: 1px solid var(--border); background: var(--input-bg); color: var(--txt-2); display: flex; align-items: center; justify-content: center; gap: 4px; }
.exp-btn:hover { border-color: var(--border-lt); color: var(--fog); background: var(--ink-3); }
.exp-btn svg { width: 11px; height: 11px; }
.exp-btn.primary { background: var(--amber); color: #fff; border-color: var(--amber); font-weight: 800; flex: 1.5; box-shadow: 0 2px 10px rgba(232,160,32,0.25); }
[data-theme="dark"] .exp-btn.primary { color: var(--ink); }
.exp-btn.primary:hover { background: var(--amber-2); border-color: var(--amber-2); }


#preview { position: fixed; pointer-events: auto; display: none; z-index: 9999; width: 240px; background: var(--ink-3); border: 1px solid var(--ink-5); border-radius: var(--r-xl); box-shadow: var(--sh-lg); overflow: hidden; }
#preview .img { width: 100%; height: 120px; object-fit: contain; background: var(--input-bg); display: block; border-bottom: 1px solid var(--border); padding: 8px; }
#preview .body { padding: 10px 12px; }
#preview .title { font-size: 12px; font-weight: 700; color: var(--fog); margin-bottom: 3px; }
#preview .desc { font-size: 10.5px; color: var(--txt-2); line-height: 1.5; }
#preview .weight { font-family: var(--mono); font-size: 10.5px; color: var(--amber); margin-top: 5px; font-weight: 600; }
#preview .density { font-family: var(--mono); font-size: 9.5px; color: var(--txt-3); margin-top: 1px; }
#preview .link { display: inline-block; margin-top: 6px; font-size: 9.5px; color: var(--steel-txt); text-decoration: underline; word-break: break-all; }

@keyframes fadeUp { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }
.sec { animation: fadeUp 0.25s ease both; }
.sec:nth-child(1) { animation-delay:.04s }
.sec:nth-child(2) { animation-delay:.08s }
.sec:nth-child(3) { animation-delay:.12s }

/* ── Parent "Accessories" folder ── */
.dir-section { border-bottom: 1px solid var(--ink-3); }
.dir-trigger {
  display: flex; align-items: center; gap: 8px; padding: 11px 20px;
  cursor: pointer; user-select: none; transition: background 0.1s;
  background: var(--ink-2);
}
.dir-trigger:hover { background: var(--ink-3); }
.dir-folder-icon { width: 20px; height: 20px; display:flex; align-items:center; justify-content:center; color: var(--amber); flex-shrink:0; }
.dir-folder-icon svg { width: 16px; height: 16px; }
.dir-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--txt-2); font-family: var(--mono); flex: 1; }
.dir-count { font-size: 9px; font-family: var(--mono); color: var(--steel-txt); background: var(--steel-lt); border: 1px solid var(--steel-2); padding: 2px 7px; border-radius: 20px; font-weight: 600; }
.dir-chevron { width: 14px; height: 14px; display:flex; align-items:center; justify-content:center; color: var(--txt-3); flex-shrink:0; transition: transform 0.2s ease; }
.dir-chevron svg { width: 11px; height: 11px; }
.dir-section.open .dir-chevron { transform: rotate(90deg); }
.dir-body { overflow: hidden; max-height: 0; transition: max-height 0.32s cubic-bezier(0.4,0,0.2,1), opacity 0.24s ease; opacity: 0; }
.dir-section.open .dir-body { max-height: 2400px; opacity: 1; }

/* Indent the sub-accordions inside the folder */
.dir-body .acc-section { border-bottom: 1px solid var(--ink-3); border-left: 2px solid var(--ink-4); }
.dir-body .acc-trigger { padding-left: 28px; }
.dir-body .acc-section:last-child { border-bottom: none; }

/* ── Sidebar section titles: Google Sans 500 ── */
.sidebar .sec-label,
.sidebar .acc-label,
.sidebar .dir-label {
  font-family: 'Google Sans', 'Onest', system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: 0.12em;
}

/* ═══════════════════════════════════════
   Layout Switcher
═══════════════════════════════════════ */
html[data-layout="mobile"] .lyt-desktop { display: none !important; }
html[data-layout="desktop"] .lyt-mobile  { display: none !important; }

@media (max-width: 767px) {
  html:not([data-layout="desktop"]) .lyt-desktop { display: none !important; }
  html:not([data-layout="desktop"]) .lyt-mobile  { display: flex !important; }
}
@media (min-width: 768px) {
  html:not([data-layout="mobile"]) .lyt-mobile  { display: none !important; }
}

.lyt-toggle-btn {
  position: fixed; bottom: 16px; right: 16px; z-index: 9999;
  width: 36px; height: 36px; background: var(--amber); border: none;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.28); color: var(--ink);
  transition: transform 0.15s, box-shadow 0.15s; -webkit-tap-highlight-color: transparent;
}
.lyt-toggle-btn:hover { transform: scale(1.07); box-shadow: 0 6px 22px rgba(0,0,0,0.3); }
.lyt-toggle-btn:active { transform: scale(0.96); }
.lyt-toggle-btn svg { width: 17px; height: 17px; pointer-events: none; }
.lyt-toggle-btn::after {
  content: attr(data-tip); position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  background: var(--ink-3); color: var(--txt); font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
  white-space: nowrap; padding: 4px 9px; border-radius: 5px; border: 1px solid var(--border);
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.lyt-toggle-btn:hover::after { opacity: 1; }

.lyt-mobile {
  flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden;
  width: 100%; position: absolute; inset: 0; background: var(--bg); z-index: 100;
}

body { position: relative; }

/* ═══════════════════════════════════════
   Mobile Layout
═══════════════════════════════════════ */
.lyt-mobile .m-topbar {
  height: 52px; background: var(--ink-2); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 16px; gap: 12px; flex-shrink: 0; z-index: 200;
}
.lyt-mobile .m-logo { display: flex; align-items: center; gap: 9px; }
.lyt-mobile .m-logo-mark {
  width: 30px; height: 30px; background: var(--amber); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lyt-mobile .m-logo-mark svg { width: 15px; height: 15px; color: var(--ink); }
.lyt-mobile .m-logo-name { font-size: 15px; font-weight: 800; color: var(--frost); letter-spacing: -0.03em; }
.lyt-mobile .m-logo-name em { font-style: normal; font-weight: 300; color: var(--zinc); }
.lyt-mobile .m-topbar-fill { flex: 1; }

.lyt-mobile .m-main-area { flex: 1; min-height: 0; overflow: hidden; position: relative; }
.lyt-mobile .m-tab-panel {
  position: absolute; inset: 0; display: none; flex-direction: column; overflow: hidden;
}
.lyt-mobile .m-tab-panel.m-active { display: flex; }

.lyt-mobile .m-scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: thin;
}
.lyt-mobile .m-scroll::-webkit-scrollbar { width: 3px; }
.lyt-mobile .m-scroll::-webkit-scrollbar-thumb { background: var(--ink-5); border-radius: 3px; }

.lyt-mobile .m-bnav {
  height: 56px; background: var(--ink-2); border-top: 1px solid var(--border);
  display: flex; align-items: stretch; flex-shrink: 0; z-index: 200;
}
.lyt-mobile .m-bnav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  border: none; background: none; color: var(--txt-3);
  font-size: 9px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  font-family: 'Google Sans', 'Onest', system-ui, sans-serif;
  position: relative; transition: color 0.1s;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.lyt-mobile .m-bnav-btn svg { width: 20px; height: 20px; }
.lyt-mobile .m-bnav-btn.m-active { color: var(--amber); }
.lyt-mobile .m-bnav-btn.m-active::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 32px; height: 2px; background: var(--amber); border-radius: 0 0 3px 3px;
}
.lyt-mobile .m-dot {
  position: absolute; top: 6px; right: calc(50% - 18px);
  width: 7px; height: 7px; background: var(--amber); border-radius: 50%;
  border: 1.5px solid var(--ink-2); display: none;
}
.lyt-mobile .m-dot.show { display: block; }

.lyt-mobile .m-cfg-body { padding: 14px 14px 24px; display: flex; flex-direction: column; gap: 10px; }
.lyt-mobile .m-sec {
  background: var(--ink-2); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
}
.lyt-mobile .m-sec-hd {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; transition: background 0.1s;
}
.lyt-mobile .m-sec-hd:active { background: var(--ink-3); }
.lyt-mobile .m-sec-icon {
  width: 30px; height: 30px; background: var(--steel-lt); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; color: var(--steel-txt); flex-shrink: 0;
}
.lyt-mobile .m-sec-icon svg { width: 14px; height: 14px; }
.lyt-mobile .m-sec-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--txt-2); flex: 1;
}
.lyt-mobile .m-sec-badge {
  font-size: 10px; font-family: 'Google Sans', 'Onest', system-ui, sans-serif;
  color: var(--amber); background: var(--amber-bg); border: 1px solid var(--amber-bd);
  padding: 3px 9px; border-radius: 20px; font-weight: 600;
  max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lyt-mobile .m-chevron {
  width: 18px; height: 18px; color: var(--txt-3); transition: transform 0.2s; flex-shrink: 0;
}
.lyt-mobile .m-sec.m-open .m-chevron { transform: rotate(180deg); }
.lyt-mobile .m-sec-body {
  display: none; padding: 0 16px 16px; border-top: 1px solid var(--border);
}
.lyt-mobile .m-sec.m-open .m-sec-body { display: block; }

.lyt-mobile .m-type-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 0 2px; }
.lyt-mobile .m-type-btn {
  padding: 10px 6px; text-align: center; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--txt-3);
  background: var(--ink-4); border: 1.5px solid var(--border); border-radius: 8px;
  cursor: pointer; transition: all 0.1s; -webkit-tap-highlight-color: transparent;
  font-family: 'Google Sans', 'Onest', system-ui, sans-serif;
}
.lyt-mobile .m-type-btn.m-sel { background: var(--amber); color: var(--ink); border-color: var(--amber); font-weight: 800; }

.lyt-mobile .m-dims { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 12px 0 6px; }
.lyt-mobile .m-dim-f { display: flex; flex-direction: column; gap: 5px; }
.lyt-mobile .m-dim-lbl { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--txt-3); font-family: 'Google Sans', 'Onest', system-ui, sans-serif; }
.lyt-mobile .m-dim-wrap { position: relative; }
.lyt-mobile .m-dim-in {
  width: 100%; padding: 12px 24px 12px 12px; background: var(--ink-4); border: 1.5px solid var(--border);
  border-radius: 10px; font-family: 'Google Sans', 'Onest', system-ui, sans-serif; font-size: 17px;
  font-weight: 700; color: var(--frost); outline: none; transition: border-color 0.1s;
  -moz-appearance: textfield;
}
.lyt-mobile .m-dim-in::-webkit-inner-spin-button, .lyt-mobile .m-dim-in::-webkit-outer-spin-button { -webkit-appearance: none; }
.lyt-mobile .m-dim-in:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(232,160,32,0.15); }
.lyt-mobile .m-dim-f.has-error .m-dim-in { border-color: var(--error) !important; box-shadow: 0 0 0 3px rgba(224,80,80,0.15) !important; }
.lyt-mobile .m-dim-f.has-error .m-dim-hint { display: block; }
.lyt-mobile .m-dim-hint { display: none; font-size: 9px; font-weight: 600; color: var(--error); margin-top: 3px; font-family: 'Google Sans', 'Onest', system-ui, sans-serif; letter-spacing: 0.05em; }
.lyt-mobile .m-dim-unit { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-size: 9px; font-family: 'Google Sans', 'Onest', system-ui, sans-serif; color: var(--txt-3); pointer-events: none; }

.lyt-mobile .m-chips { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; padding: 12px 0 4px; }
.lyt-mobile .m-chip {
  padding: 13px 3px; background: var(--ink-4); border: 1.5px solid var(--border); border-radius: 10px;
  text-align: center; font-family: 'Google Sans', 'Onest', system-ui, sans-serif;
  font-size: 14px; font-weight: 700; color: var(--txt-2);
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; transition: all 0.1s;
}
.lyt-mobile .m-chip.m-sel { background: var(--amber); border-color: var(--amber); color: var(--ink); font-weight: 800; }

.lyt-mobile .m-mat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 0 4px; }
.lyt-mobile .m-mat-card {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  background: var(--ink-4); border: 1.5px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: all 0.1s; -webkit-tap-highlight-color: transparent;
}
.lyt-mobile .m-mat-card.m-sel { border-color: var(--amber); background: var(--amber-bg); }
.lyt-mobile .m-mat-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(0,0,0,0.15); }
.lyt-mobile .m-mat-nm { font-size: 12px; font-weight: 600; color: var(--txt-2); }
.lyt-mobile .m-mat-card.m-sel .m-mat-nm { color: var(--amber); }

.lyt-mobile .m-comp-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.lyt-mobile .m-comp-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 12px;
  background: var(--ink-4); border: 1.5px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: all 0.1s; -webkit-tap-highlight-color: transparent;
}
.lyt-mobile .m-comp-item.m-sel { border-color: var(--amber); background: var(--amber-bg); }
.lyt-mobile .m-comp-chk {
  width: 18px; height: 18px; border: 2px solid var(--border-lt); border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; transition: all 0.1s;
}
.lyt-mobile .m-comp-item.m-sel .m-comp-chk { background: var(--amber); border-color: var(--amber); }
.lyt-mobile .m-comp-item.m-sel .m-comp-chk::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.lyt-mobile .m-comp-nm { flex: 1; font-size: 13px; font-weight: 500; color: var(--txt-2); }
.lyt-mobile .m-comp-item.m-sel .m-comp-nm { color: var(--amber); font-weight: 600; }
.lyt-mobile .m-comp-wt { font-size: 11px; color: var(--txt-3); font-family: 'Google Sans', 'Onest', system-ui, sans-serif; background: var(--ink-3); padding: 2px 7px; border-radius: 5px; }

.lyt-mobile .m-pos-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.lyt-mobile .m-pos-btn {
  padding: 10px; text-align: center; background: var(--ink-4); border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--txt-2);
  cursor: pointer; transition: all 0.1s; -webkit-tap-highlight-color: transparent;
}
.lyt-mobile .m-pos-btn.m-sel { background: var(--amber-bg); border-color: var(--amber); color: var(--amber); }

.lyt-mobile .m-ral-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 6px; padding: 10px 0 2px; }
.lyt-mobile .m-ral-chip {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px;
  border-radius: 6px; border: 1.5px solid transparent; cursor: pointer;
  transition: all 0.1s; -webkit-tap-highlight-color: transparent;
}
.lyt-mobile .m-ral-chip.m-sel { border-color: var(--amber); background: var(--amber-bg); }
.lyt-mobile .m-ral-sw { width: 28px; height: 28px; border-radius: 5px; border: 1px solid rgba(255,255,255,0.1); }
.lyt-mobile .m-ral-cd { font-size: 8px; font-family: 'Google Sans', 'Onest', system-ui, sans-serif; font-weight: 600; color: var(--txt-3); }
.lyt-mobile .m-ral-chip.m-sel .m-ral-cd { color: var(--amber); }

.lyt-mobile .m-calc-wrap { padding: 12px 16px; flex-shrink: 0; background: var(--bg); border-top: 1px solid var(--border); }
.lyt-mobile .m-calc-btn {
  width: 100%; height: 50px; background: var(--amber); color: var(--ink); border: none;
  border-radius: 12px; font-size: 13px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 8px; transition: all 0.15s; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 16px rgba(232,160,32,0.3); font-family: inherit;
}
.lyt-mobile .m-calc-btn:active { transform: scale(0.98); }
.lyt-mobile .m-calc-btn svg { width: 18px; height: 18px; }

.lyt-mobile .m-results-body { padding: 10px 12px 24px; display: flex; flex-direction: column; gap: 10px; }

.lyt-mobile .m-chip-row { display: flex; gap: 5px; flex-wrap: wrap; padding: 0 0 2px; }
.lyt-mobile .m-chip-status { display: flex; align-items: center; gap: 4px; padding: 5px 10px; font-size: 10px; font-weight: 600; font-family: 'Google Sans', 'Onest', system-ui, sans-serif; }
.lyt-mobile .m-chip-status svg { width: 10px; height: 10px; }
.lyt-mobile .m-chip-status.ok { background: var(--success-bg); color: var(--success); border: 1px solid rgba(61,186,126,0.2); }
.lyt-mobile .m-chip-status.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid rgba(232,147,42,0.2); }

.lyt-mobile .m-out-grp { background: var(--ink-2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.lyt-mobile .m-out-lbl { font-size: 9px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--txt-3); font-family: 'Google Sans', 'Onest', system-ui, sans-serif; padding: 10px 14px 8px; border-bottom: 1px solid var(--border); }
.lyt-mobile .m-metric { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid var(--ink-3); }
.lyt-mobile .m-metric:last-child { border-bottom: none; }
.lyt-mobile .m-metric-nm { font-size: 12px; color: var(--txt-2); }
.lyt-mobile .m-metric-vl { font-family: 'Google Sans', 'Onest', system-ui, sans-serif; font-size: 12px; font-weight: 700; color: var(--fog); }
.lyt-mobile .m-metric-un { font-size: 10px; color: var(--txt-3); margin-left: 2px; }

.lyt-mobile .m-comp-sum { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--ink-3); }
.lyt-mobile .m-comp-sum:last-child { border-bottom: none; }
.lyt-mobile .m-comp-sum-nm { font-size: 12px; color: var(--txt-2); }
.lyt-mobile .m-comp-sum-vl { font-size: 11px; color: var(--amber); font-family: 'Google Sans', 'Onest', system-ui, sans-serif; font-weight: 700; max-width: 55%; text-align: right; }

.lyt-mobile .m-bom { width: 100%; border-collapse: collapse; font-size: 11px; }
.lyt-mobile .m-bom th, .lyt-mobile .m-bom td { padding: 7px 14px; border-bottom: 1px solid var(--ink-3); }
.lyt-mobile .m-bom th { color: var(--txt-3); font-weight: 700; letter-spacing: 0.06em; font-family: 'Google Sans', 'Onest', system-ui, sans-serif; font-size: 9px; text-transform: uppercase; text-align: left; }
.lyt-mobile .m-bom td { color: var(--txt-2); }
.lyt-mobile .m-bom tr:last-child td { border-bottom: none; font-weight: 700; color: var(--fog); }

    .top-bar-item svg {
      width: 11px;
      height: 11px;
      flex-shrink: 0;
      opacity: 0.6;
    }
.lyt-mobile .m-export-area {
  padding: 10px 16px 12px; flex-shrink: 0;
  background: var(--bg); border-top: 1px solid var(--border);
}
.lyt-mobile .m-export-toggle {
  width: 100%; height: 50px;
  background: var(--amber-bg); border: 1.5px solid var(--amber-bd);
  border-radius: 12px; cursor: pointer; color: var(--amber);
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; -webkit-tap-highlight-color: transparent; transition: border-radius 0.2s;
}
.lyt-mobile .m-export-toggle svg { width: 18px; height: 18px; }
.lyt-mobile .m-export-toggle .m-exp-chevron { width: 16px; height: 16px; transition: transform 0.22s; flex-shrink: 0; }
.lyt-mobile .m-export-toggle.open { border-radius: 12px 12px 6px 6px; }
.lyt-mobile .m-export-toggle.open .m-exp-chevron { transform: rotate(180deg); }
.lyt-mobile .m-export-options {
  display: none; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-top: 6px;
}
.lyt-mobile .m-export-options.open { display: grid; }
.lyt-mobile .m-exp-btn {
  height: 44px; background: var(--ink-2); border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; color: var(--txt-2); font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-family: 'Google Sans', 'Onest', system-ui, sans-serif; -webkit-tap-highlight-color: transparent;
  transition: all 0.1s; text-transform: uppercase;
}
.lyt-mobile .m-exp-btn:active { background: var(--ink-3); }
.lyt-mobile .m-exp-btn svg { width: 13px; height: 13px; }
.lyt-mobile .m-exp-btn.primary { background: var(--amber-bg); border-color: var(--amber-bd); color: var(--amber); }

.lyt-mobile .m-field-note { font-size: 10px; color: var(--txt-3); margin-top: 5px; line-height: 1.5; }

.lyt-mobile .m-inline-vp { flex-shrink: 0; display: flex; flex-direction: column; }
.lyt-mobile .m-vp-bar {
  display: flex; align-items: center; gap: 7px; padding: 7px 12px;
  background: var(--ink-2); border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.lyt-mobile .m-vp-lbl {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--txt-3); font-family: 'Google Sans', 'Onest', system-ui, sans-serif;
}
.lyt-mobile .m-vp-canvas-inline {
  position: relative; overflow: hidden;
  height: 56vw; max-height: 280px; min-height: 180px; background: var(--vp-bg);
}
.lyt-mobile .m-vp-status-bar {
  display: flex; align-items: center; gap: 6px; padding: 5px 12px;
  background: var(--ink-2); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}

.lyt-mobile .m-props-strip {
  display: flex; align-items: stretch; flex-shrink: 0;
  background: var(--ink-2); border-bottom: 2px solid var(--border);
}
.lyt-mobile .m-prop {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 9px 3px; gap: 2px; min-width: 0;
}
.lyt-mobile .m-prop-div { width: 1px; background: var(--border); flex-shrink: 0; margin: 5px 0; }
.lyt-mobile .m-prop-lbl {
  font-size: 7.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--txt-3); font-family: 'Google Sans', 'Onest', system-ui, sans-serif; line-height: 1;
}
.lyt-mobile .m-prop-val {
  font-family: 'Google Sans', 'Onest', system-ui, sans-serif; font-size: 13px; font-weight: 800;
  color: var(--amber); line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 2px;
}
.lyt-mobile .m-prop-val--sm { font-size: 10px; font-weight: 700; color: var(--fog); }
.lyt-mobile .m-prop-un { font-size: 9px; font-weight: 500; color: var(--txt-3); }


.lyt-mobile .m-cfg-summary {
  background: var(--ink-2); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
}
.lyt-mobile .m-cfg-summary-hd {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: linear-gradient(135deg, var(--steel-2) 0%, #1E3550 100%);
  border-bottom: 1px solid var(--steel-bd);
}
[data-theme="light"] .lyt-mobile .m-cfg-summary-hd { background: linear-gradient(135deg, #C8DAEA 0%, #9FBFD8 100%); }
.lyt-mobile .m-cfg-summary-title { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: var(--steel-txt); font-family: 'Google Sans', 'Onest', system-ui, sans-serif; text-transform: uppercase; flex: 1; }
.lyt-mobile .m-cfg-summary-mass { font-family: 'Google Sans', 'Onest', system-ui, sans-serif; font-size: 20px; font-weight: 900; color: var(--frost); letter-spacing: -0.03em; }
.lyt-mobile .m-cfg-summary-mass-un { font-size: 11px; color: var(--steel-txt); font-weight: 500; opacity: 0.8; }
.lyt-mobile .m-cfg-summary-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.lyt-mobile .m-cfg-summary-col { padding: 10px 14px; }
.lyt-mobile .m-cfg-summary-col:first-child { border-right: 1px solid var(--border); }
.lyt-mobile .m-cfg-sg-lbl { font-size: 8.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--txt-3); font-family: 'Google Sans', 'Onest', system-ui, sans-serif; margin-bottom: 7px; }
.lyt-mobile .m-cfg-sg-row { display: flex; justify-content: space-between; align-items: baseline; padding: 3px 0; border-bottom: 1px solid var(--ink-3); }
.lyt-mobile .m-cfg-sg-row:last-child { border-bottom: none; }
.lyt-mobile .m-cfg-sg-nm { font-size: 11px; color: var(--txt-3); }
.lyt-mobile .m-cfg-sg-vl { font-family: 'Google Sans', 'Onest', system-ui, sans-serif; font-size: 11px; font-weight: 700; color: var(--fog); text-align: right; max-width: 58%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 360px) {
  .lyt-mobile .m-cfg-body { padding: 8px 10px 20px; gap: 7px; }
  .lyt-mobile .m-sec-hd { padding: 10px 10px; }
  .lyt-mobile .m-sec-body { padding: 0 10px 10px; }
  .lyt-mobile .m-logo-name { font-size: 13px; }
  .lyt-mobile .m-results-body { padding: 8px 10px 20px; gap: 8px; }
  .lyt-mobile .m-export-area { padding: 7px 10px; }
  .lyt-mobile .m-ral-grid { grid-template-columns: repeat(5,1fr); }
  .lyt-mobile .m-bnav-btn { font-size: 9px; }
  .lyt-mobile .m-vp-canvas-inline { height: 50vw; min-height: 160px; }
  .lyt-mobile .m-prop-val { font-size: 11px; }
  .lyt-mobile .m-cfg-summary-hd { padding: 8px 10px; }
  .lyt-mobile .m-cfg-summary-col { padding: 8px 10px; }
  .lyt-mobile .m-cfg-summary-mass { font-size: 16px; }
}
.m-brand{
  display:flex;
  align-items:center;   /* vertical align */
  gap:10px;             /* space between logo + text */
  flex-shrink:0;
}

.m-logo-name{
  display:flex;
  align-items:center;
  line-height:1;
  font-size:18px;
  font-weight:600;
}