/* ──────────────────────────────────────────────────────────────────────────────
   MRJ3.0 Design System — Dutch Luxury Minimal
   Palette: Rose-blush background, white surfaces, dark text, red accent
────────────────────────────────────────────────────────────────────────────── */

/* ── LOCAL FONTS ───────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'MrGintoNord';
  src: url('/fonts/MrGintoNord-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'MrGintoNord';
  src: url('/fonts/MrGintoNord-Ultra.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'MrGintoNord';
  src: url('/fonts/MrGintoNord-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/font-poppins-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/font-poppins-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/font-poppins-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── CUSTOM PROPERTIES ─────────────────────────────────────────────────────── */
:root {
  --font-display: 'MrGintoNord', Georgia, serif;
  --font-body: 'Poppins', system-ui, sans-serif;

  --clr-bg:          #F2C3B8;   /* rose blush */
  --clr-surface:     #FFFFFF;
  --clr-text:        #1A1A1A;
  --clr-text-muted:  #888888;
  --clr-accent:      #E04B2A;   /* MRJ red */
  --clr-accent-soft: #FAE8E4;
  --clr-border:      #E0D4CF;
  --clr-radio-off:   #D9CAC5;

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-card: 0 2px 24px rgba(0,0,0,0.07);
  --shadow-btn:  0 2px 12px rgba(224,75,42,0.25);

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur-fast: 140ms;
  --dur-base: 280ms;
  --dur-slow: 500ms;
}

/* ── RESET ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--clr-bg);
  color: var(--clr-text);
  min-height: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: var(--font-body); }
a { color: inherit; }

/* ── TOPBAR ────────────────────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  z-index: 100;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.logo-badge {
  display: none; /* removed — logo is now bare text */
}

.topbar__logo {
  display: inline-flex;
  align-items: center;
}
.topbar__logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.topbar__close {
  display: none; /* removed from result UI */
}

/* ── SCREENS ───────────────────────────────────────────────────────────────── */
.screen {
  min-height: 100vh;
  padding-top: 72px;
  transition: opacity var(--dur-base) var(--ease);
}
.screen--hidden {
  display: none;
}

/* ── LANDING ───────────────────────────────────────────────────────────────── */
.landing {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.landing__headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--clr-text);
}

.upload-zone {
  background: var(--clr-surface);
  border: 2px dashed var(--clr-border);
  border-radius: var(--radius-xl);
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  text-align: center;
  user-select: none;
}
.upload-zone:hover,
.upload-zone:focus,
.upload-zone.drag-over {
  border-color: var(--clr-accent);
  background: var(--clr-accent-soft);
  outline: none;
}
.upload-zone__icon { font-size: 40px; }
.upload-zone__label { font-size: 16px; color: var(--clr-text); line-height: 1.4; }
.upload-zone__label strong { font-weight: 600; }
.upload-zone__hint { font-size: 13px; color: var(--clr-text-muted); }
#file-input { display: none; }

/* ── LOADING V2 ─────────────────────────────────────────────────────────────── */
.loading-v2 {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Full-height centering on loading screen */
#screen-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding-top: 0;
}
#screen-loading.screen--hidden {
  display: none;
}

/* Hide logo on loading screen */
#screen-loading ~ * #topbar-logo,
#topbar-logo.loading-hidden { display: none; }

/* Message row: avatar badge + text */
.loading-v2__message-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.loading-v2__avatar {
  width: 44px;
  height: 44px;
  background: var(--clr-surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--clr-text-muted);
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
  animation: avatar-pulse 2s ease-in-out infinite;
}
@keyframes avatar-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224,75,42,0); }
  50%       { box-shadow: 0 0 0 6px rgba(224,75,42,0.12); }
}

.loading-v2__message {
  font-size: 18px;
  font-weight: 500;
  color: var(--clr-text);
  line-height: 1.3;
}

/* Progress pill card */
.loading-v2__card {
  background: var(--clr-surface);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
}

