#htv-color-design-native[hidden]{display:none!important}
body.htv-color-active{overflow:hidden!important}
#htv-color-design-native{position:fixed;inset:0;z-index:2147482500;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:0!important;background:rgba(8,9,13,.97);color:#eee7dc;font:14px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif;isolation:isolate}
#htv-color-design-native *{box-sizing:border-box}
#htv-color-design-native button{cursor:pointer;font:inherit;color:inherit;border:1px solid #3a4047;border-radius:12px;background:#17202a;padding:9px 12px}
#htv-color-design-native button.selected,#htv-color-design-native button.active{border-color:#c5a87c;background:#342f25}
#htv-color-design-native button.disabled,#htv-color-design-native button:disabled{opacity:.45;cursor:not-allowed;border-color:#303843;background:#141b23}
#htv-color-design-native .htv-color-layout{width:min(100vw,56.25dvh);height:min(100dvh,177.77778vw);aspect-ratio:9/16;display:flex;flex-direction:column;min-height:0;max-width:100vw;max-height:100dvh;padding:10px;border:1px solid #49434d;border-radius:14px;background:linear-gradient(180deg,#28242d 0%,#151219 100%)}
#htv-color-design-native header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:8px;border-bottom:1px solid #34303a}
#htv-color-design-native header h1{margin:0;font-size:18px;font-weight:350;letter-spacing:.12em}
#htv-color-design-native header button{background:#182331;padding:8px 10px;font-size:11px}
#htv-color-design-native main{flex:1 1 auto;min-height:0;overflow-y:auto!important;overflow-x:hidden;touch-action:pan-y!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:8px 0;scrollbar-width:thin}
#htv-color-design-native .color-hero{display:grid;grid-template-columns:minmax(0,31fr) minmax(0,69fr);gap:6px;align-items:start;min-width:0;max-width:100%}
#htv-color-design-native .photo-panel,#htv-color-design-native .selection-panel,#htv-color-design-native .catalog{background:#121a24;border:1px solid #28323c;border-radius:10px;padding:7px;min-width:0}
#htv-color-design-native .photo-panel{display:flex;flex-direction:column;gap:6px}
#htv-color-design-native .photo-panel canvas{display:block;width:100%;aspect-ratio:9/16;border-radius:8px;background:linear-gradient(150deg,#161c22,#272a2e)}
#htv-color-design-native .render-status{font-size:9px;line-height:1.2;color:#b2b8be}
#htv-color-design-native .selection-panel h2,#htv-color-design-native .catalog h2{margin:1px 0 4px;font-size:13px;font-weight:600}
#htv-color-design-native .selection-panel h3,#htv-color-design-native .catalog h3{margin:0;font-size:11px;font-weight:600}
#htv-color-design-native .selection-panel p{margin:0 0 4px;font-size:10px;color:#aab0b7}
#htv-color-design-native .selected-slots{display:grid;gap:4px;margin-top:6px}
#htv-color-design-native .slot{display:grid;grid-template-columns:16px minmax(0,1fr);gap:3px 7px;align-items:center;text-align:left;padding:6px}
#htv-color-design-native .slot strong{font-size:10px}
#htv-color-design-native .slot small{grid-column:2;font-size:9px;color:#d8ddd8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#htv-color-design-native .dot{width:16px;height:28px;border-radius:14px;grid-row:span 2;border:1px solid rgba(255,255,255,.15)}
#htv-color-design-native .tech-list{display:flex;flex-wrap:wrap;gap:4px;padding-top:3px}
#htv-color-design-native .tech-list button{padding:5px 7px;font-size:10px}
#htv-color-design-native .catalog{margin-top:8px;display:flex;flex-direction:column;gap:10px}
#htv-color-design-native .catalog-block{display:flex;flex-direction:column;gap:5px}
#htv-color-design-native .block-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
#htv-color-design-native .catalog-count{font-size:10px;color:#bca57e}
#htv-color-design-native .families,#htv-color-design-native .choices{display:flex;gap:6px;overflow-x:auto!important;overflow-y:hidden!important;touch-action:pan-x!important;overscroll-behavior-x:contain;scrollbar-width:thin;padding:2px 0;cursor:grab}
#htv-color-design-native .families:active,#htv-color-design-native .choices:active{cursor:grabbing}
#htv-color-design-native .families button{white-space:nowrap;font-size:10px;padding:6px 8px}
#htv-color-design-native .choices{min-height:160px;align-items:start}
#htv-color-design-native .swatch{flex:0 0 72px;min-width:72px;width:72px;display:grid;gap:5px;padding:5px!important;text-align:center;align-content:start}
#htv-color-design-native .swatch-strand{display:block;width:100%;min-height:116px;aspect-ratio:9/16;border-radius:8px;background:#171c23}
#htv-color-design-native .swatch-name{font-size:10px;line-height:1.3;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:26px;overflow-wrap:anywhere}
#htv-color-design-native footer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;border-top:1px solid #34303a;padding-top:7px;font-size:9px;color:#b3b9bf;text-align:center}
#htv-color-design-native footer button{padding:10px 16px;font-size:11px;background:#b79868;border-color:#b79868;color:#0d1116;font-weight:700;min-width:150px}
@media(max-width:560px){
  #htv-color-design-native .htv-color-layout{padding:8px;border-radius:0}
  #htv-color-design-native .choices{min-height:154px}
  #htv-color-design-native .swatch{flex-basis:70px;min-width:70px;width:70px}
}

