:root {
  --paper: #ece5d7;
  --paper-strong: #dfd4bf;
  --panel: rgba(255, 251, 244, 0.88);
  --panel-strong: rgba(255, 251, 244, 0.96);
  --ink: #181614;
  --ink-soft: #62594f;
  --ink-faint: #867b6c;
  --charcoal: #17191d;
  --charcoal-soft: #24272d;
  --line: rgba(24, 22, 20, 0.12);
  --line-strong: rgba(24, 22, 20, 0.2);
  --accent: #d86d22;
  --accent-soft: rgba(216, 109, 34, 0.12);
  --white: #ffffff;
  --shadow: 0 28px 80px rgba(16, 18, 22, 0.16);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Barlow", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 82% 12%, rgba(216, 109, 34, 0.16), rgba(216, 109, 34, 0) 34%),
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, #101010 0%, #151515 48%, #0a0a0a 100%);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

/* Mobile tap responsiveness: kill iOS 300ms delay, suppress flashing
   default tap highlight so our own :active states are what the user sees. */
.blend-picker-button,
.blend-option,
.blend-type-button,
.mode-button,
.canvas-tool-button,
.viewer-load-button,
.hint-dismiss,
.ghost-button,
.primary-button,
.recipe-item button,
.part-select,
.part-weight,
.part-slider,
.part-size {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  display: block;
}

.app-shell {
  min-height: calc(100vh - var(--header-h, 70px));
  padding: calc(var(--header-h, 70px) + 22px) 22px 22px;
}

.app-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  width: min(1720px, 100%);
  margin: 0 auto 20px;
}

.brand-block {
  max-width: 780px;
}

.eyebrow,
.section-label,
.field-label,
.sample-trigger-label,
.viewer-status {
  margin: 0;
  color: var(--ink-faint);
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* --- Prominent "Load 3D preview" call-to-action ----------------------- */

.viewer-load-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px auto 4px;
  padding: 15px 28px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff9a3e 0%, #e8761a 55%, #d86d22 100%);
  color: #fff;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 14px 36px rgba(216, 109, 34, 0.46),
    0 0 0 5px rgba(216, 109, 34, 0.18);
  transition:
    transform 140ms ease,
    box-shadow 200ms ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.viewer-load-button:hover,
.viewer-load-button:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 18px 44px rgba(216, 109, 34, 0.58),
    0 0 0 7px rgba(216, 109, 34, 0.22);
  outline: none;
}

.viewer-load-button:active {
  transform: translateY(1px);
  box-shadow:
    0 8px 22px rgba(216, 109, 34, 0.4),
    0 0 0 4px rgba(216, 109, 34, 0.14);
}

.viewer-load-button:disabled,
.viewer-load-button:disabled:hover {
  cursor: wait;
  opacity: 0.82;
  transform: none;
  box-shadow: 0 10px 22px rgba(216, 109, 34, 0.28);
}

.viewer-load-button-label {
  position: relative;
  z-index: 1;
}

.viewer-load-button-arrow {
  position: relative;
  z-index: 1;
  transition: transform 220ms ease;
}

.viewer-load-button:hover .viewer-load-button-arrow,
.viewer-load-button:focus-visible .viewer-load-button-arrow {
  transform: translateX(3px);
}

.viewer-load-button-pulse {
  position: absolute;
  inset: -2px;
  z-index: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(232, 118, 26, 0.6);
  animation: viewerLoadPulse 2200ms ease-out infinite;
  pointer-events: none;
}

.viewer-load-button:disabled .viewer-load-button-pulse,
.is-loading .viewer-load-button-pulse {
  animation: none;
  opacity: 0;
}

@keyframes viewerLoadPulse {
  0%   { box-shadow: 0 0 0 0 rgba(232, 118, 26, 0.55); }
  70%  { box-shadow: 0 0 0 22px rgba(232, 118, 26, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 118, 26, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .viewer-load-button-pulse { animation: none; }
}

.app-header h1,
.inspector h3,
.section-head h3 {
  margin: 0;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  line-height: 0.96;
}

.app-header h1 {
  margin-top: 8px;
  color: var(--white);
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  letter-spacing: 0.01em;
}

.app-intro {
  max-width: 56rem;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.05rem;
  line-height: 1.62;
}

.app-header .eyebrow {
  color: var(--accent);
}

.header-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 10px;
}

.blend-picker {
  position: relative;
}

.blend-picker-button {
  position: relative;
  display: block;
  min-width: 250px;
  padding: 11px 48px 11px 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 151, 63, 0.96), rgba(216, 109, 34, 0.98)),
    var(--accent);
  color: var(--white);
  box-shadow:
    0 14px 34px rgba(216, 109, 34, 0.38),
    0 0 0 5px rgba(216, 109, 34, 0.16);
  text-align: left;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.blend-picker-button::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 17px;
  width: 16px;
  height: 16px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  opacity: 0.92;
  transform: translateY(-62%) rotate(45deg);
}