.loading-v2__bar-track {
  width: 100%;
  height: 6px;
  background: var(--clr-border);
  border-radius: 3px;
  overflow: hidden;
}
.loading-v2__bar-fill {
  height: 100%;
  background: var(--clr-accent);
  border-radius: 3px;
  width: 0%;
  transition: width 600ms var(--ease);
}

/* Disclaimer */
.loading-v2__disclaimer {
  font-size: 13px;
  color: var(--clr-text-muted);
  line-height: 1.6;
  max-width: 560px;
}
.loading-v2__disclaimer-link {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Mobile */
@media (max-width: 480px) {
  .loading-v2__message { font-size: 16px; }
  .loading-v2__disclaimer { text-align: center; }
}


/* ── RESULT ────────────────────────────────────────────────────────────────── */
.result {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 0;
  min-height: calc(100vh - 72px);
}

/* SLIDER */
.result__visual {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 16px;
}
.slider {
  position: relative;
  width: 100%;
  max-height: 70vh;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: ew-resize;
  box-shadow: 0 4px 32px rgba(0,0,0,0.15);
  user-select: none;
}
.slider__before,
.slider__after {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.slider__clip {
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0);
  transition: none;
}
.slider__divider {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slider__handle {
  width: 40px; height: 40px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  font-size: 14px;
  font-weight: 700;
  color: var(--clr-text);
  flex-shrink: 0;
  cursor: ew-resize;
}
.slider__handle:focus { outline: 2px solid var(--clr-accent); outline-offset: 2px; }
.slider__arrows { letter-spacing: -2px; }

.result__visual-actions {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.btn-overlay {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-md);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast);
  letter-spacing: 0.02em;
}
.btn-overlay:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}
.btn-overlay:active {
  transform: translateY(0);
}

/* CONFIG PANEL */
.result__config {
  background: var(--clr-surface);
  border-left: none;
  border-radius: var(--radius-xl);
  margin: 16px 16px 16px 0;
  padding: 28px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: var(--shadow-card);
  max-height: calc(100vh - 72px - 32px);
}

.config-section { display: flex; flex-direction: column; gap: 10px; }
.config-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.config-label--accent { color: var(--clr-accent); }
.required { color: var(--clr-accent); }

.color-hero {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--clr-border);
  position: relative;
  background: var(--clr-border);
  min-height: 160px;
  display: flex;
  flex-direction: column;
}
.color-hero__img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--ease);
}
.color-hero:hover .color-hero__img { transform: scale(1.02); }

/* When no image: show hex swatch */
.color-hero__swatch {
  width: 100%;
  height: 160px;
  display: none;
}
.color-hero--hex-only .color-hero__swatch { display: block; }
.color-hero--hex-only .color-hero__img { display: none; }

