/* Self-hosted, OFL-licensed variable fonts. Sources and licenses: dist/fonts/. */
@font-face {
  font-family: 'Open Sans'; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url('/fonts/open-sans-cyrillic-wght-normal.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Open Sans'; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url('/fonts/open-sans-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Open Sans'; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url('/fonts/open-sans-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/fonts/manrope-cyrillic-wght-normal.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/fonts/manrope-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/fonts/manrope-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:root {
  --font-body: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-heading: 'Manrope', var(--font-body);
  color-scheme: dark;
  --bg: #1f1f1f;
  --panel: #2b2b2b;
  --line: #464646;
  --text: #f5f5f5;
  --muted: #b9b9b9;
  --accent: #72dc99;
  --action: #00ae42;
  --on-action: #071d0f;
  --green: #91ddb0;
  --danger: #f4b4a5;
  --warning: #f1d692;
  --mark-filter: grayscale(1) contrast(2) invert(1);
  --mark-blend: screen;
  --backdrop-opacity: .045;
  --canvas-rgb: .122 .122 .122;
  --page-width: clamp(1440px, 90vw, 2400px);
  --page-gutter: clamp(20px, 3vw, 72px);
}

/* Full-width decorative background, enabled only on pages with enough scroll. */
.has-studio-backdrop { position: relative; isolation: isolate; }
.page-backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.backdrop-art { width: 100%; aspect-ratio: 1; will-change: transform; opacity: var(--backdrop-opacity); mix-blend-mode: var(--mark-blend); }
.backdrop-art img { display: block; width: 100%; height: 100%; object-fit: contain; filter: var(--mark-filter); }
.has-studio-backdrop>header, .has-studio-backdrop>footer { background: var(--bg); }
.model-resources { margin: 0 0 24px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.model-resources-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; min-height: 52px; padding: 14px 20px; }
.model-resources-heading h2 { margin: 0; color: var(--text); font-size: 18px; line-height: 1.4; }
.model-resources-heading > span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.model-resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 6px 20px 16px; }
.model-resource-grid a { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.model-resource-grid a:hover { border-color: var(--accent); text-decoration: none; }
.model-resource-grid strong { display: flex; justify-content: space-between; gap: 12px; color: var(--accent); font-size: 16px; }
.model-resource-grid a>span { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }
.model-resources>p { padding: 0 20px; margin-bottom: 14px; max-width: 100ch; color: var(--muted); font-size: 13px; }
.model-resources>p a { color: var(--accent); text-decoration: underline; }
@media (max-width: 760px) {
  .backdrop-art { opacity: var(--backdrop-opacity); }
  .model-resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 14px 14px; gap: 10px; }
  .model-resource-grid a { padding: 12px; }
  .model-resource-grid strong { font-size: 14px; gap: 6px; }
  .model-resource-grid a>span { font-size: 12px; }
  .model-resources-heading { padding: 14px; }
  .model-resources-heading h2 { flex-basis: 100%; font-size: 17px; }
  .model-resources>p { padding: 0 14px; }
}
@media (max-width: 359px) { .model-resource-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .backdrop-art { will-change: auto; } }
@media print { .page-backdrop { display: none !important; } }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--font-body);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button,
a {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
header {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 22px var(--page-gutter);
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 600;
}
.brandmark {
  --mark-size: 48px;
  width: var(--mark-size);
  height: var(--mark-size);
  flex: 0 0 var(--mark-size);
  display: block;
  background: transparent;
  mix-blend-mode: var(--mark-blend);
}
.brandmark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: var(--mark-filter);
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2px;
  margin-top: 4px;
}
nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
}
main {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 32px var(--page-gutter) 48px;
  flex: 1;
  min-width: 0;
}
h1, h2, h3, h4, .brand {
  font-family: var(--font-heading);
}
h1 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
  letter-spacing: -.025em;
  font-weight: 700;
  margin: 0 0 10px;
}
h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px;
}
p {
  margin: 0 0 16px;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.intro p {
  color: var(--muted);
  max-width: 650px;
  margin: 0;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 12px;
}
.tag {
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 20px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
  gap: 24px;
  align-items: start;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  min-width: 0;
}
.model-panel {
  padding: 0;
  overflow: hidden;
  position: sticky;
  top: 20px;
}
.panelhead {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.panelhead span:first-child {
  overflow-wrap: anywhere;
}
.drop {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}
.drop .symbol {
  font-size: 40px;
  font-weight: 200;
  color: var(--accent);
  margin-bottom: 14px;
}
.drop p {
  max-width: 330px;
  color: var(--muted);
  font-size: 14px;
}
.drop h2 {
  font-size: 24px;
}
.drop small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
}
button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 10px 15px;
  line-height: 1.4;
}
button:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--panel);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.primary {
  background: var(--action);
  border-color: var(--action);
  color: var(--on-action);
  font-weight: 600;
}
.primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--action), var(--text) 10%);
}
.textbutton {
  border: 0;
  padding: 9px 0;
  color: var(--muted);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
label {
  display: block;
  color: var(--muted);
  font-size: 14px;
}
input:not([type="checkbox"]),
select {
  display: block;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 7px;
  min-height: 42px;
  padding: 9px 11px;
  margin-top: 6px;
}
input:disabled,
select:disabled {
  color: var(--muted);
  background: var(--panel);
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
input[type="file"] {
  display: none;
}
.field {
  margin-bottom: 17px;
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.fields .field {
  margin-bottom: 0;
}
.parameter-heading,
.wide-field {
  grid-column: 1 / -1;
}
.parameter-heading {
  margin: 16px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.readonly {
  font-size: 12px;
  color: var(--muted);
  margin-left: 5px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 42px;
}
.section {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 20px;
}
.section h3 {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
}
.hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}
.settings .primary {
  width: 100%;
  margin-top: 22px;
}
.settings > p {
  font-size: 13px;
  color: var(--muted);
}
canvas {
  width: 100%;
  height: 360px;
  display: block;
  touch-action: none;
}
.viewer-foot {
  padding: 14px 22px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.rotation {
  padding: 18px 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border-top: 1px solid var(--line);
}
.rotation button {
  margin-top: 7px;
  width: 100%;
  font-size: 13px;
  padding: 6px;
}
.alert {
  border: 1px solid color-mix(in srgb, var(--danger), var(--line) 50%);
  background: color-mix(in srgb, var(--danger) 10%, var(--panel));
  color: var(--danger);
  padding: 12px 16px;
  border-radius: 9px;
  margin-bottom: 18px;
}
.notice {
  border: 1px solid color-mix(in srgb, var(--green), var(--line) 50%);
  background: color-mix(in srgb, var(--green) 10%, var(--panel));
  color: var(--green);
  padding: 12px 16px;
  border-radius: 9px;
  margin-bottom: 18px;
}
.report {
  margin-top: 24px;
}
.report-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.report-heading p {
  color: var(--muted);
  font-size: 14px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.metric {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 9px;
}
.metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.metric b {
  font-size: 26px;
  font-weight: 500;
  display: block;
  margin-top: 7px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
}
td small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
td.changed {
  color: var(--warning);
}
details {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 18px;
}
summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
}
.login {
  max-width: 480px;
  margin: clamp(12px, 4vh, 48px) auto;
}
.login form > label { display: block; }
.login #login-hint { margin: -7px 0 22px; }
.login .legal-help { line-height: 1.6; }
.login h1 {
  font-size: 28px;
}
.login .primary {
  width: 100%;
  margin-top: 15px;
}
.password-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.password-row input {
  min-width: 0;
}
.password-row button {
  font-size: 12px;
  min-width: 83px;
  margin-top: 6px;
}
.admin-toolbar {
  display: flex;
  align-items: end;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 22px;
}
.admin-toolbar label {
  flex: 1;
  max-width: 520px;
}
.range {
  display: flex;
  gap: 8px;
  align-items: center;
}
.range input {
  max-width: 95px;
  margin: 0;
}
.layer-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  max-width: 380px;
}
.layer-checks label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  white-space: nowrap;
}
.policy-table td:first-child {
  min-width: 150px;
}
.policy-table select {
  min-width: 170px;
  margin: 0;
}
.policy-table th:last-child {
  min-width: 240px;
}
.admin-save {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
}
.material-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.report-list td:first-child {
  max-width: 300px;
  overflow-wrap: anywhere;
}
.empty {
  padding: 18px;
  color: var(--muted);
  font-size: 14px;
}
.status {
  color: var(--green);
  font-size: 14px;
}
.status[data-state="failed"] {
  color: var(--danger);
}
.tariffs {
  max-width: 650px;
  margin-top: 18px;
}
.report-baseline {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
footer {
  width: 100%;
  padding: 24px var(--page-gutter);
  max-width: var(--page-width);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.legal-help {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.legal-help a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.order-continue { display: inline-block; margin-top: 22px; padding: 12px 18px; background: var(--action); color: var(--on-action); border-radius: 8px; font-weight: 600; }
@media (max-width: 850px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .model-panel {
    position: static;
  }
  .intro {
    align-items: start;
  }
  .intro .tag {
    display: none;
  }
  header,
  main {
    padding-left: 20px;
    padding-right: 20px;
  }
  .admin-toolbar {
    flex-wrap: wrap;
  }
  .admin-save {
    align-items: stretch;
    flex-direction: column;
  }
  .panel {
    padding: 18px;
  }
  .model-panel {
    padding: 0;
  }
  .metrics {
    gap: 6px;
  }
  .metric {
    padding: 12px;
  }
  .metric b {
    font-size: 22px;
  }
}
@media (max-width: 440px) {
  header {
    padding: 16px;
    gap: 12px;
  }
  nav {
    gap: 14px;
    font-size: 13px;
  }
  .brand small {
    letter-spacing: 1px;
    font-size: 9px;
  }
  .brandmark {
    --mark-size: 40px;
  }
  main {
    padding: 24px 14px;
  }
  .report-heading {
    align-items: start;
    flex-direction: column;
  }
  .metric b {
    font-size: 19px;
  }
  .rotation {
    gap: 8px;
    padding: 14px;
  }
  .drop {
    min-height: 320px;
  }
  footer {
    padding: 18px 14px;
  }
  .fields {
    gap: 12px;
  }
}

.safety-panel {
  margin-bottom: 24px;
}

/* Controls retain their readable size when a grid or a long label narrows. */
input, select, textarea { min-width: 0; max-width: 100%; }
button { min-height: 44px; overflow-wrap: anywhere; }
header nav { flex-wrap: wrap; align-items: center; }
header nav a { display: inline-flex; align-items: center; min-height: 44px; }
header .brand { flex-shrink: 0; }
.panelhead { flex-wrap: wrap; }
.panelhead h2 { margin-bottom: 0; }
.panelhead .check { margin: 0; }
.table-wrap { max-width: 100%; overscroll-behavior-x: contain; }
.metric, .intro>div { min-width: 0; }
.metric b { overflow-wrap: anywhere; }

@media (max-width: 1000px) {
  header { flex-wrap: wrap; gap: 10px 24px; }
  header nav { gap: 8px 22px; }
}

[hidden] {
  display: none !important;
}
.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.account-row small,
.report-list small {
  display: block;
  margin-top: 6px;
}
.account-identity { min-width: 0; overflow-wrap: anywhere; }
.account-identity .tag { display: inline-block; margin-left: 10px; }
.account-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.account-controls button { font-size: 14px; }
.employee-entry { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.employee-entry .button { flex-shrink: 0; }
.staff-create { margin: 20px 0; }
.staff-form { display: grid; gap: 16px; min-width: 0; }
.staff-form > button { justify-self: start; }
.staff-form .hint { margin: -8px 0 0; }
.staff-fields, .staff-rights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.staff-rights { border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; margin: 0; }
.staff-rights legend { padding: 0 8px; }
.staff-right { display: flex; gap: 12px; align-items: flex-start; padding: 8px; cursor: pointer; min-width: 0; }
.staff-right input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; min-height: 0; }
.staff-right small { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
.staff-password { display: flex; align-items: stretch; flex-wrap: wrap; gap: 8px; }
.staff-password input { flex: 1 1 240px; width: 0; min-width: 0; }
.staff-password button { flex: 0 1 auto; }
.password-row .password-toggle, .staff-password .password-toggle { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; min-width: 44px; min-height: 44px; padding: 8px; }
.password-toggle svg { display: block; width: 22px; height: 22px; pointer-events: none; }
.staff-list { display: grid; gap: 20px; }
.staff-card { padding: 20px; border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.staff-card .account-row { padding-top: 0; margin-bottom: 18px; }
.staff-password-reset { margin-top: 20px; }
.staff-credentials { background: var(--panel); border: 1px solid var(--accent); border-radius: 14px; padding: 20px; margin: 18px 0; overflow-wrap: anywhere; }
.staff-credentials h3 { margin: 0; }
.staff-credentials input { letter-spacing: .04em; }
.staff-customers { margin-top: 24px; }
@media (max-width: 640px) {
  .staff-fields, .staff-rights { grid-template-columns: minmax(0, 1fr); }
  .staff-card, .staff-credentials { padding: 14px; }
  .staff-password input { flex-basis: 100%; width: 100%; }
  .staff-password button { flex: 1 1 auto; }
  .staff-form > button { justify-self: stretch; }
  .account-row, .employee-entry { align-items: stretch; flex-direction: column; }
  .account-controls { justify-content: flex-start; }
  .account-controls button { flex: 1 1 100%; }
  .employee-entry .button { text-align: center; }
}
.login #auth-mode {
  width: 100%;
  margin-top: 12px;
}
/* Slicer workspace */
.slicer-shell {
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.slicer-shell .settings {
  padding: 20px;
  max-height: calc(100vh - 180px);
  overflow: auto;
  scrollbar-width: thin;
}
.slicer-shell .model-panel {
  top: 16px;
}
.slicer-shell .field {
  margin-bottom: 13px;
}
.slicer-shell .fields {
  gap: 12px;
}
.slicer-shell .fields label {
  font-size: 12px;
}
.slicer-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.slicer-section-title h2 {
  font-size: 16px;
  margin: 0;
}
.slicer-section-title > span {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 3px 6px;
  border-radius: 4px;
}
.color-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.color-heading strong {
  color: var(--text);
  font-weight: 400;
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.swatch {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  padding: 0;
  border: 2px solid #a4a69b;
  box-shadow: 0 0 0 2px var(--panel);
  color: #fff;
  font-size: 15px;
  text-shadow: 0 1px 3px #000;
}
.swatch[aria-pressed="true"] {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.swatch:hover:not(:disabled) {
  filter: brightness(1.15);
  border-color: #fff;
}
.color-note {
  font-size: 11px;
  line-height: 1.5;
}
.slice-action {
  border-top: 1px solid var(--line);
  margin-top: 18px;
}
.slice-action .primary {
  margin-top: 16px;
}
.slice-action .hint {
  font-size: 11px;
}
.plate-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.active-mode {
  font-size: 12px;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding: 6px 0;
}
.file-name {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.plate-toolbar button {
  font-size: 12px;
  padding: 7px 10px;
}
.viewport {
  position: relative;
  background: var(--bg);
}
.slicing-overlay {
  position: absolute;
  z-index: 3;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, calc(100% - 32px));
  padding: 24px;
  text-align: center;
  border: 1px solid var(--accent);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 18px 70px #000b;
}
.slicing-overlay h2 { margin: 12px 0 8px; font-size: clamp(20px, 3vw, 26px); }
.slicing-overlay p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.slicing-spinner { display: inline-block; width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: slicing-spin 1s linear infinite; }
@keyframes slicing-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .slicing-spinner { animation: none; } }
.viewport canvas {
  height: clamp(440px, 57vh, 660px);
}
.plate-badge {
  position: absolute;
  left: 18px;
  top: 18px;
  font-size: 12px;
  color: var(--accent);
  pointer-events: none;
  display: flex;
  gap: 12px;
}
.plate-badge span {
  color: var(--muted);
  font-size: 11px;
}
.view-tools {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.view-tools button {
  font-size: 11px;
  padding: 6px 10px;
  background: var(--panel);
  border-color: var(--line);
}
.axis-label {
  position: absolute;
  left: 18px;
  bottom: 55px;
  font-size: 10px;
  color: var(--muted);
  pointer-events: none;
}
.upload-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 360px;
  width: 85%;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 20px 60px #0006;
}
.upload-overlay h2 {
  font-size: 23px;
  margin-bottom: 8px;
}
.upload-overlay p {
  font-size: 13px;
  color: var(--muted);
}
.upload-overlay button {
  font-size: 13px;
  width: 100%;
}
.upload-overlay small {
  display: block;
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
}
.viewer-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 11px;
}
.viewer-foot strong {
  font-weight: 400;
  color: var(--text);
}
.rotation-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 0;
  border-top: 1px solid var(--line);
}
.rotation-title h3 {
  font-size: 12px;
  font-weight: 400;
  margin: 0;
  color: var(--muted);
}
.rotation-title button {
  font-size: 11px;
  padding: 5px 9px;
}
.slicer-shell .rotation {
  padding: 12px 16px;
  border: 0;
}
.slicer-shell .rotation .field {
  margin-bottom: 0;
}
.slicer-shell .rotation label {
  font-size: 12px;
}
.inventory-panel {
  margin: 0 0 24px;
}
.inventory-panel > summary {
  font-size: 18px;
  color: var(--text);
}
.inventory-panel summary span {
  font-size: 12px;
  color: var(--muted);
  margin-left: 12px;
}
.inventory-material {
  padding: 12px 0;
  margin-top: 0;
}
.inventory-material > summary {
  font-size: 15px;
  color: var(--text);
}
.inventory-actions {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}
.inventory-actions button {
  font-size: 12px;
  padding: 6px 10px;
}
.inventory-colors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.inventory-colors label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}
.color-chip {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #969b91;
  display: inline-block;
  flex-shrink: 0;
}
.preset-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 4px 14px;
}
@media (max-width: 1050px) {
  .slicer-shell {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .slicer-shell .settings {
    padding: 15px;
  }
  main {
    padding-left: 20px;
    padding-right: 20px;
  }
}
@media (max-width: 800px) {
  .slicer-shell {
    grid-template-columns: 1fr;
  }
  .slicer-shell .model-panel {
    order: 0;
    position: static;
  }
  .slicer-shell .settings {
    order: 1;
    max-height: none;
    overflow: visible;
  }
  .viewport canvas {
    height: 460px;
  }
  .view-tools button {
    padding: 6px 8px;
  }
  .slicer-shell .fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .plate-badge {
    max-width: 90%;
    left: 12px;
  }
  .axis-label {
    font-size: 9px;
  }
  .inventory-panel summary span {
    display: block;
    margin: 4px 0 0;
  }
  .account-row {
    flex-wrap: wrap;
  }
}
@media (max-width: 440px) {
  .viewport canvas {
    height: 390px;
  }
  .file-name {
    display: none;
  }
  .plate-toolbar {
    justify-content: space-between;
  }
  .view-tools {
    gap: 4px;
  }
  .view-tools button {
    font-size: 10px;
    padding: 6px 7px;
  }
  .plate-badge {
    font-size: 10px;
  }
  .plate-badge span {
    font-size: 10px;
  }
  .upload-overlay {
    padding: 20px;
  }
  .viewer-foot {
    font-size: 10px;
  }
}
@media (max-width: 440px) {
  header {
    flex-wrap: wrap;
  }
  header nav {
    flex: 1 0 100%;
    justify-content: space-between;
  }
  .axis-label {
    bottom: 82px;
  }
}

/* Workspace on large monitors; controls stay next to the actual build plate. */
@media (min-width: 1600px) {
  .slicer-shell { grid-template-columns: clamp(360px, 22vw, 440px) minmax(0, 1fr); gap: 24px; }
  .slicer-shell .fields label { font-size: 14px; }
  .viewport canvas { height: clamp(500px, 62vh, 900px); }
  .slicer-shell .settings { max-height: calc(100dvh - 160px); }
  .plate-toolbar, .view-tools { gap: 12px; }
  .view-tools button, .plate-toolbar button { font-size: 14px; }
}
@media (max-width: 800px) {
  header nav { width: 100%; gap: 4px 18px; font-size: 14px; }
  .plate-toolbar { flex-wrap: wrap; gap: 8px; }
  .plate-toolbar .file-name { flex-basis: 100%; order: 3; }
  .plate-toolbar button { min-height: 44px; }
  .view-tools { position: static; padding: 12px; border-top: 1px solid var(--line); }
  .view-tools button { min-width: 44px; min-height: 44px; font-size: 12px; }
  .viewport canvas { height: clamp(340px, 54svh, 480px); touch-action: pan-y pinch-zoom; }
  .upload-overlay { top: 42%; }
  .axis-label { display: none; }
  .plate-badge { right: 12px; max-width: none; font-size: 12px; }
  .plate-badge span { font-size: 11px; }
  .swatch { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
  .swatches { gap: 12px; }
  .slicer-shell .fields label { font-size: 14px; }
  input:not([type=checkbox]), select, textarea { font-size: 16px; }
  .color-note, .viewer-foot, .slice-action .hint { font-size: 12px; }
  .inventory-colors label { min-height: 44px; }
  .admin-toolbar label { flex-basis: 100%; max-width: none; }
  .admin-toolbar button { flex: 1; }
  .preset-checks { grid-template-columns: minmax(0, 1fr); }
  .inventory-actions { flex-wrap: wrap; }
  .policy-table, .policy-table tbody { display: block; }
  .policy-table thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .policy-table tr { display: grid; grid-template-columns: minmax(0, 1fr); padding: 20px 0; border-bottom: 1px solid var(--line); }
  .policy-table td { display: block; padding: 6px 0; border: 0; min-width: 0 !important; }
  .policy-table td:first-child { font-size: 17px; color: var(--accent); }
  .policy-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
  .policy-table select { min-width: 0; }
  .policy-table .layer-checks { max-width: none; }
  .policy-table .layer-checks label { min-height: 40px; }
}
@media (max-width: 480px) {
  .slicer-shell .fields { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 16px; }
  .model-panel { padding: 0; }
  .intro { flex-direction: column; gap: 12px; }
  .panelhead { padding: 14px 0; }
  .metrics { grid-template-columns: minmax(0, 1fr); }
  .metric { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .metric b { margin: 0; }
  .rotation-title { flex-wrap: wrap; gap: 8px; }
  .rotation-title button { font-size: 12px; }
  .rotation button { min-height: 44px; }
  .upload-overlay { padding: 18px; }
  .upload-overlay h2 { font-size: 21px; }
  .upload-overlay button { font-size: 14px; }
  .inventory-colors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Direct studio contacts, shared by the public pages and workspace. */
.studio-contact { position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); z-index: 45; }
.contact-launcher { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 20px 6px 10px; border: 1px solid var(--accent); border-radius: 999px; background: var(--panel); color: var(--text); box-shadow: 0 6px 24px #0003; font-size: 15px; }
.contact-launcher:hover { background: var(--bg); }
.contact-launcher-mark { display: block; flex: 0 0 40px; width: 40px; height: 40px; mix-blend-mode: var(--mark-blend); }
.contact-launcher-mark img { display: block; width: 100%; height: 100%; object-fit: contain; filter: var(--mark-filter); }
.contact-panel { position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: calc(max(24px, env(safe-area-inset-bottom)) + 68px); width: 360px; max-width: calc(100% - max(24px, env(safe-area-inset-left)) - max(24px, env(safe-area-inset-right))); max-height: calc(100dvh - 112px - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--text); box-shadow: 0 16px 64px #0005; }
.contact-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.contact-heading h2 { font-size: 22px; line-height: 1.3; margin: 0; }
.contact-close { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 28px; line-height: 1; }
.contact-close:hover { background: var(--bg); color: var(--text); }
.contact-panel p { margin: 12px 0 20px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.contact-options { display: grid; gap: 10px; }
.contact-option { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); text-decoration: none; }
.contact-option:hover { border-color: var(--accent); text-decoration: none; }
.contact-option strong { display: block; font-size: 16px; font-weight: 600; }
.contact-option small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.contact-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; font: 700 20px/1 var(--font-heading); }
.contact-icon svg { width: 24px; height: 24px; }
.contact-telegram { background: #dceefa; color: #176493; }
.contact-max { background: #eee5ff; color: #6840ae; }
.contact-arrow { margin-left: auto; font-size: 20px; color: var(--muted); }
.contact-panel .contact-note { margin: 16px 0 0; font-size: 12px; }
.contact-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.contact-footer-entry { padding: 8px 0; border: 0; background: transparent; color: var(--accent); font: inherit; text-align: left; }
.has-studio-contact > footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
.studio-contact button:focus-visible, .contact-option:focus-visible, .contact-footer-entry:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 480px) {
  .studio-contact { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
  .contact-launcher { min-height: 52px; padding-right: 16px; font-size: 14px; }
  .contact-launcher-mark { flex-basis: 36px; width: 36px; height: 36px; }
  .contact-panel { right: max(16px, env(safe-area-inset-right)); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 64px); max-width: calc(100% - max(16px, env(safe-area-inset-left)) - max(16px, env(safe-area-inset-right))); padding: 18px; max-height: calc(100dvh - 100px - env(safe-area-inset-bottom)); }
}
@media print { .studio-contact, .contact-footer-entry { display: none !important; } .has-studio-contact > footer { padding-bottom: 18px; } }

/* Shared spacing and navigation for the working sections of the studio. */
header nav a[aria-current="page"], .account-entry[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}
.skip-main { position: absolute; left: 20px; top: -100px; z-index: 50; padding: 12px 16px; border-radius: 8px; background: var(--action); color: var(--on-action); }
.skip-main:focus { top: 12px; }
.intro { align-items: flex-start; }
.intro p { line-height: 1.65; }
.hint, .legal-help { line-height: 1.6; }
input:not([type="checkbox"]), select { min-height: 44px; }
#app:has(.account-reports) { max-width: 1200px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 24px; }
.account-reports { display: grid; gap: 10px; }
.account-report { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 16px 18px; text-align: left; background: var(--bg); }
.account-report-main { min-width: 0; overflow-wrap: anywhere; }
.account-report-main small { font-size: 13px; color: var(--muted); }
.account-report-status { flex-shrink: 0; font-size: 13px; color: var(--accent); }
.account-report[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb,var(--accent) 6%,var(--panel)); }
.slicer-shell .fields label, .color-heading { font-size: 14px; }
.color-heading { align-items: baseline; }
.color-heading strong { text-align: right; }
.color-note, .slice-action .hint { font-size: 13px; line-height: 1.6; }
.slicer-shell .fields .field { margin-bottom: 0; }
.slicer-shell .fields { gap: 18px 12px; }
.viewer-foot { line-height: 1.6; }
@media (max-width: 800px) {
  .viewer-foot, .slicer-shell .rotation label { font-size: 13px; }
  .slicer-shell .settings { padding: 20px; }
}
@media (max-width: 480px) {
  .intro { align-items: stretch; }
  body:not(.studio-site) > header nav { justify-content: flex-start; gap: 4px 16px; }
  .account-actions > button { flex: 1 1 100%; }
  .account-report { flex-direction: column; align-items: stretch; gap: 10px; }
  .account-report-status { align-self: flex-start; }
  .login { padding: 22px 18px; }
  .password-row button { min-width: 78px; padding-left: 10px; padding-right: 10px; }
}

.studio-queue { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:22px 0; }
.studio-queue a { padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--bg); }
.studio-queue strong { display:block;font-size:26px; }
.studio-queue span { color:var(--muted);font-size:13px; }
.studio-operations .report-heading { gap:20px;flex-wrap:wrap; }
.storage-overview { margin-top:20px;line-height:1.6; }
.storage-overview summary { cursor:pointer;font-weight:600; }
.storage-overview progress { width:100%;max-width:500px;accent-color:var(--accent); }
@media(max-width:620px) { .studio-queue { grid-template-columns:repeat(2,minmax(0,1fr)); } }

.studio-operations a.button,.employee-entry a.button { display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:11px 18px;border:1px solid transparent;border-radius:8px;font-weight:600;text-align:center;text-decoration:none; }
.tariff-preview { margin:20px 0 0;padding:16px;border:1px solid var(--line);border-radius:10px;min-width:0; }
.tariff-preview legend { padding:0 8px;font-weight:600; }
#price-preview { font-weight:600;line-height:1.6;overflow-wrap:anywhere; }

/* Public development notice, in normal flow so it never covers controls. */
.development-banner { padding: 12px 20px; background: #253b2c; color: #e6f5e9; border-bottom: 1px solid #45664c; text-align: center; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.development-banner strong { color: #b9f2bf; font-weight: 700; }
@media (max-width: 600px) { .development-banner { padding: 10px 16px; font-size: 12px; } }
@media print { .development-banner { display: none; } }
