.collection-fixed-viewer {
  overflow: hidden;
  isolation: isolate;
  transition: background 1.25s cubic-bezier(.22, .61, .36, 1);
}
.collection-fixed-viewer.is-visible { background: #061e1af7; }
.collection-view-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  contain: layout style;
}
.collection-fixed-viewer .fixed-model-views { filter: drop-shadow(0 22px 32px #0000002b); }
.collection-fixed-viewer .collection-close { z-index: 6; }
.collection-fixed-viewer .collection-view-rail {
  top: 44%;
  z-index: 5;
  opacity: 0;
  visibility: hidden;
  transition: opacity .55s ease;
}
.collection-fixed-viewer .collection-view-hint {
  top: 24px;
  z-index: 3;
  opacity: 0;
  transition: opacity .55s ease;
}
.collection-fixed-viewer.is-ready .collection-view-rail,
.collection-fixed-viewer.is-ready .collection-view-hint { opacity: 1; visibility: visible; }
.collection-fixed-viewer[data-phase="error"] .collection-view-rail,
.collection-fixed-viewer[data-phase="error"] .collection-view-hint { visibility: hidden; }
.collection-fixed-viewer .collection-model-caption { z-index: 3; bottom: 5vh; }
.collection-fixed-viewer .collection-view-eyebrow {
  color: #c5a368b8;
  font-size: 9px;
  letter-spacing: .22em;
  margin-bottom: 10px;
}
.collection-fixed-viewer .collection-view-status:empty { display: none; }
.collection-fixed-viewer[data-phase="loading"] .collection-model-caption { opacity: 1; transform: none; }
.collection-fixed-viewer :is(.collection-close, .collection-view-rail button):focus-visible {
  outline: 2px solid #efe3c9;
  outline-offset: 4px;
}
@media (max-width: 760px) {
  .collection-fixed-viewer .collection-view-rail { top: 39%; }
  .collection-fixed-viewer .collection-model-caption { bottom: 9vh; }
  .collection-fixed-viewer .collection-close { top: 14px; right: 14px; }
  .collection-fixed-viewer .collection-view-hint { top: 28px; padding: 0 70px; }
  .collection-fixed-viewer .collection-model-caption h2 { font-size: clamp(25px, 6vw, 34px); }
}
@media (prefers-reduced-motion: reduce) {
  .collection-fixed-viewer,
  .collection-fixed-viewer .collection-view-rail,
  .collection-fixed-viewer .collection-view-hint { transition: none; }
}

.collection-glass-viewer {
  --collection-accent: #78aa8a;
  --collection-accent-border: #78aa8a66;
  --collection-accent-wash: #78aa8a18;
  --collection-rail-left: 24px;
  --collection-rail-width: 160px;
}
.collection-glass-viewer.is-visible { background: #000; }
.collection-glass-viewer .collection-model-caption { right: 20px; left: 20px; bottom: max(8px, env(safe-area-inset-bottom, 0px)); }
.collection-glass-viewer .collection-model-caption h2 { margin-bottom: 4px; }
.collection-glass-viewer .collection-model-caption p { margin-bottom: 3px; }
.collection-glass-viewer > .collection-model-views { position: absolute; left: var(--collection-rail-left); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 12px; z-index: 4; }
.collection-glass-viewer > .collection-model-views button { min-width: 64px; }
.collection-glass-viewer[data-assembly="merged"] .collection-model-caption { right: 20px; }
.collection-glass-viewer .collection-model-views button[aria-pressed="true"] { background: color-mix(in srgb, var(--collection-accent) 35%, #000); border-color: var(--collection-accent); }
.collection-glass-viewer button:focus-visible { outline: 2px solid var(--collection-accent); outline-offset: 4px; }
.collection-glass-viewer button:disabled { opacity: .38; cursor: default; }
.collection-glass-viewer[data-phase="loading"] .collection-model-caption,
.collection-glass-viewer[data-phase="error"] .collection-model-caption { opacity: 1; transform: none; }
.collection-glass-viewer[data-phase="error"] .collection-model-views { display: none; }
.collection-glass-viewer .collection-assembly { pointer-events: auto; margin-top: 4px; padding: 9px 34px; border: 1px solid var(--collection-accent); background: var(--collection-accent-wash); border-radius: 30px; cursor: pointer; }
.collection-glass-viewer .collection-materials {
  position: absolute;
  left: var(--collection-rail-left);
  right: auto;
  width: var(--collection-rail-width);
  top: 50%;
  transform: translateY(-50%);
  box-sizing: border-box;
  max-height: calc(100% - 140px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--collection-accent-border) transparent;
  background: #111;
  border: 1px solid var(--collection-accent-border);
  border-radius: 14px;
  padding: 16px 12px;
  z-index: 4;
  opacity: 0;
  transition: opacity .4s;
}
.collection-glass-viewer.is-ready .collection-materials { opacity: 1; }
.collection-glass-viewer .collection-materials-title { font-size: 12px; letter-spacing: .1em; margin: 0 0 14px; }
.collection-glass-viewer .collection-materials fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.collection-glass-viewer .collection-materials fieldset:last-child { margin-bottom: 0; }
.collection-glass-viewer .collection-materials legend { font-size: 12px; padding: 0; margin-bottom: 6px; }
.collection-glass-viewer .collection-swatches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.collection-glass-viewer .collection-swatches button { display: grid; place-items: center; min-height: 38px; background: none; padding: 7px 0; line-height: 1.2; cursor: pointer; border: 1px solid transparent; border-radius: 7px; }
.collection-glass-viewer .collection-swatches button span { display: block; width: 20px; height: 20px; margin: 0 auto; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px #ffffff55; transition: transform .18s ease, box-shadow .18s ease; }
.collection-glass-viewer .collection-swatches button[aria-pressed="true"] { border-color: var(--swatch); background: color-mix(in srgb, var(--swatch) 12%, transparent); }
.collection-glass-viewer .collection-layer-labels { font-size: 12px; letter-spacing: .1em; }
/* The shared layer accent starts green; direct manipulation instructions stay white. */
.collection-glass-viewer :is(.collection-model-caption, .collection-model-caption h2, .collection-layer-labels, .collection-materials, .collection-materials-title, .collection-materials legend, .collection-swatches button, .collection-close) { color: var(--collection-accent); }
.collection-glass-viewer :is(.collection-close, .collection-model-views button) { border-color: var(--collection-accent-border); background: var(--collection-accent-wash); }
.collection-glass-viewer button.collection-close {
  display: grid;
  place-items: center;
  width: 80px;
  height: 44px;
  padding: 0 16px;
  border-radius: 24px;
  border-color: var(--collection-accent);
  background: var(--collection-accent);
  color: #071f1a;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .12em;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.collection-glass-viewer .collection-close:is(:hover, :focus-visible) {
  background: color-mix(in srgb, var(--collection-accent) 80%, #fff);
  border-color: color-mix(in srgb, var(--collection-accent) 80%, #fff);
  box-shadow: 0 6px 16px #0008, 0 0 14px color-mix(in srgb, var(--collection-accent) 24%, transparent);
  transform: translateY(-2px) scale(1.03);
}
.collection-glass-viewer .collection-close:active { transform: translateY(0) scale(.98); }
.collection-glass-viewer .collection-view-hint,
.collection-glass-viewer .collection-assembly,
.collection-glass-viewer .collection-model-views button,
.collection-glass-viewer .collection-model-views button[aria-pressed="true"] { color: #fff; }
.collection-glass-viewer :is(.collection-assembly, .collection-model-views button):disabled { opacity: 1; }
.collection-glass-viewer :is(.collection-assembly, .collection-model-views button, .collection-swatches button) {
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.collection-glass-viewer :is(.collection-assembly, .collection-model-views button):not(:disabled):is(:hover, :focus-visible) {
  color: #fff;
  background: color-mix(in srgb, var(--collection-accent) 48%, #111);
  border-color: color-mix(in srgb, var(--collection-accent) 72%, #fff);
  box-shadow: 0 6px 16px #0008, 0 0 14px color-mix(in srgb, var(--collection-accent) 24%, transparent);
  transform: translateY(-2px) scale(1.03);
}
.collection-glass-viewer .collection-swatches button:not(:disabled):is(:hover, :focus-visible) {
  background: color-mix(in srgb, var(--swatch) 28%, #111);
  border-color: var(--swatch);
  outline-color: var(--swatch);
  box-shadow: 0 5px 12px #0008, 0 0 12px color-mix(in srgb, var(--swatch) 22%, transparent);
  transform: translateY(-2px) scale(1.03);
}
.collection-glass-viewer .collection-swatches button:not(:disabled):is(:hover, :focus-visible) span {
  transform: scale(1.14);
  box-shadow: inset 0 0 0 1px #ffffff99, 0 0 10px color-mix(in srgb, var(--swatch) 42%, transparent);
}
.collection-glass-viewer :is(.collection-assembly, .collection-model-views button, .collection-swatches button):not(:disabled):active { transform: translateY(0) scale(.98); }
.collection-glass-viewer .collection-swatches button:not(:disabled):active span { transform: scale(1.04); }
.collection-glass-viewer [hidden] { display: none !important; }
.collection-glass-viewer[data-assembly="split"] .collection-model-caption h2 { font-size: 30px; margin-bottom: 4px; }
.collection-glass-viewer[data-assembly="split"] .collection-model-caption p { font-size: 10px; margin-bottom: 3px; }
.collection-glass-viewer[data-assembly="split"] .collection-assembly { margin-top: 4px; padding: 7px 30px; }
  /* Leave the complete middle row free for three full-size separate modules. */
  .collection-glass-viewer[data-assembly="split"][data-palette-layout="top"] .collection-materials {
    top: 84px; left: 16px; width: calc(100% - 32px); max-height: none;
    transform: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 12px; padding: 10px 12px;
  }
  .collection-glass-viewer[data-theme="Botanical"][data-assembly="split"][data-palette-layout="top"] .collection-materials { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-glass-viewer[data-assembly="split"][data-palette-layout="top"] .collection-materials-title { grid-column: 1 / -1; margin: 0; }
  .collection-glass-viewer[data-assembly="split"][data-palette-layout="top"] .collection-materials fieldset { margin: 0; }
  .collection-glass-viewer[data-assembly="split"][data-palette-layout="top"] .collection-swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .collection-glass-viewer[data-assembly="split"][data-palette-layout="top"] .collection-swatches button { min-height: 30px; padding: 5px 0; }
@media (max-width: 759px) {
  .collection-glass-viewer { --collection-rail-left: 10px; --collection-rail-width: 112px; }
  .collection-glass-viewer > .collection-model-views { gap: 8px; }
  .collection-glass-viewer .collection-model-caption { left: 12px; right: 12px; }
  .collection-glass-viewer .collection-model-caption h2 { font-size: 25px; margin-bottom: 4px; }
  .collection-glass-viewer .collection-model-caption p { font-size: 10px; letter-spacing: .03em; margin-bottom: 3px; }
  .collection-glass-viewer .collection-model-views { gap: 8px; }
  .collection-glass-viewer .collection-model-views button { padding: 7px 14px; }
  .collection-glass-viewer .collection-assembly { margin-top: 4px; padding: 7px 30px; }
  .collection-glass-viewer .collection-materials { padding: 12px 8px; border-radius: 10px; }
  .collection-glass-viewer .collection-materials-title { font-size: 11px; letter-spacing: .03em; margin-bottom: 12px; }
  .collection-glass-viewer .collection-materials fieldset { margin-bottom: 12px; }
  .collection-glass-viewer .collection-materials legend { font-size: 10px; margin-bottom: 5px; }
  .collection-glass-viewer .collection-swatches { gap: 3px; }
  .collection-glass-viewer .collection-swatches button span { width: 17px; height: 17px; }
  .collection-glass-viewer[data-assembly="split"] .collection-model-caption h2 { font-size: 25px; }
}
@media (max-width: 420px) {
  .collection-glass-viewer { --collection-rail-left: 8px; --collection-rail-width: 88px; }
  .collection-glass-viewer .collection-materials { padding-right: 6px; padding-left: 6px; }
}
@media (max-height: 599px) {
  .collection-glass-viewer[data-assembly="split"][data-palette-layout="top"] .collection-materials { top: 76px; padding-top: 6px; padding-bottom: 6px; }
  .collection-glass-viewer[data-assembly="split"][data-palette-layout="top"] .collection-materials-title { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .collection-glass-viewer :is(.collection-close, .collection-assembly, .collection-model-views button, .collection-swatches button, .collection-swatches button span) { transition: none; }
  .collection-glass-viewer :is(.collection-close, .collection-assembly, .collection-model-views button, .collection-swatches button):not(:disabled):is(:hover, :focus-visible, :active),
  .collection-glass-viewer .collection-swatches button:not(:disabled):is(:hover, :focus-visible, :active) span { transform: none; }
}