.color-hero__meta {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.color-hero__name { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.color-hero__material { font-size: 12px; color: rgba(255,255,255,0.75); font-weight: 400; }
.color-hero__btn {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(255,255,255,0.92);
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.color-hero__btn:hover { background: #fff; transform: translateY(-1px); }

.link-row { display: flex; gap: 16px; }
.btn-link {
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--clr-text);
  transition: color var(--dur-fast);
}
.btn-link:hover { color: var(--clr-accent); }

/* ── SUGGESTIONS — Shopify color-swatch-card structure ────────────────────── */
.suggestions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Card wrapper — mirrors .color-swatch-card ── */
.color-swatch-card {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 80px;
  height: 100%;
  cursor: pointer;
  border-radius: 10px;
  background-color: transparent;
  border: 1.5px solid var(--clr-border, #e8e8e8);
  transition: background-color 0.3s, border-color 0.25s, box-shadow 0.25s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Radio visually hidden — label covers the whole card */
.color-swatch-card .swatch-radio {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
  margin: 0;
}

/* Label fills the card, uses the same Shopify grid layout */
.color-swatch-card .swatch-label {
  display: grid;
  grid-template-rows: 1.5fr 0.75fr;
  cursor: pointer;
  padding: 8px 8px 12px;
  gap: 6px;
}

/* Card hover → roze achtergrond */
.color-swatch-card:hover {
  background-color: rgb(251, 233, 232);
  border-color: transparent;
}

/* Selected state */
.color-swatch-card.is-selected {
  border-color: var(--clr-accent, #e76e7a);
  box-shadow: 0 0 0 2px var(--clr-accent, #e76e7a);
  background-color: rgb(251, 233, 232);
}

/* ── color-swatch-holder — wraps swatch + checkmark ── */
.color-swatch-holder {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── .color-swatch — the grid that stacks TOP and BOTTOM ── */
.color-swatch {
  display: grid;          /* key: grid stacks children on grid-area 1/1 */
  width: 100%;
  max-width: 80px;
  margin: 0 auto;
}
.color-swatch.size--large {
  max-width: 90px;
}
@media (min-width: 768px) {
  .color-swatch.size--large { max-width: 120px; }
}

/* Both pictures on the same grid cell, stacked on top of each other */
.color-swatch picture {
  grid-area: 1 / 1;      /* ← Shopify trick: same cell = stacked */
  display: flex;
  place-self: center;
  justify-content: center;
  width: 100%;
  height: auto;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* TOP picture: z-index 2, rests slightly up */
.color-swatch picture:first-child {
  z-index: 2;
  transform: translateY(-6px);
}

/* BOTTOM picture: z-index 1, rests slightly down */
.color-swatch picture:last-of-type {
  z-index: 1;
  transform: translateY(6px);
}

/* Images fill their picture element */
.color-swatch picture img,
.color-swatch .swatch-material {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Hex fallback when no image URL */
.swatch-hex-fallback {
  width: 80px;
  height: 80px;
  border-radius: 8px;
}

/* ── Hover on card → pictures animate (mirrors Shopify card-level hover) ── */
.color-swatch-card:hover .color-swatch picture:first-child {
  transform: translateY(-20%);
}
.color-swatch-card:hover .color-swatch picture:last-of-type {
  transform: translateY(20%);
}

/* ── :checked (radio selected) → same animation stays active ── */
.color-swatch-card .swatch-radio:checked ~ .swatch-label .color-swatch picture:first-child,
.color-swatch-card.is-selected .color-swatch picture:first-child {
  transform: translateY(-20%);
}
.color-swatch-card .swatch-radio:checked ~ .swatch-label .color-swatch picture:last-of-type,
.color-swatch-card.is-selected .color-swatch picture:last-of-type {
  transform: translateY(20%);
}

/* ── Checkmark icon ── */
.color-swatch-card .checkmark-icon {
  position: absolute;
  top: 4px;
  right: 4px;
  display: none;
  z-index: 4;
}
.color-swatch-card .swatch-radio:checked ~ .swatch-label .checkmark-icon,
.color-swatch-card.is-selected .checkmark-icon {
  display: block;
}
.color-swatch-card .icon-checkmark .hover-stroke {
  stroke: var(--clr-accent, #e76e7a);
}

/* ── Title holder ── */
.color-swatch-card .title-holder {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
}
.color-swatch-card .title-holder h5 {
  font-size: 12px;
  font-weight: 600;
  color: var(--clr-text, #111);
  line-height: 1.3;
  margin: 0;
  word-break: break-word;
}

/* Responsive: small screens */
@media (max-width: 380px) {
  .suggestions { grid-template-columns: 1fr 1fr; gap: 6px; }
}


/* Radio groups */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.radio-group--2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  color: var(--clr-text);
  line-height: 1;
  white-space: nowrap;
}
.radio-item input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  border: 2px solid var(--clr-radio-off);
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
  position: relative;
}
.radio-item input[type="radio"]:checked {
  border-color: var(--clr-text);
  background: var(--clr-text);
  box-shadow: inset 0 0 0 3px #fff;
}
.radio-item input[type="radio"]:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 2px;
}

/* Tech list */
.tech-list { display: flex; flex-direction: column; gap: 4px; }
.tech-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--clr-text-muted);
}
.tech-row dt { font-weight: 400; }
.tech-row dd { font-weight: 500; color: var(--clr-text); }

.bijzonderheden { font-size: 13px; color: var(--clr-text-muted); line-height: 1.6; }

/* Buttons */
.btn-primary {
  background: var(--clr-text);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 500;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
}
.btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: rgba(255,255,255,0.85);
  color: var(--clr-text);
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(8px);
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.btn-ghost:hover { background: #fff; transform: translateY(-1px); }

.info-btn {
  display: none; /* removed from UI */
}

/* ── COLOR FLYOUT ──────────────────────────────────────────────────────────── */
.flyout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease);
  backdrop-filter: blur(2px);
}
.flyout-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.flyout {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 420px;
  background: #faf9f8;
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--dur-base) var(--ease);
  box-shadow: -8px 0 48px rgba(0,0,0,0.15);
}
.flyout.open { transform: translateX(0); }

.flyout__header {
  display: flex;
  align-items: center;
  padding: 22px 20px 0;
  gap: 8px;
}
.flyout__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  flex: 1;
  color: var(--clr-text);
}
.flyout__close {
  background: var(--clr-border);
  border: none;
  font-size: 18px;
  line-height: 1;
  color: var(--clr-text);
  padding: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast);
}
.flyout__close:hover { background: #ddd; }

.flyout__tabs {
  display: flex;
  gap: 0;
  padding: 14px 20px 0;
  border-bottom: 2px solid var(--clr-border);
}
.flyout__tab {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-text-muted);
  padding: 10px 0;
  margin-right: 28px;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.flyout__tab--active {
  color: var(--clr-accent);
  border-bottom-color: var(--clr-accent);
}
.flyout__tab:hover { color: var(--clr-text); }

/* Count badge on tab */
.flyout__tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--clr-border);
  color: var(--clr-text-muted);
  font-size: 10px;
  font-weight: 600;
  border-radius: 10px;
  padding: 1px 6px;
  margin-left: 5px;
}
.flyout__tab--active .flyout__tab-count {
  background: var(--clr-accent-soft);
  color: var(--clr-accent);
}

.flyout__list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: start;
}
.flyout__list--hidden { display: none; }

/* ── COLOR CARD ──────────────────────────────────────────────────────────── */
.flyout-color-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition:
    transform var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
}
.flyout-color-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}
.flyout-color-item.selected {
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 2px var(--clr-accent), 0 4px 16px rgba(224,75,42,0.2);
}
.flyout-color-item.selected::after {
  content: '✓';
  position: absolute;
  top: 8px; right: 8px;
  width: 22px; height: 22px;
  background: var(--clr-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flyout-color-item__img {
  width: 100%;
  flex: 1;
  object-fit: cover;
  display: block;
  min-height: 0;
}
.flyout-color-item__swatch {
  width: 100%;
  flex: 1;
  display: block;
  min-height: 0;
}
.flyout-color-item__footer {
  padding: 8px 10px;
  background: #fff;
  flex-shrink: 0;
}
.flyout-color-item__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--clr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.flyout-color-item__material {
  font-size: 10px;
  color: var(--clr-text-muted);
  margin-top: 1px;
}

/* ── TOAST ─────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--clr-text);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  z-index: 300;
  max-width: 480px;
  transition: transform var(--dur-base) var(--ease), opacity var(--dur-base) var(--ease);
  opacity: 0;
  pointer-events: none;
}
.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.toast--error { background: #c0392b; }
.toast__close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 18px;
  padding: 0;
  flex-shrink: 0;
  transition: color var(--dur-fast);
}
.toast__close:hover { color: #fff; }

/* ── DISCLAIMER ────────────────────────────────────────────────────────────── */
.disclaimer {
  font-size: 12px;
  color: var(--clr-text-muted);
  line-height: 1.6;
  text-align: center;
}
.disclaimer__link { text-decoration: underline; }

/* ── RESPONSIVE ────────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .result {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  .result__visual {
    position: static;
    height: auto;
    padding: 16px;
  }
  .slider {
    aspect-ratio: 4/3;
    max-height: 55vw;
  }
  .result__config {
    border-left: none;
    border-top: none;
    margin: 0 12px 12px;
    padding: 24px 20px;
  }
  .flyout { width: 100%; }
  .flyout__list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .landing__headline { font-size: 28px; }
  .upload-zone { padding: 32px 20px; }
  .topbar { padding: 12px 16px; }
}