.blend-picker-button:hover,
.blend-picker-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow:
    0 18px 46px rgba(216, 109, 34, 0.46),
    0 0 0 7px rgba(216, 109, 34, 0.2);
  outline: none;
  transform: translateY(-2px);
}

.blend-picker-button:active {
  transform: translateY(0);
  box-shadow:
    0 8px 22px rgba(216, 109, 34, 0.42),
    0 0 0 4px rgba(216, 109, 34, 0.16);
}

.blend-option:active {
  border-color: rgba(216, 109, 34, 0.42);
  background: rgba(216, 109, 34, 0.16);
}

.blend-type-button:active {
  transform: scale(0.96);
}

.mode-button:active,
.canvas-tool-button:active {
  transform: scale(0.94);
}

.primary-button:active,
.ghost-button:active {
  transform: translateY(0);
  opacity: 0.92;
}

.blend-picker-button-kicker,
.blend-picker-button-main,
.blend-picker-button-note {
  position: relative;
  z-index: 1;
}

.blend-picker-button-kicker {
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.blend-picker-button-main {
  margin-top: 4px;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  text-transform: uppercase;
}

.blend-picker-button-note {
  display: none;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
}

.blend-picker-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  width: min(360px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(24, 22, 20, 0.12);
  border-radius: 18px;
  background: var(--panel-strong);
  box-shadow: 0 28px 70px rgba(12, 15, 20, 0.2);
}

.blend-picker-head {
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
}

.blend-type-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.blend-type-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(24, 22, 20, 0.1);
  border-radius: 999px;
  background: rgba(24, 22, 20, 0.04);
  color: var(--ink-soft);
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blend-type-button:hover,
.blend-type-button:focus-visible,
.blend-type-button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--white);
  outline: none;
}

.blend-picker-list {
  max-height: min(470px, 64vh);
  overflow-y: auto;
  padding: 8px;
}

