/* The drawing and the inspector share the proportions of the opening spread. */
#roomSetup, #studio, #accessBox {
  color: var(--ink);
  color-scheme: light;
  background: var(--paper);
  font-family: var(--sans);
}
#roomSetup .topbar, #studio .topbar {
  color: #f8f1e8;
  background: #211b18;
  border-bottom: 1px solid #6f6154;
  padding-inline: clamp(14px, 2.15vw, 40px);
}
.topbar .brand { display: flex; align-items: center; }
.topbar .brand img { width: clamp(98px, 8.8vw, 150px); height: auto; display: block; }
.topbar .micro { padding-inline-start: 15px; border-inline-start: 1px solid #807367; font: 500 .76rem/1.2 var(--sans); letter-spacing: .13em; white-space: nowrap; }
#roomSetup .topbar .textb, #studio .topbar .textb {
  color: #f3ece1; font: 400 .87rem/1.35 var(--sans);
  text-underline-offset: 4px; text-decoration-thickness: 1px;
}
#studio :is(button, a, select, input):focus-visible, #roomSetup :is(button, a, select, input):focus-visible, #accessBox :focus-visible {
  outline: 2px solid #955e3b; outline-offset: 2px;
}
.topbar .pselect, #studio .topbar :is(.modelDownload,.studioUndo,.toolsToggle) {
  position: relative; background: transparent; border: 1px solid #83766a; padding: 7px 12px;
  color: #fcf5e9; border-radius: 0; font: 500 .84rem/1.25 var(--sans);
}
.topbar .pselect option { color: var(--ink); background: var(--paper); }
#studio .topbar :is(.modelDownload,.studioUndo,.toolsToggle):not(:disabled):hover { background: #44382f; }
#studio button:disabled { opacity: .44; }
#roomSetup .roomDrawing {
  background: radial-gradient(ellipse at 41% 33%, #f5f1e9, #dcd4c9 73%, #c5b8aa);
  overflow: hidden;
}
#roomSetup .drawingCaption { color: #463c33; font-family: var(--sans); font-variant-numeric: tabular-nums; }
#roomSetup .roomForm, #studio #editorPanel, #studio .nuSide {
  color: var(--ink); background: var(--paper);
  border-inline-start: 1px solid var(--rule); font-family: var(--sans);
  scrollbar-color: #a99e90 var(--paper);
}
#roomSetup .roomForm { align-self: stretch; justify-content: center; }
#roomForm h1, #studio :is(.plateTitle h2,.nuHeading span,#editorPanel>h2,.nuSide>h2) {
  font-family: var(--display); font-weight: 400; letter-spacing: -.057em;
}
#roomForm h1 { font-size: clamp(54px, 5.4vw, 102px); line-height: .94; outline: 0; }
#roomForm p, #studio .panel :is(.hint,.minor,.legend span), #studio .nuSide :is(.nuFoot,p) { color: #5a5047; }
#roomSetup .productField {
  display: grid; grid-template-columns: 76px minmax(0,1fr); grid-template-rows: auto auto;
  column-gap: 14px; row-gap: 2px; align-items: center;
  border-block: 1px solid var(--rule); padding-block: 9px;
}
#roomSetup .edProductThumb { width: 76px; height: 62px; grid-row: span 2; object-fit: cover; border-radius: 0; }
#roomSetup .productField>span { font: 500 .76rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: .09em; }
#roomForm select, #studio :is(#editorPanel,.nuSide) select, #accessBox select, #accessBox input {
  border: 1px solid #afa398; border-radius: 0; color: #2c241f;
  background-color: #f5f2ec; padding: 8px 10px; font-family: var(--sans);
}
#roomForm select, #studio :is(#editorPanel,.nuSide) select {
  appearance: none;
  background-image: linear-gradient(45deg,transparent 50%,#544a40 50%),linear-gradient(135deg,#544a40 50%,transparent 50%);
  background-size: 5px 5px,5px 5px; background-repeat: no-repeat;
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  padding-inline-end: 32px;
}
html[dir="rtl"] #roomForm select, html[dir="rtl"] #studio :is(#editorPanel,.nuSide) select {background-position: 10px 50%,15px 50%;}
#roomForm .productField select { width: 100%; min-width: 0; margin: 0; border: 0; padding-block: 2px; padding-inline-start: 0; background-color: transparent; font-size: 1.02rem; }
#roomForm .roomPresets { gap: 5px; }
#roomForm .roomPresets button, #studio :is(.minorbtn,.posBtns button,.nuBtn) {
  background: #f4f0e9; border: 1px solid #a99c8e; color: #372d26; border-radius: 0; padding: 8px 11px;
}
#roomForm .roomPresets button[aria-pressed=true], #studio .nuBtn[aria-pressed=true] { background: #352b26; border-color: #352b26; color: #fffaf1; }
#roomForm .numeric { background: #f6f2ed; border: 1px solid #b1a598; border-radius: 0; color: #62554a; }
#roomForm .numeric input { color: var(--ink); font-variant-numeric: tabular-nums; }
#roomForm .primary {
  color: #fff8ee; background: #302621; border: 1px solid #302621; border-radius: 0;
  padding: 14px 18px; text-align: center; font: 500 1rem/1.2 var(--sans);
}
#roomForm .primary:hover { background: #4a352d; }
#roomSetup input[type=range], #studio :is(.panel,.nuSide) input[type=range] {
  accent-color: #594035; cursor: pointer;
}
#studio .panel .lane output, #studio .nuSlider output { color: #542f27; font-weight: 500; font-variant-numeric: tabular-nums; }
#studio .panel :is(fieldset,.switchRow,.foot), #studio .nuSide :is(fieldset,.nuTabs,.nuFoot) { border-color: var(--rule); }
#studio :is(#editTabs,#materialTabs,.nuTabs) {
  display: flex; flex-wrap: wrap; gap: 0; border: 0; border-block: 1px solid var(--rule); background: var(--paper);
  border-radius: 0; padding: 0; align-items: stretch;
}
#studio :is(#editTabs,#materialTabs,.nuTabs) button {
  flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 8px 7px;
  border: 0; border-radius: 0; color: #5a5047; background: transparent;
  font: 500 .87rem/1.2 var(--sans); box-shadow: none;
}
#studio :is(#editTabs,#materialTabs,.nuTabs) button:is([aria-selected=true],[aria-pressed=true]) {
  color: #241b18; box-shadow: inset 0 -2px #51382e; background: #e4dcd1;
}
#studio .panel .lane { padding-bottom: 3px; }
#studio #finishes .chips, #studio #finishChips, #studio .nuSwatches {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: stretch;
  gap: 1px; background: #b7ad9f; border: 1px solid #b7ad9f;
}
#studio #finishes .chip, #studio #finishChips .chip, #studio .nuSwatch {
  width: 100%; min-width: 0; height: auto; min-height: 0; display: flex; flex-direction: column;
  justify-content: flex-start; align-items: stretch; gap: 0; padding: 0 0 8px; position: relative;
  border: 0; border-radius: 0; box-shadow: none; background: #f3efe9;
  color: #332920; text-align: start; text-indent: 7px; font: 500 .83rem/1.35 var(--sans);
  overflow-wrap: anywhere;
}
#studio #finishes .chip::before, #studio #finishChips .chip::before, #studio .nuSwatch>i {
  display: block; flex: none; width: 100%; height: auto; aspect-ratio: 2 / 1; margin: 0 0 7px;
  background: #c1b9ae var(--img) center / cover; border-radius: 0; border: 0;
}
#studio #finishChips .chip::after { content: attr(aria-label); display: block; padding-inline: 7px; font: inherit; text-indent: 0; }
#studio .nuSwatch>span { padding-inline: 7px; text-indent: 0; }
#studio :is(#finishes,#finishChips) .chip.on, #studio .nuSwatch[aria-pressed=true] {
  color: #fcf8ee; background-color: #44372e; outline: 2px solid #44372e; outline-offset: -2px;
}
#studio .panel .removeItem { border-radius: 0; border: 1px solid #aa8676; background: #f2eae3; color: #702f29; }
#studio .stage:not([data-night=true]), #studio .nuView:not([data-dark=true]) { background: radial-gradient(ellipse at 38% 31%,#faf8f3 0%,#e1d9ce 61%,#b8ab9a 100%); }
#studio .plateTitle, #studio .nuHeading { color: #2a231f; text-shadow: 0 1px 10px #fff9; }
#studio [data-night=true] .plateTitle, #studio [data-dark=true] .nuHeading { color: #fbf3e5; text-shadow: 0 1px 12px #1a140f; }
#studio :is(.hud,.nuCamera,.lightModes,.nuLight), #studio .detailBtn {
  border: 1px solid #8c7e6b99; border-radius: 2px; padding: 2px;
  background: #f1ede4e3; box-shadow: 0 2px 13px #211c1524;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