/* R653 selected photographic nuance: clearly distinguished inside its own frame */
#htv-color-design-native .swatch{position:relative;transition:border-color .12s ease,box-shadow .12s ease,background .12s ease}
#htv-color-design-native .swatch.is-selected{border:2px solid #dfbd80!important;background:#322c24!important;box-shadow:inset 0 0 0 1px #f7dfab,0 0 0 2px rgba(223,189,128,.22);padding:4px!important}
#htv-color-design-native .swatch-check{display:none;position:absolute;right:7px;top:7px;z-index:2;width:19px;height:19px;line-height:18px;border-radius:50%;text-align:center;background:#d6b681;color:#121417;font-size:12px;font-weight:800;box-shadow:0 0 0 2px #141a22}
#htv-color-design-native .swatch.is-selected .swatch-check{display:block}
#htv-color-design-native .swatch.is-selected .swatch-name{font-weight:700;color:#f6e3bb}

/* R891: fixed project header/strand; only Nuance scrolls vertically. */
#htv-color-design-native header{position:relative;justify-content:center;min-height:40px}
#htv-color-design-native header h1{text-align:center;width:100%;padding-inline:43px}
#htv-color-design-native header button[data-action="close"]{position:absolute;left:0;top:0;width:36px;height:34px;display:flex;align-items:center;justify-content:center;font-size:22px;padding:0;border:0;background:transparent;color:#dfbf88}
#htv-color-design-native main{display:flex;flex-direction:column;overflow:hidden!important;touch-action:auto!important;padding-bottom:0}
#htv-color-design-native .color-hero{flex:0 0 auto;min-height:0}
#htv-color-design-native .catalog{flex:1 1 auto;min-height:0;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y!important;padding-bottom:12px}
#htv-color-design-native .render-status:empty{display:none}
#htv-color-design-native footer{flex:0 0 auto;gap:0}

