html { scroll-behavior: auto; background: #0d0d0d; }
body { background: #0d0d0d; }
.nv3-page { min-height: 0; background: #0d0d0d; }
.nv3-wrap { width: 100%; max-width: none; margin: 0; }
.nvb-main { padding: 0; }
.nvb-page .nvp-stage > .nv3-viewer { height: clamp(420px, 38vw, 620px); }
.nvp-workspace { gap: 24px; }
.nvp-stage { min-width: 0; }
button { font-weight: 400; }
.nvp-workspace { grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
.nv-settings { min-width: 0; }
.nv-settings-toggle { display: none; }
.nv-settings-content[hidden] { display: none; }
.nvp-panel { padding: 18px; background: #242424; border-color: #383838; border-radius: 0; }
.nvp-panel-title { margin-bottom: 14px; }
.nvp-panel-title h3 { font-size: 21px; }
.nvp-parts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding-bottom: 14px; }
.nvp-parts button { display: grid; align-content: start; min-height: 76px; padding: 8px; gap: 6px; }
.nvp-parts button > i { width: 22px; height: 22px; }
.nvp-parts button > svg { display: none; }
.nvp-parts strong { font-size: 11px; }
.nvp-parts small { font-size: 10px; line-height: 1.3; overflow-wrap: anywhere; }
.nvp-color-heading { margin: 16px 0 10px; }
.nvp-color-heading h4 { font-size: 16px; }
.nvp-filters { grid-template-columns: minmax(0, 1fr) 104px; margin-bottom: 10px; }
.nvp-color-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-height: 176px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #737373 #242424; gap: 6px 3px; padding-right: 4px; }
.nvp-color-grid > button { min-height: 68px; }
.nvp-color-sample { height: 28px; }
.nvp-color-name { min-height: 26px; font-size: 10px; padding-top: 5px; }
.nvp-sheen { margin-top: 12px; }
.nvp-selected { display: none; }
.nvp-presets { margin: 0 0 14px; }
.nvp-presets .nvp-schemes { grid-template-columns: 1fr 1fr; max-height: 260px; overflow-y: auto; }
.nvp-presets .nvp-scheme-materials { grid-template-columns: 1fr; }
.nvp-presets .nvp-collection-heading { display: none; }
.nv-view-settings { margin-top: 16px; border-top: 1px solid #444; }
.nv-view-settings > summary, .nv-palette-save > summary { cursor: pointer; min-height: 44px; padding: 12px 0; font-size: 13px; color: #ddd; }
.nvp-stage-controls { border-radius: 0; padding: 6px 0; background: transparent; }
.nvp-stage-controls .nv3-environments { flex-wrap: wrap; }
.nvp-stage-controls .nv3-environments button { min-height: 44px; }
.nvp-stage-controls .nvp-compare { font-size: 12px; min-height: 44px; gap: 6px; }
.nvp-architecture { flex-direction: column; align-items: stretch; }
.nv-palette-save { margin-top: 18px; border-top: 1px solid #383838; }
.nvp-result { margin: 0; padding: 18px; background: #242424; border-radius: 0; }
.nvp-note { margin-top: 10px; color: #999; }
.nvb-page .nvp-stage > .nv3-viewer.is-expanded { height: 100dvh; }
button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #ff6b30; outline-offset: 3px; }
@media (max-width: 900px) {
 .nvp-workspace { grid-template-columns: minmax(0, 1fr); gap: 12px; }
 .nvp-stage { position: relative; top: auto; }
 .nvb-page .nvp-stage > .nv3-viewer { height: clamp(280px, 70vw, 440px); }
 .nvb-page .nvp-panel :is(button,input,select,summary) { scroll-margin-top: 20px; }
 .nv-settings-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px; background: #242424; color: #eee; border: 1px solid #444; font-size: 15px; }
 .nv-settings-toggle > span:last-child { color: #ff6b30; font-size: 23px; }
 .nv-settings-toggle[aria-expanded=true] { border-color: #ff6b30; }
 .nv-settings-content { max-height: 420px; overflow-y: auto; overscroll-behavior-y: contain; animation: nvSettingsIn 220ms ease-out; }
 .nvp-panel { padding: 16px; border-top: 0; }
 .nvp-panel-title { display: none; }
 .nvp-color-grid { max-height: 164px; }
 .nvp-parts button { min-height: 78px; }
 .nvp-parts strong { font-size: 12px; }
 .nvp-parts small { font-size: 11px; }
 .nvp-architecture .nv3-mode button { min-height: 44px; }
 .nvp-stage-caption { padding-top: 8px; font-size: 11px; max-height: none; }
 .nvp-summary { grid-template-columns: 1fr; gap: 12px; }
 .nvp-actions { display: grid; grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
 .nvb-page .nvp-stage > .nv3-viewer { height: 300px; }
 .nvp-filters { grid-template-columns: minmax(0,1fr) 119px; }
 .nvp-search input, .nvp-filters select { font-size: 16px; height: 44px; }
 .nvp-stage .nv3-views button { min-height: 44px; }
 .nvp-stage .nv3-zoom button, .nvp-stage .nv3-tools button { min-height: 40px; width: 40px; }
}
@keyframes nvSettingsIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .nv-settings-content { animation: none; } }

/* Model controls belong to the model card; the palette has its own selector. */
.nv-viewer-card { background: #202626; border: 1px solid #383e3e; }
.nvb-page .nv-viewer-card > .nv3-viewer { height: clamp(420px, 38vw, 620px); border: 0; border-radius: 0; }
.nvb-page .nv-viewer-card > .nv3-viewer.is-expanded { position: fixed; inset: 0; height: 100dvh; z-index: 10; }
.nvp-stage:has(.is-expanded) { z-index: 10; }
.nv-model-controls { padding: 12px 16px; }
.nv-model-controls .nvp-stage-controls { padding: 0; justify-content: space-between; gap: 8px; }
.nv-model-controls .nvp-architecture { flex-direction: row; flex-wrap: wrap; gap: 12px; margin-top: 10px; padding: 12px 0 0; background: transparent; border-top: 1px solid #404747; }
.nv-model-controls .nv3-mode { flex-shrink: 0; }
.nv-model-controls .nvp-cut { flex: 1; min-width: 180px; }
.nv-capture-footer { display: flex; justify-content: flex-end; padding: 0 16px 12px; }
.nv-capture-button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; background: transparent; color: #b9c3c3; border: 1px solid #495252; font-size: 12px; }
.nv-capture-button svg { width: 17px; height: 17px; }
.nv-capture-button:disabled { opacity: .5; }
.nvp-stage .nv3-tools { position: static; }
.nvp-stage .nv3-tools .nv-auto-rotate { display: inline-flex; align-items: center; gap: 7px; width: auto; min-height: 44px; padding: 0 12px; font-size: 12px; }
.nv-auto-rotate svg { width: 17px; height: 17px; }
.nv-auto-rotate[aria-pressed=true] { color: #ff996d; border-color: #ff6b30; }
.nv-material-select { display: grid; gap: 8px; margin-bottom: 18px; }
.nv-material-select > span { color: #b8b8b8; font-size: 12px; }
.nv-material-select select { width: 100%; min-width: 0; min-height: 46px; padding: 0 10px; border: 1px solid #606060; border-radius: 0; background: #191919; color: #eee; font: inherit; font-size: 14px; }
.nvp-filters select { background: #191919; border-color: #606060; }
.nvp-panel-title { display: none; }
.nvp-selected { display: flex; margin-top: 12px; padding-top: 12px; }
.nvp-selected > i { width: 28px; height: 28px; }
.nvp-selected strong { font-size: 13px; }
@media (max-width: 900px) {
 .nvb-page .nv-viewer-card > .nv3-viewer { height: clamp(300px, 70vw, 440px); }
 .nv-model-controls { padding: 12px; }
 .nv-model-controls .nvp-stage-controls { justify-content: flex-start; flex-wrap: wrap; }
 .nv-model-controls .nvp-compare { font-size: 12px; }
 .nv-capture-footer { padding: 0 12px 12px; }
 .nv3-viewer-bottom { flex-wrap: wrap; gap: 8px; }
 .nv-settings-content { max-height: 420px; }
 .nv-material-select select { font-size: 16px; }
}
@media (max-width: 600px) {
 .nvb-page .nv-viewer-card > .nv3-viewer { height: 340px; }
 .nvp-stage .nv3-views { flex-wrap: wrap; }
 .nvp-stage .nv3-viewer-bottom { left: 12px; right: 12px; justify-content: flex-start; }
 .nvp-stage .nv3-tools { width: 100%; }
 .nv-model-controls .nvp-architecture { flex-direction: column; align-items: stretch; }
 .nv-model-controls .nv3-mode button { min-height: 44px; }
}

/* Consistent neutral controls, aligned with the project site's black/orange UI. */
.nvp-workspace { align-items: start; }
.nvp-stage { position: relative; top: auto; padding: 0; background: transparent; }
.nv-viewer-card { background: #242424; border-color: #383838; }
.nv-model-controls { padding: 16px; }
.nv-model-controls .nvp-stage-controls { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: stretch; gap: 12px; }
.nv-model-controls .nv3-environments { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; gap: 4px; }
.nv-model-controls .nv3-environments button { justify-content: center; min-height: 44px; padding: 8px 10px; background: #303030; border: 1px solid #444; border-radius: 0; color: #ccc; }
.nv-model-controls .nv3-environments button[aria-pressed=true] { color: #ff9c77; border-color: #ff6a33; background: #39291f; }
.nv-model-controls .nvp-compare { justify-content: center; background: #303030; border-color: #444; border-radius: 0; min-height: 44px; padding: 8px 12px; }
.nv-model-controls .nvp-architecture { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: 20px; margin-top: 16px; padding-top: 16px; border-color: #444; }
.nv-model-controls .nv3-mode { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; }
.nv-model-controls .nv3-mode button { justify-content: center; min-height: 44px; padding: 8px; border: 1px solid #444; border-radius: 0; background: #303030; color: #ccc; }
.nv-model-controls .nv3-mode button[aria-pressed=true] { border-color: #ff6a33; color: #ff9c77; background: #39291f; }
.nv-model-controls .nvp-cut { min-width: 0; width: 100%; gap: 10px; }
.nv-model-controls .nvp-cut input { width: 100%; accent-color: #ff6a33; }
.nvp-stage .nv3-viewer-bottom { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; }
.nvp-stage .nv3-views { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 3px; }
.nvp-stage .nv3-views button { justify-content: center; min-height: 44px; padding: 8px 10px; border-radius: 0; }
.nvp-stage .nv3-tools .nv-auto-rotate { border-radius: 0; min-height: 44px; }
.nvp-sheen button { background: #303030; border-color: #555; color: #ddd; border-radius: 0; }
.nvp-sheen button[aria-pressed=true] { background: #39291f; border-color: #ff6a33; color: #ff9c77; }
.nvp-search input { background: #191919; border-color: #555; border-radius: 0; }
.nvp-color-grid > button[aria-pressed=true] { border-color: #ff6a33; background: #39291f; }
.nvp-selected { border-color: #444; }
.nvp-selected > div > span { color: #999; }
.nvp-color-sample > i { background: #222; }
.nvp-stage-caption { padding: 10px 0 0; line-height: 1.5; color: #999; }
@media(max-width:1100px) {
 .nv-model-controls .nvp-stage-controls { grid-template-columns: minmax(0,1fr); }
 .nv-model-controls .nvp-architecture { grid-template-columns: minmax(0,1fr); gap: 16px; }
 .nvp-stage .nv3-viewer-bottom { grid-template-columns: minmax(0,1fr); gap: 6px; }
 .nvp-stage .nv3-tools { width: 100%; }
 .nvp-stage .nv3-tools .nv-auto-rotate { width: 100%; justify-content: center; }
 .nvp-stage .nv3-gesture { display: none; }
}
@media(max-width:600px) {
 .nv-model-controls { padding: 12px; }
 .nv-model-controls .nv3-environments button { font-size: 12px; padding-inline: 4px; }
 .nvp-stage .nv3-views button { font-size: 12px; padding-inline: 4px; }
 .nv-settings-content { max-height: none; overflow: visible; }
 .nvp-color-grid { max-height: 190px; }
 .nvp-filters { grid-template-columns: minmax(0,1fr); }
}

/* No nested palette scrolling: expand the document instead. */
html, body { height: auto; min-height: 0; overflow: hidden; scrollbar-gutter: auto; }
#root { display: flow-root; height: auto; min-height: 0; }
.nv-settings-content, .nvp-color-grid { max-height: none; overflow: visible; overscroll-behavior: auto; }
.nvp-color-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px 8px; padding: 0; }
.nvp-color-grid > button { min-height: 84px; padding: 6px; border-radius: 0; }
.nvp-color-sample { height: 36px; border-radius: 0; }
.nvp-color-name { font-size: 12px; line-height: 1.3; padding-top: 7px; min-height: 32px; overflow-wrap: normal; word-break: normal; hyphens: none; }
.nv-material-select { gap: 8px; margin-bottom: 24px; }
.nv-material-select select, .nvp-filters select { appearance: none; padding: 12px 42px 12px 14px; min-height: 48px; height: auto; border: 1px solid #555; border-radius: 0; background-color: #191919; color: #eee; font-size: 14px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ddd' stroke-width='1.5'%3E%3Cpath d='m3 6 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 16px; background-position: right 14px center; }
.nvp-filters { grid-template-columns: minmax(0,1fr); gap: 10px; margin-bottom: 16px; }
.nvp-search input { height: 48px; padding: 12px 14px 12px 40px; font-size: 14px; border-color: #555; background: #191919; }
.nvp-search svg { top: 16px; left: 14px; }
.nvp-color-heading { margin: 0 0 14px; }
.nv-colors-expand { width: 100%; min-height: 44px; padding: 10px 14px; margin-top: 14px; color: #ddd; background: #303030; border: 1px solid #555; font: inherit; font-size: 13px; text-align: center; }
.nv-colors-expand:hover { background: #3c3c3c; }
.nvp-sheen { margin-top: 22px; }
.nvp-sheen button { min-height: 48px; padding: 10px 8px; font-size: 14px; }
.nvp-selected { margin-top: 20px; padding-top: 16px; }
@media(max-width:600px) { .nv-material-select select,.nvp-filters select,.nvp-search input { font-size: 16px; } }

/* Shared 3D interface: unobstructed canvas, camera views below, equal cards. */
.nvp-workspace { align-items: stretch; grid-template-columns: minmax(0,1fr) 340px; }
.nvp-stage { display: flex; flex-direction: column; }
.nv-viewer-card { display: flex; flex-direction: column; height: 100%; background: #242424; }
.nvb-page .nv-viewer-card > .nv3-viewer { flex: 1; min-height: 480px; height: clamp(480px,36vw,640px); background: #202020; }
.nvp-stage .nv3-viewer-bottom { position: static; inset: auto; transform: none; display: grid; grid-template-columns: minmax(0,1fr) auto; width: auto; margin: 0; padding: 12px 16px; border-top: 1px solid #3c3c3c; gap: 16px; background: #242424; }
.nvp-stage .nv3-views { width: 100%; gap: 6px; }
.nvp-stage .nv3-views button { min-height: 42px; border: 1px solid #484848; color: #ccc; background: #292929; }
.nvp-stage .nv3-views button[aria-pressed=true] { border-color: #ff6a33; color: #ff9c77; background: #39291f; }
.nvp-stage .nv3-tools { width: auto; }
.nvp-stage .nv3-tools .nv-auto-rotate { width: auto; min-height: 42px; padding: 0 12px; border: 1px solid #484848; color: #ccc; background: #292929; }
.nvp-stage .nv3-gesture { bottom: 16px; left: 16px; color: #aaa; }
.nv-model-controls { border-top: 1px solid #3c3c3c; padding: 14px 16px; }
.nv-model-controls .nvp-stage-controls { display: grid; grid-template-columns: minmax(0,1fr) minmax(180px,1fr); align-items: center; gap: 24px; }
.nv-model-controls .nvp-cut { display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.nv-model-controls .nvp-cut > span { display: flex; align-items: center; gap: 6px; }
.nv-model-controls .nvp-cut > span > span { margin-left: auto; font-size: 11px; }
.nv-model-controls .nvp-cut input { margin: 0; height: 22px; }
.nv-settings { display: flex; }
.nv-settings-content { width: 100%; display: flex; }
.nvp-panel { width: 100%; display: flex; flex-direction: column; height: 100%; padding: 20px; }
.nv-material-select { margin-bottom: 20px; }
.nv-material-select select, .nvp-filters select { min-height: 42px; padding-block: 9px; background-position: right 14px center; }
.nvp-filters { grid-template-columns: minmax(0,1fr) 118px; gap: 8px; margin-bottom: 14px; }
.nvp-search input { height: 40px; padding: 8px 10px 8px 32px; font-size: 12px; }
.nvp-search svg { top: 12px; left: 10px; width: 16px; height: 16px; }
.nvp-filters select { font-size: 12px; min-height: 40px; padding-left: 10px; padding-right: 30px; background-size: 12px; background-position: right 10px center; }
.nvp-color-grid { gap: 8px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.nvp-color-grid > button { min-height: 78px; }
.nvp-color-name { font-size: 11px; }
.nvp-sheen { margin-top: 18px; }
.nvp-sheen button { min-height: 42px; font-size: 13px; }
.nvp-selected { margin-top: auto; padding-top: 20px; }
.nv-dialog-header,.nv-dialog-footer { display: none; }
.nvp-stage-caption,.nvp-note { display: none; }
@media(max-width:1100px) and (min-width:901px) {
 .nvp-workspace { grid-template-columns: minmax(0,1fr) 300px; gap: 16px; }
 .nv-model-controls .nvp-stage-controls { grid-template-columns: 1fr; gap: 14px; }
 .nvp-stage .nv3-tools .nv-auto-rotate span { display: none; }
 .nvp-panel { padding: 16px; }
}
@media(max-width:900px) {
 .nvp-workspace { grid-template-columns: minmax(0,1fr); gap: 12px; }
 .nvb-page .nv-viewer-card > .nv3-viewer { min-height: 0; height: clamp(300px,65vw,440px); flex: none; }
 .nvp-stage .nv3-viewer-bottom { grid-template-columns: minmax(0,1fr) 36px; padding: 10px 12px; gap: 10px; }
 .nvp-stage .nv3-tools .nv-auto-rotate { width: 36px; min-height: 36px; height: 36px; padding: 0; justify-content: center; }
 .nvp-stage .nv3-tools .nv-auto-rotate span { display: none; }
 .nvp-stage .nv3-views button { min-height: 40px; font-size: 12px; padding: 6px 3px; }
 .nv-model-controls { padding: 12px; }
 .nv-model-controls .nvp-stage-controls { grid-template-columns: 1fr; gap: 14px; }
 .nv-settings { display: block; }
 .nv-settings-toggle { min-height: 48px; }
 .nv-settings-content[hidden] { display: none; }
 .nv-settings.is-dialog-open .nv-settings-content { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; max-height: none; overflow-y: auto; background: #242424; animation: nvSettingsIn 220ms ease-out; }
 .nv-dialog-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: #242424; border-bottom: 1px solid #444; }
 .nv-dialog-header h3 { margin: 0; font-size: 22px; font-weight: 400; }
 .nv-dialog-header button { width: 44px; height: 44px; font-size: 30px; color: #ddd; background: transparent; border: 1px solid #555; }
 .nv-settings.is-dialog-open .nvp-panel { height: auto; flex: 1; border: 0; padding: 20px; }
 .nvp-selected { margin-top: 20px; }
 .nv-dialog-footer { position: sticky; bottom: 0; display: block; padding: 16px 20px max(16px,env(safe-area-inset-bottom)); background: #242424; border-top: 1px solid #444; }
 .nv-dialog-footer button { width: 100%; min-height: 48px; background: #ff6a33; color: #fff; border: 0; font: inherit; font-size: 16px; }
 .nvp-filters { grid-template-columns: minmax(0,1fr) 128px; }
 .nv-material-select select { font-size: 16px; }
 .nvp-color-grid > button { min-height: 88px; }
 .nvp-color-sample { height: 42px; }
 .nvp-color-name { font-size: 12px; }
}

/* Camera tabs sit directly on the page, without a shared footer backing. */
.nv-viewer-card { background: transparent; border: 0; }
.nvb-page .nv-viewer-card > .nv3-viewer { border: 1px solid #383838; }
.nvp-stage .nv3-viewer-bottom { background: transparent; border: 0; box-shadow: none; }
.nvp-stage .nv3-views { background: transparent; border: 0; box-shadow: none; }
.nvp-stage .nv3-views button { background: transparent; border: 0; box-shadow: none; color: #aaa; }
.nvp-stage .nv3-views button:hover { color: #fff; background: transparent; }
.nvp-stage .nv3-views button[aria-pressed=true] { background: transparent; border: 0; color: #ff6a33; box-shadow: inset 0 -1px #ff6a33; }
.nv-model-controls { background: #242424; border: 1px solid #383838; }

/* Reserve a separate vertical lane beneath the full-screen control. */
.nvp-stage .nv3-zoom {top:90px;right:20px;transform:none;gap:8px;}
.nvp-stage .nv3-zoom button {width:44px;height:44px;min-height:44px;padding:0;}
.nvp-stage .nv3-zoom button:last-child {margin-top:0;}
@media(max-width:700px){
 .nvp-stage .nv3-viewer-top {top:16px;right:12px;}
 .nvp-stage .nv3-viewer-top button {width:40px;height:40px;min-height:40px;padding:0;}
 .nvp-stage .nv3-zoom {top:80px;right:12px;gap:8px;transform:none;}
 .nvp-stage .nv3-zoom button {width:40px;height:40px;min-height:40px;}
}