.blend-option {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.blend-option:hover,
.blend-option:focus-visible,
.blend-option.is-active {
  border-color: rgba(216, 109, 34, 0.28);
  background: rgba(216, 109, 34, 0.08);
  outline: none;
}

.blend-option-image {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border: 1px solid rgba(24, 22, 20, 0.12);
  border-radius: 10px;
  background:
    linear-gradient(45deg, rgba(24, 22, 20, 0.08) 25%, transparent 25% 75%, rgba(24, 22, 20, 0.08) 75%),
    linear-gradient(45deg, rgba(24, 22, 20, 0.08) 25%, transparent 25% 75%, rgba(24, 22, 20, 0.08) 75%);
  background-position:
    0 0,
    6px 6px;
  background-size: 12px 12px;
}

.blend-option-code,
.blend-option-name {
  display: block;
}

.blend-option-code {
  color: var(--ink-faint);
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.blend-option-name {
  margin-top: 2px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
}

.experience-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 360px;
  gap: 20px;
  align-items: start;
  width: min(1720px, 100%);
  margin: 0 auto;
}

.viewer-stage {
  position: relative;
  overflow: hidden;
  min-height: clamp(560px, calc(100vh - 220px), 860px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(18, 21, 26, 0.98), rgba(10, 12, 15, 0.98)),
    radial-gradient(circle at top right, rgba(120, 162, 255, 0.18), rgba(0, 0, 0, 0) 30%);
  box-shadow: 0 32px 100px rgba(10, 12, 16, 0.26);
}

.room-viewport {
  position: relative;
  min-height: clamp(560px, calc(100vh - 220px), 860px);
  overflow: hidden;
  border-radius: inherit;
  background:
    radial-gradient(circle at top center, rgba(184, 213, 255, 0.38), rgba(53, 73, 104, 0.12) 24%, rgba(14, 18, 23, 0.94) 70%),
    linear-gradient(180deg, #f1f5fb 0%, #d7e1f2 16%, #39495d 34%, #161c24 100%);
}

.room-viewport canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.viewer-status,
.viewer-hint,
.canvas-toolbar,
.canvas-lighting {
  position: absolute;
  z-index: 2;
}

.viewer-status {
  top: 50%;
  left: 50%;
  z-index: 3;
  width: min(400px, calc(100% - 36px));
  padding: 0;
  border: 0;
  background: none;
  backdrop-filter: none;
  color: #fff;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.viewer-status-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 26px 24px 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(20, 23, 30, 0.92), rgba(12, 14, 19, 0.94));
  box-shadow: 0 30px 80px rgba(8, 11, 18, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.viewer-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 2px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(232, 118, 26, 0.98), rgba(216, 109, 34, 0.88));
  color: #fff;
  box-shadow: 0 18px 32px rgba(216, 109, 34, 0.42);
}

.viewer-status-eyebrow {
  margin: 0;
  color: #ffb37a;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.viewer-status-title {
  margin: 0;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-size: 1.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.02;
  color: #fff;
  text-transform: none;
}

.viewer-status-copy {
  margin: 2px auto 4px;
  max-width: 30ch;
  color: rgba(255, 255, 255, 0.78);
  font-family: "Barlow", "Segoe UI", sans-serif;
  font-size: 0.98rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: none;
}

.viewer-status-note {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-family: "Barlow", "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.viewer-status.is-ready {
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

@media (max-width: 720px) {
  .viewer-status {
    width: min(360px, calc(100% - 24px));
  }

  .viewer-status-card {
    padding: 22px 18px 20px;
    gap: 8px;
  }

  .viewer-status-icon {
    width: 56px;
    height: 56px;
  }

  .viewer-status-title {
    font-size: 1.7rem;
  }

  .viewer-status-copy {
    font-size: 0.94rem;
  }

  .viewer-load-button {
    padding: 14px 24px;
    font-size: 1rem;
  }
}

.canvas-toolbar {
  top: 26px;
  right: 26px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 10px;
  max-width: calc(100% - 52px);
}

.canvas-lighting,
.canvas-tool-actions {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(16, 19, 24, 0.58);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
}

.canvas-lighting {
  position: static;
}

.canvas-toolbar .blend-picker {
  z-index: 3;
}

.canvas-toolbar .blend-picker-menu {
  right: auto;
  left: 0;
  width: min(380px, calc(100vw - 52px));
}

.canvas-lighting-label {
  padding-left: 6px;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.canvas-lighting-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, 38px);
  gap: 5px;
}

.canvas-lighting .mode-button {
  width: 38px;
  min-width: 38px;
  min-height: 36px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
}

.canvas-lighting .mode-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.canvas-lighting .mode-button.is-active {
  background: var(--white);
  border-color: var(--white);
  color: var(--charcoal);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.canvas-tool-actions {
  padding: 8px;
}

.canvas-tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  min-height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  transition:
    transform 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.canvas-tool-button:hover,
.canvas-tool-button:focus-visible {
  background: var(--white);
  border-color: var(--white);
  color: var(--charcoal);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  outline: none;
  transform: translateY(-1px);
}

.canvas-tool-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.asset-credits-panel {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 5;
  width: min(360px, calc(100% - 48px));
  max-height: min(520px, calc(100% - 48px));
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  background: rgba(18, 22, 27, 0.92);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.asset-credits-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.86);
  line-height: 1;
}

.asset-credits-label {
  margin: 0 32px 8px 0;
  color: #ffb37a;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.asset-credits-panel h2,
.asset-credit-item h3 {
  margin: 0;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  letter-spacing: 0;
}

.asset-credits-panel h2 {
  margin-right: 32px;
  font-size: 1.6rem;
  line-height: 1;
}

.asset-credits-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.asset-credits-note,
.asset-credit-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
  line-height: 1.45;
}

.asset-credit-item {
  display: grid;
  gap: 5px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.asset-credit-item h3 {
  color: #fff;
  font-size: 1.08rem;
}

.asset-credit-item a {
  width: fit-content;
  color: #ffb37a;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.viewer-hint {
  left: 24px;
  bottom: 24px;
  width: min(320px, calc(100% - 48px));
  padding: 18px 18px 16px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 241, 235, 0.92)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.75));
  color: var(--ink);
  box-shadow: 0 28px 70px rgba(8, 12, 17, 0.24);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.room-viewport:hover .viewer-hint:not(.is-dismissed),
.viewer-hint.is-visible,
.viewer-hint.is-pinned {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.viewer-hint.is-dismissed {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.hint-dismiss {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.06);
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1;
}

.hint-icon {
  position: relative;
  width: 70px;
  height: 70px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(12, 18, 24, 0.04), rgba(12, 18, 24, 0.01));
}

.hint-axis {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: #13171c;
}

.hint-axis-x {
  width: 30px;
  height: 4px;
  left: 19px;
  top: 33px;
}

.hint-axis-y {
  width: 4px;
  height: 30px;
  left: 33px;
  top: 19px;
}

.hint-axis-z {
  width: 24px;
  height: 4px;
  left: 26px;
  top: 22px;
  transform: rotate(45deg);
  transform-origin: center;
}

.hint-title {
  margin: 0;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-size: 1.4rem;
  line-height: 1;
}

.hint-copy {
  margin: 10px 0 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.inspector {
  position: sticky;
  top: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 251, 244, 0.96), rgba(247, 241, 232, 0.92)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.62));
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.inspector-section {
  padding: 24px 24px 22px;
  border-bottom: 1px solid var(--line);
}