/* R1367J — Pannello Color Design coerente con gli sheet HTV. */
#htv-color-design-native{
  align-items:flex-end;
  background:rgba(8,9,13,.68);
  padding:14px 0 0!important;
}
#htv-color-design-native .htv-color-layout{
  height:min(calc(100dvh - 18px),177.77778vw);
  max-height:calc(100dvh - 18px);
  aspect-ratio:auto;
  border-radius:18px 18px 0 0;
  border-bottom:0;
  overflow:hidden;
  padding-bottom:max(8px,env(safe-area-inset-bottom));
  will-change:transform;
}
#htv-color-design-native .htv-sheet-handle{
  flex:0 0 20px;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:7px 16px 2px;
  margin:0 -6px 2px;
  cursor:grab;
  touch-action:none;
  user-select:none;
  outline-offset:-2px;
}
#htv-color-design-native .htv-sheet-handle:active{cursor:grabbing}
#htv-color-design-native .htv-sheet-handle span{
  display:block;
  width:38px;
  height:4px;
  border-radius:999px;
  background:#d2ad74;
}
#htv-color-design-native footer{
  display:flex!important;
  flex:0 0 auto;
  min-height:54px;
  visibility:visible!important;
  overflow:visible;
  background:#1a1620;
  padding:8px 0 max(6px,env(safe-area-inset-bottom));
}
#htv-color-design-native footer button[data-action="confirm"]{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  min-height:40px;
  min-width:min(210px,100%);
}
#htv-color-design-native footer button[data-action="confirm"]:disabled{
  opacity:1!important;
  color:#d3c8b8;
  background:#49434b;
  border-color:#6c6062;
  cursor:not-allowed;
}
@media(max-width:560px){
  #htv-color-design-native .htv-color-layout{border-radius:18px 18px 0 0}
}

/* R242 Live: fix hero 31% + 69% + gap overflow clipping the color target.
   Keep the original 9:16 photo and the independently scrolling nuance catalog. */
#htv-color-design-native .photo-panel,
#htv-color-design-native .selection-panel{max-width:100%;min-width:0;overflow-wrap:anywhere}
#htv-color-design-native .photo-panel canvas{height:auto;max-width:100%;object-fit:contain}
#htv-color-design-native .selection-panel{overflow:visible}


/* R304 candidate — Atelier presentation only; no global or Flutter selectors. */
#htv-color-design-native .htv-color-layout{
  background:linear-gradient(180deg,#28232c 0%,#151219 100%);
  padding-inline:12px;
}
#htv-color-design-native header{padding-bottom:10px;min-height:44px}
#htv-color-design-native header h1{font-size:19px;letter-spacing:.12em}
#htv-color-design-native header button[data-action="close"]{width:44px;height:44px}
#htv-color-design-native .color-hero{grid-template-columns:minmax(0,32fr) minmax(0,68fr);gap:8px}
#htv-color-design-native .photo-panel,
#htv-color-design-native .selection-panel,
#htv-color-design-native .catalog{
  background:#1a1820;border-color:#514650;border-radius:14px;padding:10px
}
#htv-color-design-native .selection-panel h2,
#htv-color-design-native .catalog h2{font-size:15px;color:#ebd9bb;font-weight:600;margin:0 0 6px}
#htv-color-design-native .selection-panel h3,
#htv-color-design-native .catalog h3{font-size:13px;font-weight:600;color:#eee7dc}
#htv-color-design-native .selection-panel p{font-size:11px;line-height:1.4;margin-bottom:7px}
#htv-color-design-native .selected-slots{gap:6px;margin-block:6px 10px}
#htv-color-design-native .slot{min-height:44px;padding:7px;grid-template-columns:18px minmax(0,1fr)}
#htv-color-design-native .slot strong{font-size:12px}
#htv-color-design-native .slot small{font-size:11px;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
#htv-color-design-native .dot{width:18px;height:29px}
#htv-color-design-native .tech-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
#htv-color-design-native .tech-list button{min-height:36px;font-size:12px;padding:6px 4px;white-space:normal;overflow-wrap:anywhere}
#htv-color-design-native .catalog{gap:14px;margin-top:10px;padding-bottom:16px}
#htv-color-design-native .catalog-block{gap:7px;min-width:0}
#htv-color-design-native .catalog-block + .catalog-block{border-top:1px solid #3a333e;padding-top:12px}
#htv-color-design-native .catalog-count{font-size:11px;color:#cbb28d;white-space:nowrap}
#htv-color-design-native .families,
#htv-color-design-native .choices{
  gap:8px;padding:4px 3px 16px;
  margin-bottom:2px;scrollbar-width:thin;scrollbar-color:#9d805b #27222c;
}
#htv-color-design-native .families::-webkit-scrollbar,
#htv-color-design-native .choices::-webkit-scrollbar{height:6px}
#htv-color-design-native .families::-webkit-scrollbar-thumb,
#htv-color-design-native .choices::-webkit-scrollbar-thumb{background:#9d805b;border-radius:999px}
#htv-color-design-native .families::-webkit-scrollbar-track,
#htv-color-design-native .choices::-webkit-scrollbar-track{background:#27222c;border-radius:999px}
#htv-color-design-native .families button{min-height:44px;font-size:13px;padding:10px 13px}
#htv-color-design-native .choices{min-height:0;align-items:stretch}
#htv-color-design-native .swatch{
  flex:0 0 88px;min-width:88px;width:88px;gap:6px;
  border-color:#48404a;background:#211e27;
}
#htv-color-design-native .swatch-strand{min-height:0;width:100%;aspect-ratio:9/16}
#htv-color-design-native .swatch-name{
  display:block;-webkit-line-clamp:unset;overflow:visible;
  min-height:44px;font-size:12px;line-height:1.3;overflow-wrap:anywhere;
}
#htv-color-design-native button:focus-visible{outline:2px solid #ebc78c;outline-offset:-2px}
#htv-color-design-native footer button[data-action="confirm"]{min-height:44px;font-size:13px}
@media(max-width:380px){
  #htv-color-design-native .htv-color-layout{padding-inline:8px}
  #htv-color-design-native .photo-panel,#htv-color-design-native .selection-panel,#htv-color-design-native .catalog{padding:7px}
  #htv-color-design-native .tech-list{gap:4px}
  #htv-color-design-native .tech-list button{font-size:11px}
  #htv-color-design-native .swatch{flex-basis:82px;min-width:82px;width:82px}
}
/* On short windows the main content may scroll as a unit rather than clip
   the catalog. The confirmation footer remains outside that scroll area. */