#studio .hud { pointer-events: auto; }
#studio :is(.hud,.nuCamera,.lightModes,.nuLight) button, #studio .detailBtn {
  color: #322922; font: 500 .85rem/1.15 var(--sans);
}
#studio :is(.hud,.nuCamera,.lightModes,.nuLight) button {
  border: 0; border-radius: 0; padding: 8px 10px; background: transparent;
}
#studio :is(.hud,.nuCamera,.lightModes,.nuLight) button[aria-pressed=true], #studio .detailBtn[aria-pressed=true] { background: #45372f; color: #fff9ee; }
#studio .stage[data-night=true] .hud button:not([aria-pressed=true]) { color: #322922; }
#studio .detailBtn { padding: 8px 11px; min-height: 33px; align-self: flex-end; }
#studio .status { color: #514539; }
#studio .stage[data-night=true] .status { color: #f1e9da; }
#accessBox { background: var(--paper); border: 1px solid #ad9e90; border-radius: 0; }
#accessBox::backdrop { background: #2019149c; }
#roomError { color: #923e2d !important; }

@media (min-width:1181px) and (pointer:fine) {
  #roomSetup .roomSpread { grid-template-columns: minmax(0,2.12fr) minmax(340px,1fr); }
  #studio:not([hidden]) { height: 100dvh; min-height: 0; display: flex; flex-direction: column; }
  #studio .topbar { flex: 0 0 auto; }
  #studio .editor:not([hidden]), #studio #nuStudio:not([hidden]) {
    flex: 1; min-height: 0; height: auto; display: grid;
    grid-template-columns: minmax(0,2.12fr) minmax(340px,1fr); grid-template-rows: minmax(0,1fr);
  }
  #studio :is(.stage,.nuView) { position: relative; inset: auto; height: 100%; min-height: 0; }
  #studio #editorPanel, #studio .nuSide { height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: clamp(19px,2.05vw,43px); }
  #studio :is(#editorPanel>h2,.nuSide>h2) { font-size: clamp(38px,3.15vw,70px); line-height: 1; }
  #studio .hud { left: auto; right: 17px; bottom: 17px; max-width: calc(100% - 34px); }
  #studio .status { max-width: 28%; bottom: 62px; }
  #studio .nuCamera { width: max-content; max-width: 100%; margin-inline: auto; }
  .studioCommands { gap: 6px; }
}
@media (max-width:1180px), (pointer:coarse) {
  #studio .topbar .studioCommands { border-color: #88796d; background: #28211df8; border-radius: 0; }
  #studio :is(.hud,.nuCamera) { width: fit-content; max-width: calc(100% - 12px); margin-inline: auto; }
  #studio :is(.hud,.nuCamera,.lightModes,.nuLight) button { padding-inline: 8px; }
  #studio :is(#editTabs,.nuTabs,#materialTabs) button { min-height: 44px; }
  #roomSetup .topbar { padding-inline: max(10px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-right)); }
}
@media(max-width:780px) and (orientation:portrait) {
  #roomSetup .roomForm, #studio #editorPanel, #studio .nuSide { border-inline: 0; border-top: 1px solid var(--rule); }
  #roomSetup .roomForm { padding-top: 16px; }
  #roomSetup .productField { display: grid; grid-template-columns: 56px minmax(0,1fr); column-gap: 11px; }
  #roomSetup .edProductThumb { width: 56px; height: 52px; }
  #roomSetup .topbar .micro { display: none; }
  #roomSetup .topbar .studioNav { flex: 1; justify-content: end; }
  #roomForm h1 { font-size: clamp(43px,10vw,64px); }
  #roomForm .primary { box-shadow: 0 0 0 4px var(--paper); }
  #studio .topbar { padding-inline: max(7px,env(safe-area-inset-left)) max(7px,env(safe-area-inset-right)); }
  #studio .topbar .navgroup:last-child { gap: 5px; }
  #studio .topbar :is(.studioUndo,.toolsToggle) { padding-inline: 8px; }
  #studio :is(.nuCamera,.hud) { max-width: calc(100% - 10px); overflow-x: auto; scrollbar-width: none; justify-content: flex-start; flex-wrap: nowrap; }
  #studio :is(.hud,.nuCamera)::-webkit-scrollbar { display: none; }
  #studio :is(.nuTabs,#editTabs) button { padding-inline: 6px; }
  #studio :is(.plateTitle,.nuHeading) { max-width: calc(100% - 120px); }
}
@media(prefers-reduced-transparency:reduce) {
  #studio :is(.hud,.nuCamera,.lightModes,.nuLight,.detailBtn) { -webkit-backdrop-filter: none; backdrop-filter: none; background: #f1ece4; }
}
