:root {
  color-scheme: dark;
  --bg: #0a0f19;
  --surface: #111827;
  --surface2: #171f2f;
  --border: #293145;
  --muted: #94a1ba;
  --text: #eef2fa;
  --gold: #efbb72;
  --gold2: #ffe1a4;
  --blue: #91b9e9;
  --radius: 13px;
}
* {
  box-sizing: border-box;
}
body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  font-size: 13px;
  line-height: 1.5;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--gold2);
}
.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  background: #0c131f;
  border-bottom: 1px solid #253047;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.brand strong {
  color: var(--gold);
}
.brand small {
  font-size: 9px;
  letter-spacing: 2px;
  display: block;
  color: #97a4bc;
  font-weight: 600;
  margin-top: 5px;
}
.brand-logo {
  display: block;
  width: 43px;
  height: 43px;
  background: #202435;
  border: 1px solid #3b3640;
  border-radius: 12px;
  padding: 4px;
}
.brand-logo svg {
  width: 100%;
  height: 100%;
}
.header-nav {
  display: flex;
  height: 100%;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-weight: 600;
}
.header-nav a {
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
  white-space: nowrap;
}
.header-nav a.active {
  color: var(--gold2);
}
.header-nav a.active:after {
  position: absolute;
  content: "";
  bottom: 0;
  height: 2px;
  left: 0;
  right: 0;
  background: var(--gold);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.local-pill {
  white-space: nowrap;
  color: #adc4b5;
  font-size: 11px;
}
.local-pill i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #69cba0;
  margin-right: 6px;
}
.icon-btn {
  display: grid;
  place-items: center;
  border: 1px solid #3a4659;
  background: #1b2433;
  color: #dbe4f3;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 20px;
  line-height: 1;
}
.icon-btn:hover {
  border-color: var(--gold);
}
.workbench {
  display: grid;
  grid-template-columns: 326px minmax(350px, 1fr) 306px;
  height: calc(100vh - 72px);
  min-height: 560px;
}
.settings-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
  background: #111725;
}
.settings-head {
  padding: 24px 22px 19px;
  border-bottom: 1px solid var(--border);
}
.eyebrow {
  font-size: 10px;
  color: var(--gold);
  font-weight: 750;
  letter-spacing: 1.65px;
  margin: 0 0 7px;
}
.settings-head h1 {
  font-size: 21px;
  line-height: 1.25;
  margin: 0 0 9px;
  letter-spacing: -0.65px;
}
.settings-head p:last-child {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.settings-scroll {
  overflow: auto;
  flex: 1;
  min-height: 0;
  scrollbar-color: #3c4761 transparent;
}
.setting-group {
  padding: 22px 20px;
  border-bottom: 1px solid var(--border);
}
.section-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
}
.section-icon {
  border: 1px solid #3c465a;
  background: #1b2436;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--gold);
  font-size: 17px;
}
.section-head h2 {
  font-size: 14px;
  margin: 0;
  letter-spacing: -0.2px;
}
.param {
  margin-bottom: 17px;
}
.param:last-child {
  margin-bottom: 0;
}
.param-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.param label {
  color: #cbd5e7;
  font-weight: 550;
  font-size: 12px;
}
.param-unit {
  color: #7f8da9;
  font-size: 11px;
}
.param-input {
  display: flex;
  gap: 5px;
  align-items: center;
  background: #0e1522;
  border: 1px solid #303e55;
  border-radius: 7px;
  padding: 2px 5px;
}
.param-input input {
  width: 54px;
  color: #f7fafc;
  background: transparent;
  border: 0;
  outline: 0;
  text-align: right;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
}
.param-input input::-webkit-outer-spin-button,
.param-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.param-input:focus-within {
  border-color: var(--gold);
}
.param input[type="range"] {
  width: 100%;
  accent-color: #dba75b;
  cursor: pointer;
  height: 5px;
  display: block;
}
.field-hint,
.colors-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin: 8px 0 16px;
}
.field-label {
  display: block;
  color: #ccd6e8;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
.select {
  width: 100%;
  background: #0e1522;
  color: var(--text);
  border: 1px solid #354059;
  border-radius: 8px;
  padding: 10px 11px;
  outline: none;
}
.select:focus {
  border-color: var(--gold);
}
.settings-footer {
  border-top: 1px solid var(--border);
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.settings-footer .button {
  font-size: 11px;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  text-align: center;
  transition:
    filter 0.15s,
    background 0.15s;
}
.button:hover {
  filter: brightness(1.15);
}
.button:disabled {
  opacity: 0.45;
  cursor: wait;
}
.block {
  width: 100%;
}
.button.primary {
  background: linear-gradient(100deg, #efc179, #e9a753);
  color: #302214;
  box-shadow: 0 3px 16px #edb46021;
}
.button.outline {
  background: #171f2e;
  color: #f3d5a2;
  border-color: #5c4d38;
}
.button.subtle {
  background: #222e42;
  color: #d6e1f2;
  border-color: #37445b;
}
.button.minimal {
  background: transparent;
  color: #d6dfea;
  border-color: #324055;
}
.button.compact {
  padding: 9px;
  margin-top: 14px;
}
.import-label {
  cursor: pointer;
}
.viewer-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: #0d1420;
}
.canvas-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 24px;
  gap: 18px;
}
.canvas-toolbar > .icon-btn {
  position: absolute;
  right: 20px;
}
.view-tabs {
  display: flex;
  background: #1a2332;
  border: 1px solid #303c52;
  padding: 4px;
  gap: 3px;
  border-radius: 10px;
}
.view-tabs .tab {
  background: transparent;
  border: 0;
  color: #8997b0;
  border-radius: 7px;
  padding: 9px 13px;
  font-weight: 650;
  font-size: 11px;
  white-space: nowrap;
}
.view-tabs .tab.active {
  color: #f7e0bb;
  background: #364055;
  box-shadow: inset 0 0 0 1px #55627a;
}
.scene {
  position: relative;
  flex: 1;
  min-height: 260px;
  overflow: hidden;
}
.scene canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
.scene canvas:active {
  cursor: grabbing;
}
.scene-gradient {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 37%,
    transparent 33%,
    #0d142055 72%,
    #0d1420 100%
  );
}
.scene-hint {
  pointer-events: none;
  position: absolute;
  bottom: 23px;
  left: 24px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: #9eafc3;
  font-size: 10px;
}
.scene-axis {
  pointer-events: none;
  position: absolute;
  right: 23px;
  bottom: 22px;
  color: #8598b7;
  font-size: 11px;
}
.axis-z {
  display: inline-block;
  width: 3px;
  height: 21px;
  background: #779be5;
  border-radius: 2px;
  transform: rotate(12deg) translateY(5px);
  margin-right: 8px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #2a3448;
  background: #131c2b;
}
.metric {
  padding: 17px 8px 15px;
  text-align: center;
  border-right: 1px solid #2a3448;
}
.metric:last-child {
  border: 0;
}
.metric > span {
  display: block;
  color: #8291ac;
  letter-spacing: 0.6px;
  font-size: 9px;
  font-weight: 700;
}
.metric strong {
  display: block;
  color: var(--gold2);
  font-size: 22px;
  line-height: 1.4;
  font-weight: 650;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.metric small {
  font-size: 11px;
  color: #abbed3;
  font-weight: 400;
}
.right-panel {
  min-height: 0;
  overflow: auto;
  padding: 17px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-left: 1px solid var(--border);
  background: #101724;
  scrollbar-color: #3a465e transparent;
}
.details-card,
.panel-list-card,
.export-card {
  background: #161f2f;
  border: 1px solid #2f3a50;
  border-radius: 13px;
  padding: 16px;
}
.detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.detail-top h2,
.export-card h2 {
  font-size: 15px;
  margin: 0;
  letter-spacing: -0.2px;
}
.panel-id,
.mini-count {
  border: 1px solid #4a5264;
  background: #222c40;
  border-radius: 6px;
  padding: 5px 8px;
  color: #f2d09d;
  font-size: 11px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.empty-select {
  color: #98a6bd;
  font-size: 12px;
  line-height: 1.65;
  padding: 9px 0;
}
.selected-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #b8c6db;
  margin-bottom: 17px;
}
.selected-dot {
  height: 34px;
  width: 34px;
  border-radius: 8px;
  background: #e5ab60;
  border: 2px solid #ffffff33;
}
.top-space {
  margin-top: 14px;
}
.panel-list-card {
  flex: 1;
  min-height: 210px;
  display: flex;
  flex-direction: column;
}
.panel-filter input {
  width: 100%;
  border-radius: 7px;
  border: 1px solid #364359;
  background: #0d1420;
  color: #e8effb;
  padding: 10px 11px;
  outline: none;
}
.panel-filter input:focus {
  border-color: var(--gold);
}
.panel-list {
  overflow-y: auto;
  min-height: 130px;
  max-height: 360px;
  margin: 10px -7px -4px;
  scrollbar-color: #3f4c64 transparent;
}
.panel-row {
  padding: 7px 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  color: #c8d3e5;
  background: transparent;
  width: 100%;
  text-align: left;
}
.panel-row:hover {
  background: #252f44;
}
.panel-row.selected {
  border-color: #695d45;
  background: #3b3440;
}
.panel-row .color-dot {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex: none;
}
.panel-row strong {
  font-size: 12px;
}
.panel-row small {
  margin-left: auto;
  color: #8796ae;
  font-size: 10px;
}
.export-card {
  background: linear-gradient(152deg, #242f40, #182333 75%);
  border-color: #514a3e;
}
.export-card h2 {
  font-size: 18px;
  margin: 4px 0 7px;
}
.export-card p {
  margin: 0 0 18px;
  color: #a7b4cb;
  font-size: 11px;
  line-height: 1.6;
}
.export-card .button {
  margin-top: 8px;
}
.export-card .small-note {
  font-size: 10px;
  margin: 12px 0 0;
  color: #8c9bb2;
}
.palette-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
.palette-swatch {
  display: block;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid #ffffff40;
  box-shadow: 0 2px 7px #0005;
}
.palette-color-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.palette-color-remove {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #8b9bac55;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.palette-color-remove:hover:not(:disabled) {
  background: #d85a5a20;
  color: #be3434;
}
.palette-color-remove:focus-visible {
  outline: 2px solid #4088d4;
  outline-offset: 2px;
}
.palette-color-remove:disabled {
  opacity: 0.35;
  cursor: default;
}
.scene-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: #0d1420d9;
  color: #d5e2f3;
  font-size: 14px;
  z-index: 4;
}
.scene-loading.visible {
  display: flex;
}
.spinner {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 2px solid #ffffff30;
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#errorBanner {
  position: absolute;
  top: 12px;
  left: 18px;
  right: 18px;
  background: #4a2530;
  color: #ffe0dd;
  padding: 12px;
  border: 1px solid #8d424d;
  border-radius: 9px;
  z-index: 5;
}
#errorBanner[hidden] {
  display: none;
}
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #dcb676;
  color: #231b15;
  padding: 12px 17px;
  border-radius: 9px;
  font-weight: 650;
  box-shadow: 0 8px 38px #0008;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 20;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.help-page {
  min-height: 100vh;
  background: #0c1320;
}
.help-wrap {
  width: min(1060px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 100px;
}
.help-lead {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
  margin-bottom: 72px;
}
.help-lead h1 {
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -2px;
  line-height: 1.1;
  margin: 13px 0 19px;
}
.help-lead h1 em {
  font-style: normal;
  color: var(--gold);
}
.help-lead p {
  font-size: 16px;
  color: #aab8ce;
  line-height: 1.75;
}
.help-diagram {
  background: #172131;
  border: 1px solid #344056;
  border-radius: 20px;
  padding: 20px;
}
.help-diagram svg {
  width: 100%;
  height: auto;
}
.help-section {
  margin-top: 64px;
}
.help-section > h2 {
  font-size: 27px;
  letter-spacing: -0.8px;
  margin: 0 0 10px;
}
.help-section > p {
  color: #aebbd0;
  font-size: 14px;
  line-height: 1.7;
  max-width: 760px;
}
.help-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 27px;
}
.help-step,
.help-mode,
.help-note {
  background: #172131;
  border: 1px solid #303d54;
  border-radius: 13px;
  padding: 22px;
}
.help-step .step-n {
  display: inline-grid;
  place-items: center;
  background: #3c3b37;
  color: #f7d29c;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-weight: 800;
}
.help-step h3,
.help-mode h3 {
  font-size: 15px;
  margin: 13px 0 7px;
}
.help-step p,
.help-mode p,
.help-note p {
  color: #a9b8cf;
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}
.help-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
  margin-top: 28px;
}
.help-mode {
  padding: 15px;
}
.help-mode svg {
  width: 100%;
  height: auto;
  display: block;
  background: #0f1928;
  border-radius: 9px;
}
.help-mode h3 {
  color: #f5d4a0;
}
.help-mode p {
  padding-bottom: 7px;
}
.help-note {
  margin-top: 24px;
  border-left: 3px solid #d6aa66;
}
.help-note strong {
  display: block;
  margin-bottom: 6px;
  color: #efd6ae;
}
.help-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 25px;
}
.help-columns h3 {
  margin: 10px 0;
  font-size: 15px;
}
.help-columns p,
.help-columns li {
  color: #aab9cc;
  font-size: 13px;
  line-height: 1.8;
}
.help-columns ul {
  padding-left: 18px;
}
.help-code {
  display: block;
  padding: 14px 18px;
  border-radius: 9px;
  white-space: pre-wrap;
  color: #f3d29c;
  background: #080d17;
  border: 1px solid #2c394d;
  font-size: 12px;
  margin: 12px 0;
}
.footer {
  border-top: 1px solid #263348;
  padding: 32px;
  text-align: center;
  color: #8b9cb7;
  font-size: 11px;
}
.footer a {
  color: var(--gold);
}
@media (max-width: 1250px) {
  .workbench {
    grid-template-columns: 286px minmax(300px, 1fr) 266px;
  }
  .canvas-toolbar {
    padding: 13px 8px;
  }
  .view-tabs .tab {
    padding: 9px 7px;
  }
  .right-panel {
    padding: 10px;
  }
  .settings-head {
    padding: 19px;
  }
  .setting-group {
    padding: 18px 15px;
  }
  .scene-hint {
    font-size: 9px;
    gap: 10px;
  }
}
@media (max-width: 1050px) {
  .workbench {
    grid-template-columns: 288px minmax(360px, 1fr);
    height: auto;
    min-height: calc(100vh - 72px);
  }
  .settings-panel {
    grid-row: 1 / 3;
    height: calc(100vh - 72px);
    position: sticky;
    top: 0;
  }
  .viewer-panel {
    height: calc(80vh - 72px);
    min-height: 490px;
  }
  .right-panel {
    border-left: 0;
    border-top: 1px solid var(--border);
    overflow: visible;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .export-card {
    grid-column: 1 / -1;
  }
  .panel-list {
    max-height: 280px;
  }
}
@media (max-width: 700px) {
  .topbar {
    padding: 0 12px;
    height: 64px;
  }
  .brand {
    font-size: 14px;
  }
  .brand small {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .brand-logo {
    width: 36px;
    height: 36px;
  }
  .header-nav {
    gap: 12px;
    font-size: 11px;
  }
  .header-right {
    gap: 5px;
  }
  .local-pill {
    display: none;
  }
  .hide-sm {
    display: none !important;
  }
  .workbench {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .settings-panel {
    position: static;
    order: 2;
    height: auto;
    border-right: 0;
  }
  .settings-scroll {
    overflow: visible;
  }
  .viewer-panel {
    order: 1;
    height: 65vh;
    min-height: 460px;
  }
  .canvas-toolbar {
    padding: 10px 4px;
    justify-content: start;
    overflow: auto;
  }
  .canvas-toolbar > .icon-btn {
    display: none;
  }
  .view-tabs {
    gap: 0;
  }
  .view-tabs .tab {
    font-size: 9px;
    padding: 7px 7px;
  }
  .scene-hint {
    left: 10px;
    bottom: 13px;
    gap: 7px;
  }
  .metrics .metric {
    padding: 13px 4px;
  }
  .metric > span {
    font-size: 8px;
  }
  .metric strong {
    font-size: 17px;
  }
  .right-panel {
    order: 3;
    display: flex;
    padding: 14px;
  }
  .help-lead,
  .help-steps,
  .help-modes,
  .help-columns {
    grid-template-columns: 1fr;
  }
  .help-wrap {
    padding-top: 30px;
  }
  .help-lead {
    gap: 30px;
    margin-bottom: 30px;
  }
}

.fallback-label {
  position: absolute;
  top: 16px;
  left: 16px;
  border: 1px solid #49566d;
  border-radius: 7px;
  background: #121a28df;
  color: #abbbd2;
  font-size: 10px;
  padding: 7px 11px;
  pointer-events: none;
}
.fallback-label[hidden] {
  display: none;
}

.palette-swatch input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  padding: 0;
  border: 0;
}

.fill-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #ccd6e8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.fill-toggle input {
  appearance: none;
  width: 36px;
  height: 21px;
  background: #354059;
  border: 1px solid #53617a;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}
.fill-toggle input:before {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #eef2fa;
  transition: transform 0.15s;
}
.fill-toggle input:checked {
  background: #b17e39;
  border-color: var(--gold);
}
.fill-toggle input:checked:before {
  transform: translateX(15px);
}
.fill-toggle input:focus-visible {
  outline: 2px solid var(--gold2);
  outline-offset: 3px;
}
.select:disabled,
.param input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
@media (prefers-reduced-motion: reduce) {
  .fill-toggle input:before {
    transition: none;
  }
}

/* Filament selection and the room preview. */
.material-block {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.material-block h3 {
  font-size: 12px;
  margin: 0 0 14px;
  color: #dce4f2;
}
.filament-filters {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 8px;
}
.filament-filters .select {
  padding: 9px 6px;
  font-size: 11px;
  min-width: 0;
}
.custom-color {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0 7px;
  color: #b8c5d9;
  font-size: 11px;
  cursor: pointer;
}
.custom-color input {
  width: 28px;
  height: 28px;
  border: 1px solid #52617b;
  border-radius: 6px;
  padding: 2px;
  background: #182133;
  cursor: pointer;
}
.custom-color code {
  margin-left: auto;
  font-size: 10px;
  color: #8e9eb8;
}
.filament-source {
  font-size: 10px;
  color: var(--gold);
}
.canvas-toolbar {
  padding-right: 58px;
}
.view-tabs {
  flex-wrap: wrap;
  justify-content: center;
}
.room-caption {
  display: none;
  position: absolute;
  left: 26px;
  top: 24px;
  pointer-events: none;
  color: #fff4e2;
  text-shadow: 0 1px 10px #35271d88;
}
.room-caption span {
  display: block;
  font-size: 8px;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.room-caption strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.5px;
}
.room-caption small {
  display: block;
  margin-top: 6px;
  font-size: 9px;
  opacity: 0.75;
}
.scene.realistic .room-caption {
  display: block;
}
.scene.realistic .scene-gradient {
  background: radial-gradient(
    ellipse at 50% 45%,
    transparent 45%,
    #26190d24 100%
  );
}
.scene.realistic .scene-axis {
  display: none;
}
.scene.realistic .scene-hint {
  color: #fff0db;
  text-shadow: 0 1px 5px #27190e;
}
@media (max-width: 640px) {
  .room-caption {
    left: 15px;
    top: 16px;
  }
  .room-caption strong {
    font-size: 20px;
  }
  .room-caption small {
    max-width: 200px;
  }
  .canvas-toolbar {
    padding-right: 40px;
  }
  .view-tabs .tab {
    white-space: normal;
  }
}

/*Compact bilingual language toggle, shared by editor and guide.*/

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
  background: #141d2b;
  border: 1px solid #39475d;
  border-radius: 9px;
  padding: 3px;
}

.language-option {
  background: transparent;
  color: #9cacc5;
  border: 0;
  border-radius: 6px;
  min-width: 32px;
  height: 27px;
  padding: 0 6px;
  font-weight: 750;
  font-size: 11px;
  letter-spacing: 0.4px;
}

.language-option:hover {
  color: #f5e1c1;
}

.language-option.active {
  background: #3a4355;
  color: #ffdfa3;
  box-shadow: inset 0 0 0 1px #6e604a;
}

.language-option:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (max-width: 700px) {
  .language-option {
    min-width: 25px;
    height: 25px;
    padding: 0 4px;
    font-size: 10px;
  }
  .help-page .header-right > .button {
    padding: 7px 8px;
    font-size: 10px;
  }
}

/*Installation direction selector*/

.mount-setting {
  margin: 0 0 22px;
  min-width: 0;
}

.mount-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px;
  border: 1px solid #3c495f;
  background: #0d1420;
  border-radius: 10px;
  padding: 4px;
  min-width: 0;
}

.mount-option {
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #a9b9d1;
  padding: 10px 5px;
  font-size: 12px;
  font-weight: 650;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.mount-option:hover {
  color: #fff;
  background: #263145;
}

.mount-option.active {
  background: #3c3d47;
  border-color: #826c4b;
  color: #ffe2b0;
}

.mount-setting > .field-hint {
  margin: 9px 0 0;
  line-height: 1.5;
}

/*Keep the Parts list inside its card even in short/narrow viewports.*/

.right-panel {
  min-width: 0;
  overflow-x: hidden;
}

.details-card,
.panel-list-card,
.export-card {
  min-width: 0;
  max-width: 100%;
}

.panel-list-card {
  flex: 1 1 185px;
  min-height: 150px;
  max-height: 100%;
  overflow: hidden;
}

.panel-list-card > .detail-top,
.panel-list-card > .panel-filter {
  flex: 0 0 auto;
  min-width: 0;
}

.panel-list {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  max-height: none;
  margin: 10px 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.panel-row {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.panel-row small {
  min-width: 0;
  flex: 1 1 auto;
  margin-left: 0;
  text-align: right;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.panel-row strong,
.panel-row .color-dot {
  flex: 0 0 auto;
}

@media (max-width: 1050px) {
  .panel-list-card {
    flex: initial;
    max-height: 365px;
    min-height: 180px;
  }
  .panel-list {
    flex: 1;
    max-height: 265px;
  }
}

@media (max-width: 700px) {
  .panel-list-card {
    max-height: 360px;
    min-height: 180px;
  }
  .panel-list {
    max-height: 250px;
  }
}

/*Illustrated fit variants on the guide page.*/

.fit-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0;
}

.fit-choice {
  min-width: 0;
  border: 1px solid #344156;
  background: #141d2c;
  border-radius: 12px;
  padding: 18px;
}

.fit-choice h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #f0c88c;
}

.fit-choice svg {
  width: 100%;
  height: auto;
  max-height: 230px;
  display: block;
}

.fit-choice p {
  font-size: 12px;
  line-height: 1.65;
  color: #bbc8dc;
  margin: 8px 0 0;
}

@media (max-width: 700px) {
  .fit-choices {
    grid-template-columns: 1fr;
  }
}

/* Visual feedback for inside/outside insert installation. */
.mount-profile {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b1320;
}
.mount-profile-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}
.mount-profile svg {
  display: block;
  width: 100%;
  height: 76px;
  overflow: visible;
}
.mount-profile-frame {
  fill: none;
  stroke: var(--gold);
  stroke-width: 7;
  stroke-linejoin: round;
}
.mount-profile-insert {
  fill: #5fb7ed66;
  stroke: #5fb7ed;
  stroke-width: 2;
  stroke-linejoin: round;
}
.mount-profile-direction {
  text-align: center;
  color: var(--gold2);
  font-size: 11px;
  font-weight: 650;
}
.mount-scene-status {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  border: 1px solid #b39a6c;
  border-radius: 7px;
  background: #121a28eb;
  color: var(--gold2);
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 650;
  pointer-events: none;
}
@media (max-width: 700px) {
  .mount-scene-status {
    top: 50px;
    right: 10px;
  }
}

.studio-light .language-switch,
.studio-light .mount-toggle,
.studio-light .mount-profile {
  background: #f6f8f0;
  border-color: #dce3d0;
}
.studio-light .language-option,
.studio-light .mount-option,
.studio-light .mount-profile-labels {
  color: #5b6b4b;
}
.studio-light .language-option.active,
.studio-light .mount-option.active {
  background: #e7edda;
  border-color: #adbd92;
  color: #435437;
  box-shadow: none;
}
.studio-light .language-option:hover,
.studio-light .mount-option:hover {
  background: #edf2e3;
  color: #34452b;
}
.studio-light .mount-profile-frame {
  stroke: #8e9f73;
}
.studio-light .mount-profile-direction {
  color: #536b40;
}
.studio-light .mount-scene-status {
  background: #fbfdf5ed;
  border-color: #dce3d0;
  color: #536b40;
}
@media (min-width: 761px) {
  .concept-b .mount-scene-status {
    top: 110px;
    right: 50%;
    transform: translateX(50%);
  }
}