@media(max-height:690px){
  #htv-color-design-native main{overflow-y:auto!important;touch-action:pan-y!important}
  #htv-color-design-native .catalog{flex:0 0 auto;overflow-y:visible!important}
}

/* Exact selected HEX is shown without photographic lighting modulation. */
#htv-color-design-native .swatch-reference{
  display:block;width:100%;height:7px;border-radius:3px;
  border:1px solid rgba(255,255,255,.16);flex:none;
}


/* R305 — Atelier scrollbars on both axes. Dedicated spacing below each row;
   avoid the platform white track, without changing scroll or selection logic. */
#htv-color-design-native .catalog,
#htv-color-design-native main,
#htv-color-design-native .families,
#htv-color-design-native .choices{
  color-scheme:dark;
  scrollbar-width:thin;
  scrollbar-color:#b79868 #28232c;
}
#htv-color-design-native .catalog,
#htv-color-design-native main{scrollbar-gutter:stable}
#htv-color-design-native .catalog::-webkit-scrollbar,
#htv-color-design-native main::-webkit-scrollbar,
#htv-color-design-native .families::-webkit-scrollbar,
#htv-color-design-native .choices::-webkit-scrollbar{width:7px;height:7px}
#htv-color-design-native .catalog::-webkit-scrollbar-track,
#htv-color-design-native main::-webkit-scrollbar-track,
#htv-color-design-native .families::-webkit-scrollbar-track,
#htv-color-design-native .choices::-webkit-scrollbar-track{
  background:#28232c;border-radius:999px
}
#htv-color-design-native .catalog::-webkit-scrollbar-thumb,
#htv-color-design-native main::-webkit-scrollbar-thumb,
#htv-color-design-native .families::-webkit-scrollbar-thumb,
#htv-color-design-native .choices::-webkit-scrollbar-thumb{
  background:#b79868;border-radius:999px;border:1px solid #28232c
}
#htv-color-design-native .catalog::-webkit-scrollbar-button,
#htv-color-design-native main::-webkit-scrollbar-button,
#htv-color-design-native .families::-webkit-scrollbar-button,
#htv-color-design-native .choices::-webkit-scrollbar-button{display:none;width:0;height:0}
#htv-color-design-native .catalog::-webkit-scrollbar-corner,
#htv-color-design-native main::-webkit-scrollbar-corner,
#htv-color-design-native .families::-webkit-scrollbar-corner,
#htv-color-design-native .choices::-webkit-scrollbar-corner{background:#28232c}
#htv-color-design-native .families,
#htv-color-design-native .choices{padding-bottom:18px}


