.colour-catalogue button.colour-preview {
  width: 100%;
  border: 0;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  cursor: zoom-in;
}
.colour-catalogue button.colour-preview:focus-visible {
  outline: 2px solid #60562d;
  outline-offset: 3px;
}
.colour-viewer {
  position: fixed;
  inset: 0;
  width: min(86vw, 60rem);
  height: min(80vh, 44rem);
  height: min(80dvh, 44rem);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  color: #24231f;
  background: #fff;
}
.colour-viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
html:has(.colour-viewer[open]) { overflow: hidden; }
.colour-viewer-bar {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  padding: clamp(.85rem, 3vw, 1.5rem);
}
.colour-viewer-bar h2 {
  margin: 0;
  font: 700 clamp(1.15rem, 4vw, 1.65rem)/1.2 Arial, sans-serif;
  letter-spacing: normal;
  overflow-wrap: anywhere;
}
.colour-viewer-code { margin: .25rem 0 0; color: #514f48; }
.colour-viewer-bar button {
  min-height: 44px;
  padding: .5rem .85rem;
  border: 1px solid #24231f;
  border-radius: 6px;
  background: #fff;
  color: #24231f;
  font: inherit;
  cursor: pointer;
}
.colour-viewer-sample { min-height: 0; background: #f5f4f0; }
.colour-viewer-sample img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.colour-viewer-note {
  margin: 0;
  padding: .6rem 1rem;
  text-align: center;
  font-size: .875rem;
}

@media (max-width: 600px) {
  .colour-viewer { width: 92vw; }
}