.inspector-section:last-child {
  border-bottom: none;
}

.inspector-section--selected {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0));
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.section-head h3 {
  font-size: 1.95rem;
}

.section-support {
  margin: 10px 0 0;
  color: var(--ink-soft);
  line-height: 1.58;
}

.section-support--tight {
  margin-top: 8px;
}

.selected-blend-head {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 0;
}

.sample-thumb {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(24, 22, 20, 0.12);
  background:
    linear-gradient(45deg, rgba(24, 22, 20, 0.08) 25%, transparent 25% 75%, rgba(24, 22, 20, 0.08) 75%),
    linear-gradient(45deg, rgba(24, 22, 20, 0.08) 25%, transparent 25% 75%, rgba(24, 22, 20, 0.08) 75%);
  background-position:
    0 0,
    7px 7px;
  background-size: 14px 14px;
}

.sample-thumb.is-missing,
.blend-option-image.is-missing {
  opacity: 0.72;
}

.field {
  display: grid;
  gap: 8px;
}

.field-label {
  color: var(--ink-faint);
}

.field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(24, 22, 20, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  outline: none;
}

.field select:focus {
  border-color: rgba(216, 109, 34, 0.5);
  box-shadow: 0 0 0 4px rgba(216, 109, 34, 0.12);
}

.lighting-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mode-button,
.ghost-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background-color 140ms ease,
    color 140ms ease,
    opacity 140ms ease;
  text-decoration: none;
}

.mode-button {
  background: rgba(24, 22, 20, 0.05);
  border-color: rgba(24, 22, 20, 0.08);
  color: var(--ink-soft);
}

.mode-button:hover,
.ghost-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.mode-button.is-active {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--white);
  box-shadow: 0 12px 26px rgba(16, 18, 22, 0.16);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(24, 22, 20, 0.12);
  color: var(--ink);
}

.app-header .ghost-button {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--white);
}

.app-header .ghost-button:hover {
  border-color: rgba(216, 109, 34, 0.62);
  background: rgba(216, 109, 34, 0.12);
}

.primary-button {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  box-shadow: 0 12px 30px rgba(216, 109, 34, 0.22);
}

.ghost-button:disabled,
.primary-button:disabled,
.mode-button:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.recipe-list {
  display: grid;
  gap: 10px;
}

.recipe-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(24, 22, 20, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.54);
}

.recipe-swatch {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(24, 22, 20, 0.14);
}

.recipe-name {
  font-weight: 700;
  line-height: 1.12;
}

.recipe-code {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 0.86rem;
}

.recipe-weight {
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.recipe-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(24, 22, 20, 0.05);
  color: var(--ink-soft);
  line-height: 1.58;
}

.texture-source {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.debug-surface {
  display: none;
}

.inspector-actions {
  display: grid;
  gap: 10px;
}

@media (max-width: 1180px) {
  .experience-shell {
    grid-template-columns: 1fr;
  }

  .viewer-stage,
  .room-viewport {
    min-height: 72vh;
  }

  .inspector {
    position: static;
  }
}

@media (max-width: 860px) {
  .app-shell {
    padding: calc(var(--header-h, 70px) + 14px) 14px 14px;
  }

  .app-header {
    grid-template-columns: 1fr;
  }

  .header-actions {
    justify-content: start;
  }

  .viewer-stage,
  .room-viewport {
    min-height: 68vh;
  }

  .inspector-section {
    padding: 20px 18px;
  }

  .section-head h3 {
    font-size: 1.65rem;
  }

  .selected-blend-head {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .sample-thumb {
    width: 60px;
    height: 60px;
  }

  .recipe-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .recipe-weight {
    grid-column: 2;
    justify-self: start;
  }

  .canvas-toolbar {
    top: 14px;
    left: 14px;
    right: auto;
    width: calc(100vw - 56px);
    max-width: calc(100vw - 56px);
    justify-content: start;
  }
}

@media (max-width: 560px) {
  .blend-picker-button {
    min-width: 228px;
    padding-right: 42px;
  }

  .canvas-toolbar .blend-picker {
    flex: 0 0 100%;
  }

  .canvas-toolbar .blend-picker-button {
    width: min(100%, 282px);
  }

  .canvas-toolbar .blend-picker-menu {
    left: 0;
    right: auto;
    width: calc(100vw - 56px);
  }

  .canvas-lighting-label {
    display: none;
  }

  .canvas-lighting,
  .canvas-tool-actions {
    gap: 5px;
  }

  .asset-credits-panel {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    max-height: min(430px, calc(100% - 28px));
  }
}