/* R306 — the reference strand defines the entire fixed upper panel.
   Compact three-column techniques leave the full remainder for Nuance. */
#htv-color-design-native .htv-color-layout{
  padding-inline:10px;padding-top:6px;
  container-type:inline-size;
}
#htv-color-design-native .htv-sheet-handle{flex-basis:15px;padding-top:4px;margin-bottom:0}
#htv-color-design-native header{min-height:36px;padding-bottom:5px;gap:4px}
#htv-color-design-native header h1{font-size:18px;line-height:1.2}
#htv-color-design-native header button[data-action="close"]{width:36px;height:32px}
#htv-color-design-native main{padding-top:6px;scrollbar-gutter:auto}
#htv-color-design-native .color-hero{
  grid-template-columns:minmax(0,34fr) minmax(0,66fr);
  gap:6px;align-items:stretch;
}
#htv-color-design-native .photo-panel,
#htv-color-design-native .selection-panel{padding:6px;border-radius:12px;gap:3px}
#htv-color-design-native .photo-panel{justify-content:flex-start}
#htv-color-design-native .photo-panel canvas{height:auto;aspect-ratio:9/16;flex:none}
#htv-color-design-native .selection-panel{
  display:flex;flex-direction:column;min-height:0;
  height:var(--r306-hero-height,auto);overflow:hidden;
}
#htv-color-design-native .selection-panel h2{font-size:13px;line-height:1.15;margin:0}
#htv-color-design-native .selection-panel p{font-size:10px;line-height:1.15;margin:0}
#htv-color-design-native .selected-slots{gap:3px;margin:2px 0}
#htv-color-design-native .slot{
  min-height:31px;padding:3px 5px;gap:0 5px;
  grid-template-columns:13px minmax(0,1fr);
  border-radius:9px;
}
#htv-color-design-native .dot{width:13px;height:22px}
#htv-color-design-native .slot strong{font-size:10px;line-height:1.1}
#htv-color-design-native .slot small{
  font-size:10px;line-height:1.15;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
#htv-color-design-native .selection-panel h3{font-size:11px;line-height:1.1;margin:0}
#htv-color-design-native .tech-list{
  grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:0;
  flex:1 1 auto;min-height:0;grid-auto-rows:minmax(0,1fr);
}
#htv-color-design-native .tech-list button{
  min-height:0;padding:2px;font-size:10px;line-height:1.05;
  border-radius:8px;overflow-wrap:normal;
}
#htv-color-design-native .catalog{margin-top:6px;padding:7px;gap:7px}
#htv-color-design-native .catalog h2{font-size:14px;line-height:1.2;margin:0}
#htv-color-design-native .catalog-block{gap:4px;flex:0 0 auto}
#htv-color-design-native .catalog-block + .catalog-block{padding-top:7px}
#htv-color-design-native .block-head{gap:4px}
#htv-color-design-native .families,
#htv-color-design-native .choices{padding-top:3px;padding-bottom:12px;margin-bottom:0;gap:6px}
#htv-color-design-native .families button{min-height:34px;padding:5px 9px;font-size:12px}
#htv-color-design-native .swatch{gap:4px}
#htv-color-design-native .swatch-name{min-height:28px;font-size:11px;line-height:1.15}
#htv-color-design-native footer{
  min-height:36px;padding:4px 0 max(3px,env(safe-area-inset-bottom));gap:0
}
#htv-color-design-native footer button[data-action="confirm"]{
  min-height:30px;min-width:min(150px,100%);padding:4px 12px;font-size:11px;border-radius:10px
}
/* Native touch and trackpad momentum are preserved, with mouse drag inertia
   handled locally in the Color Design script. Vertical swipe can begin on a card. */
#htv-color-design-native .families,
#htv-color-design-native .choices{touch-action:pan-x pan-y!important;user-select:none}
#htv-color-design-native .catalog{touch-action:pan-x pan-y!important;user-select:none}
@media(max-height:690px){
  #htv-color-design-native main{overflow:hidden!important;touch-action:auto!important}
  #htv-color-design-native .catalog{flex:1 1 auto;overflow-y:auto!important}
}
@container (max-width:350px){
  #htv-color-design-native .color-hero{grid-template-columns:minmax(0,37fr) minmax(0,63fr);gap:4px}
  #htv-color-design-native .selection-panel,
  #htv-color-design-native .photo-panel{padding:4px;gap:2px}
  #htv-color-design-native .selection-panel h2{font-size:12px}
  #htv-color-design-native .selection-panel p{font-size:9px}
  #htv-color-design-native .slot{min-height:27px;padding:2px 3px;gap:0 3px}
  #htv-color-design-native .slot small{font-size:9px}
  #htv-color-design-native .dot{width:11px;height:19px}
  #htv-color-design-native .tech-list button{font-size:9px;letter-spacing:-.12px}
}
/* Very short viewport: retain independent catalog scrolling, but allow the
   upper controls to remain reachable rather than clipping them. */
@media(max-height:480px){
  #htv-color-design-native main{overflow-y:auto!important;touch-action:pan-y!important}
  #htv-color-design-native .catalog{flex:0 0 auto;overflow-y:visible!important}
}


/* R307: three full-height catalog pages, independently horizontal inside.
   The reference canvas determines the fixed upper panel, not the controls. */
#htv-color-design-native .color-hero{align-items:start;grid-template-columns:minmax(0,35fr) minmax(0,65fr)}
#htv-color-design-native .photo-panel{position:relative;min-height:0;height:var(--r306-hero-height,auto);overflow:hidden}
#htv-color-design-native .photo-panel .render-status{position:absolute;bottom:5px;left:5px;right:5px;margin:0;background:#17141cd9;border-radius:4px}
#htv-color-design-native .selection-panel{height:var(--r306-hero-height,auto)}
#htv-color-design-native .catalog{
  flex:1 1 0;min-height:0;display:flex;flex-direction:column;
  gap:0;padding:0;overflow:hidden!important;touch-action:auto!important;
  scrollbar-gutter:auto;
}
#htv-color-design-native .catalog > h2{display:none}
#htv-color-design-native .catalog-nav{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;
  flex:0 0 auto;padding:6px 7px 4px;border-bottom:1px solid #3a333e;
}
#htv-color-design-native .catalog-nav button{
  min-width:0;min-height:28px;padding:3px 4px;font-size:11px;line-height:1.1;border-radius:8px
}
#htv-color-design-native .catalog-pages{
  flex:1 1 0;min-height:0;overflow-x:hidden;overflow-y:auto;
  scroll-snap-type:y mandatory;overscroll-behavior:contain;
  touch-action:pan-x pan-y;scrollbar-width:thin;scrollbar-color:#b79868 #28232c;
  -webkit-overflow-scrolling:touch;
}
#htv-color-design-native .catalog-pages.is-dragging{scroll-snap-type:none}
#htv-color-design-native .catalog-pages > .catalog-block{
  height:100%;min-height:100%;max-height:100%;flex:none;
  scroll-snap-align:start;scroll-snap-stop:always;box-sizing:border-box;
  padding:7px;border:0;gap:5px;overflow:hidden;
}
#htv-color-design-native .catalog-pages .block-head{flex:none}
#htv-color-design-native .catalog-pages .families{flex:none;min-height:0;padding-bottom:8px}
#htv-color-design-native .catalog-pages .choices{
  flex:1 1 0;min-height:0;align-items:stretch;padding:3px 3px 11px;
  container-type:size;
}
#htv-color-design-native .catalog-pages .swatch{
  flex:0 0 clamp(68px,calc((100cqh - 58px)*.5625 + 10px),132px);
  width:clamp(68px,calc((100cqh - 58px)*.5625 + 10px),132px);
  min-width:clamp(68px,calc((100cqh - 58px)*.5625 + 10px),132px);
  display:flex;flex-direction:column;align-items:stretch;justify-content:center;
  min-height:0;overflow:hidden;
}
#htv-color-design-native .catalog-pages .swatch-strand{
  min-height:0;flex:1 1 0;height:0;width:100%;aspect-ratio:auto;object-fit:contain;
}
#htv-color-design-native .catalog-pages .swatch-reference{height:5px}
#htv-color-design-native .catalog-pages .swatch-name{
  flex:none;min-height:28px;font-size:11px;line-height:1.15;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;
}
@container (max-width:350px){
  #htv-color-design-native .color-hero{grid-template-columns:minmax(0,38fr) minmax(0,62fr)}
  #htv-color-design-native .catalog-pages > .catalog-block{padding:5px}
  #htv-color-design-native .catalog-pages .families button{min-height:28px;font-size:10px;padding:4px 7px}
  #htv-color-design-native .catalog-pages .swatch-name{font-size:10px}
}
@media(max-height:480px){
  #htv-color-design-native .catalog{flex:0 0 260px!important;min-height:260px;overflow:hidden!important}
}


/* R307 editorial typography — category headings use the recovered space,
   while the compact project controls remain bounded by the reference lock. */
#htv-color-design-native .catalog-nav button{
  font-size:12px;font-weight:600;min-height:32px;letter-spacing:.01em;
}
#htv-color-design-native .catalog-pages > .catalog-block{padding:9px 8px;gap:6px}
#htv-color-design-native .catalog-pages .block-head{
  align-items:center;min-height:25px;gap:8px;
}
#htv-color-design-native .catalog-pages .block-head h3{
  font-size:19px;line-height:1.12;color:#ebd9bb;font-weight:600;letter-spacing:.015em;
}
#htv-color-design-native .catalog-pages .catalog-count{
  font-size:12px;font-weight:500;color:#d2b88c;line-height:1.15;
}
#htv-color-design-native .catalog-subtitle{
  margin:0;color:#bfc0c5;font-size:11px;line-height:1.2;flex:none;
}
#htv-color-design-native .catalog-pages .families button{
  font-size:12px;font-weight:500;min-height:32px;
}
#htv-color-design-native .catalog-pages .swatch-name{
  font-size:12px;line-height:1.2;min-height:40px;font-weight:500;
  color:#eee7dc;display:block;overflow-wrap:anywhere;
  -webkit-line-clamp:unset;overflow:visible;
}
#htv-color-design-native .catalog-pages .swatch.is-selected .swatch-name{
  font-weight:700;color:#f6e3bb;
}
#htv-color-design-native .catalog-pages .swatch{
  flex-basis:clamp(82px,calc((100cqh - 78px)*.5625 + 12px),132px);
  width:clamp(82px,calc((100cqh - 78px)*.5625 + 12px),132px);
  min-width:clamp(82px,calc((100cqh - 78px)*.5625 + 12px),132px);
  justify-content:flex-start;
}
@container (min-width:351px){
  #htv-color-design-native .selection-panel h2{font-size:14px}
  #htv-color-design-native .selection-panel h3{font-size:12px}
  #htv-color-design-native .tech-list button{font-size:11px}
}
@container (max-width:350px){
  #htv-color-design-native .catalog-pages > .catalog-block{padding:5px;gap:4px}
  #htv-color-design-native .catalog-nav button{min-height:28px;font-size:11px}
  #htv-color-design-native .catalog-pages .block-head{min-height:20px}
  #htv-color-design-native .catalog-pages .block-head h3{font-size:16px}
  #htv-color-design-native .catalog-pages .catalog-count{font-size:11px}
  #htv-color-design-native .catalog-subtitle{font-size:10px}
  #htv-color-design-native .catalog-pages .families button{min-height:28px;font-size:11px}
  #htv-color-design-native .catalog-pages .swatch-name{font-size:11px;min-height:32px}
}


/* R308 — identical photographic viewport for every swatch in a row.
   Text has a reserved, strictly bounded two-line layer and cannot resize it. */
#htv-color-design-native .catalog-pages .choices{
  padding:2px 3px 3px;align-items:stretch;gap:7px;
}
#htv-color-design-native .catalog-pages .swatch{
  display:grid;
  grid-template-rows:minmax(0,1fr) 5px 32px;
  align-content:stretch;align-items:stretch;
  flex:0 0 clamp(82px,calc((100cqh - 49px)*.5625 + 10px),160px);
  min-width:clamp(82px,calc((100cqh - 49px)*.5625 + 10px),160px);
  width:clamp(82px,calc((100cqh - 49px)*.5625 + 10px),160px);
  height:100%;min-height:0;gap:3px;padding:5px!important;
  border:2px solid #48404a;
}
#htv-color-design-native .catalog-pages .swatch.is-selected{padding:5px!important}
#htv-color-design-native .catalog-pages .swatch-strand{
  display:block;width:100%;height:100%;min-height:0;
  object-fit:contain;aspect-ratio:auto;
}
#htv-color-design-native .catalog-pages .swatch-reference{height:5px;min-height:5px}
#htv-color-design-native .catalog-pages .swatch-name{
  box-sizing:border-box;height:32px;min-height:32px;max-height:32px;
  font-size:12px;line-height:16px;display:-webkit-box;
  -webkit-box-orient:vertical;-webkit-line-clamp:2;
  overflow:hidden;overflow-wrap:anywhere;text-align:center;
}
#htv-color-design-native .catalog-pages .swatch-name.r308-long-name{font-size:10px;line-height:16px}
#htv-color-design-native .catalog-pages .families{padding-bottom:3px}
#htv-color-design-native .catalog-pages,
#htv-color-design-native .catalog-pages .choices,
#htv-color-design-native .catalog-pages .families,
#htv-color-design-native main{
  scrollbar-width:none!important;scrollbar-gutter:auto!important;
}
#htv-color-design-native .catalog-pages::-webkit-scrollbar,
#htv-color-design-native .catalog-pages .choices::-webkit-scrollbar,
#htv-color-design-native .catalog-pages .families::-webkit-scrollbar,
#htv-color-design-native main::-webkit-scrollbar{
  display:none!important;width:0!important;height:0!important;
}
/* Overlay indicators never take layout space and never intercept gestures. */
#htv-color-design-native .r308-scroll-indicator{
  position:absolute;z-index:4;pointer-events:none;
  background:rgba(183,152,104,.38);border-radius:999px;
  opacity:0;transition:opacity .18s ease;
}
#htv-color-design-native .r308-scroll-indicator.active{opacity:1}
#htv-color-design-native .r308-scroll-indicator span{
  display:block;position:absolute;background:#d2ae77;border-radius:999px;
}
@container (max-width:350px){
  #htv-color-design-native .catalog-pages .swatch-name{font-size:11px;line-height:16px}
}


/* R309: use the same four catalog tracks in every category.
   The family selector occupies track 3 only in Reflections; the same
   space is reserved in Bases and Fantasy. All cards therefore share
   identical width, height, image viewport and vertical alignment. */
#htv-color-design-native .catalog-pages > .catalog-block{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:25px 14px 38px minmax(0,1fr);
  align-content:stretch;align-items:stretch;gap:6px;
}
#htv-color-design-native .catalog-pages .block-head{grid-row:1;min-height:0}
#htv-color-design-native .catalog-pages .catalog-subtitle{grid-row:2;min-height:0}
#htv-color-design-native .catalog-pages .families{grid-row:3;min-height:0;padding:2px 3px 3px;align-items:center}
#htv-color-design-native .catalog-pages .choices{grid-row:4;min-height:0;min-width:0}
@container (max-width:350px){
  #htv-color-design-native .catalog-pages > .catalog-block{
    grid-template-rows:20px 12px 34px minmax(0,1fr);gap:4px;
  }
}


/* Prevent intrinsic image/text widths from altering the single card column. */
#htv-color-design-native .catalog-pages .swatch{
  grid-template-columns:minmax(0,1fr);
}
#htv-color-design-native .catalog-pages .swatch-strand,
#htv-color-design-native .catalog-pages .swatch-reference,
#htv-color-design-native .catalog-pages .swatch-name{
  min-width:0;max-width:100%;justify-self:stretch;
}
#htv-color-design-native .catalog-pages .swatch-strand{width:100%;height:100%;object-fit:contain}
