.cp-size-preview{--cp-ink:#102235;--cp-gold:#e4bb62;box-sizing:border-box;margin:20px 0;padding:16px;border:1px solid #dce4e6;border-radius:16px;background:#f6f8f7;color:var(--cp-ink);min-width:0;clear:both}
.cp-size-preview *{box-sizing:border-box}
.cp-size-preview[hidden],.cp-size-preview [hidden]{display:none!important}
.cp-size-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0;margin:12px 0;border:0}
.cp-size-fields legend{font-size:12px;padding:0 0 8px;color:inherit}
.cp-size-fields label{position:relative;display:flex;flex-direction:column;min-width:0}
.cp-size-fields label>span{position:absolute;inset:5px 10px auto auto;font-size:11px;line-height:1.5;color:#405b50}
.cp-size-fields input{width:100%;min-width:0;min-height:60px;padding:24px 8px 6px;border:1px solid #96aaa1;border-radius:10px;font:inherit;direction:ltr;text-align:center;background:#fff;color:#102235}
.cp-size-preview input[aria-invalid=true]{border-color:#a22b25}
.cp-size-preview button{font:inherit;line-height:1.4;cursor:pointer;min-height:44px;min-width:0;border:1px solid #617588;border-radius:8px;padding:8px 2px;background:#20384b;color:#f8f8f4}
.cp-size-preview button[aria-pressed=true]{background:#476545;border-color:var(--cp-gold);color:#fff}
.cp-size-preview button:disabled{opacity:.5;cursor:default}
.cp-size-preview :is(button,a,input,canvas):focus-visible{outline:3px solid #b77b0e;outline-offset:2px}
.cp-size-message{font-size:13px;line-height:1.8;margin:6px 0;color:#a65234}
.cp-size-model{position:relative;min-width:0;padding:8px;border-radius:12px;background:#102235;color:#f4f5ed;overflow:hidden}
.cp-size-steps{display:grid;grid-template-columns:repeat(var(--cp-step-count,6),minmax(0,1fr));gap:4px}
.cp-size-steps button{font-size:12px;white-space:nowrap}
.cp-size-model .cp-scene{position:relative;width:100%;height:clamp(280px,42vw,460px)}
.cp-size-preview[data-box-model="handle"] .cp-scene,.cp-sofre-hero .cp-scene{background:radial-gradient(ellipse at 45% 35%,#fffefa 0%,#eff1ef 58%,#dfe6e8 100%);border-radius:10px}
.cp-size-preview[data-box-model="handle"] .cp-scene-help,.cp-sofre-hero .cp-scene-help{color:#52636c}
.cp-size-preview[data-box-model="handle"] .cp-scene canvas{touch-action:none}
.cp-size-model canvas{display:block;width:100%;height:100%;touch-action:pan-y;cursor:grab}
.cp-size-model canvas:active{cursor:grabbing}
.cp-size-model .cp-viewer-fallback-image{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;padding:18px;background:radial-gradient(ellipse at 45% 35%,#fffefa 0%,#e9eeee 60%,#d7e0e3 100%)}
.cp-scene-help{position:absolute;inset:auto 0 8px;text-align:center;font-size:11px;color:#b8c8dc;pointer-events:none}
.cp-size-model .cp-fallback{position:absolute;z-index:2;inset:auto 12px 12px;display:grid;place-content:center;text-align:center;padding:10px 14px;line-height:1.8;border-radius:9px;background:#102235e8;color:#fff;margin:0}
.cp-size-preview .cp-size-buy{display:flex;align-items:center;justify-content:center;min-height:48px;width:100%;margin-top:12px;padding:10px 14px;border:0;border-radius:10px;background:#2d4e3e;color:#fff;font-weight:700;line-height:1.7;text-decoration:none}
.cp-size-preview a.cp-size-buy[aria-disabled=true]{opacity:.5;pointer-events:none}
/* Reuse Core's actual form and search handlers, with three compact fields. */
[data-chipak-core-size-finder]:is([data-category="printed-lock-bottom-box"],[data-category="custom-printed-keyboard-box"]) .cp-size-preview{margin:0;padding:0;border:0;background:transparent}
[data-chipak-core-size-finder]:is([data-category="printed-lock-bottom-box"],[data-category="custom-printed-keyboard-box"]) .cp-size-preview [data-size-form]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 12px}
.cp-size-preview .chipak-core-size-finder__field{min-width:0}
.cp-size-preview .chipak-core-size-finder__field input{min-width:0;width:100%;text-align:center}
.cp-size-preview [data-size-submit]{grid-column:1/-1}
[data-chipak-core-size-finder]:is([data-category="printed-lock-bottom-box"],[data-category="custom-printed-keyboard-box"]) :is([data-size-status],[data-category-results],[data-global-results]){scroll-margin-top:120px}
/* The Hero shares the page background; its model and inputs retain contrast. */
.cp-size-preview--hero{--cp-ink:#f2f6fc;width:100%;max-width:620px;margin:0 auto;padding:0;border:0;border-radius:0;background:transparent;color:var(--cp-ink);font-family:Tahoma,Arial,sans-serif}
.cp-size-preview--hero .cp-size-model{padding:0;background:transparent}
.cp-size-preview--hero .cp-size-steps button[aria-pressed=true]{background:#174d86;border-color:#e4bb62}
.cp-size-preview--hero .cp-size-buy{background:linear-gradient(135deg,#edca82,#ca9a49);color:#102235}
@media(max-width:600px){.cp-size-preview{padding:10px}.cp-size-preview--hero{padding:0}.cp-size-model{padding:6px}.cp-size-model .cp-scene{height:300px}.cp-size-steps button{font-size:11px}.cp-size-fields{gap:6px}}

.cp-size-preview--keyboard{--cp-step-count:6}
.cp-artwork{margin-top:12px;border:1px solid #8c9f9a;border-radius:10px;color:inherit}
.cp-artwork summary{padding:12px;min-height:48px;cursor:pointer;font-weight:700;font-size:14px}
.cp-artwork-body{padding:0 12px 12px;min-width:0}
.cp-artwork fieldset{padding:0;margin:10px 0;border:0;min-width:0}
.cp-art-select{position:relative;display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;background:#20384b;color:#fff;border:1px solid #8c9f9a;border-radius:8px;cursor:pointer;font-size:14px}
.cp-art-select input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.cp-art-select:focus-within,.cp-artwork summary:focus-visible{outline:3px solid #b77b0e;outline-offset:2px}
.cp-art-hint,.cp-art-name,.cp-art-status{font-size:12px;line-height:1.8;margin:8px 0;overflow-wrap:anywhere}
.cp-art-name{font-weight:700}.cp-art-status{color:#a65234}
.cp-artwork [data-art-editor]{display:block;width:100%;height:auto;aspect-ratio:3/2;border-radius:8px;touch-action:none;cursor:move;background:#e5ebe8}
.cp-art-scale{display:grid;grid-template-columns:1fr auto;gap:6px;align-items:center;margin:12px 0;font-size:13px}
.cp-art-scale input{grid-column:1/-1;width:100%;min-width:0;min-height:32px;margin:0;direction:ltr;accent-color:#b77b0e}
.cp-art-actions{display:grid;grid-template-columns:1fr 1.5fr 1fr;gap:6px}
.cp-art-actions button{font-size:12px;padding:8px 4px;white-space:normal}
.cp-art-order button{width:100%;min-height:44px;padding:8px 12px;border:1px solid #8c9f9a;border-radius:8px;background:#20384b;color:#fff;white-space:normal;font-size:13px}
.cp-art-order button[aria-pressed="true"]{background:#365d4a;border-color:#b9d6c8}
.cp-art-order button:focus-visible{outline:3px solid #b77b0e;outline-offset:2px}
.cp-artwork .cp-art-build{width:100%;margin-top:10px;background:#2d4e3e;color:#fff}
.cp-size-preview--hero .cp-art-status{color:#ffdca6}
@media(max-width:600px){.cp-artwork-body{padding:0 8px 10px}.cp-art-actions{gap:4px}.cp-art-actions button{font-size:11px}}
/* Two compact controls, with the expanded artwork editor using the full row. */
.cp-customize{position:relative;margin-top:12px;min-height:52px}
.cp-customize .cp-artwork{margin:0;border:0;border-radius:0}
.cp-customize .cp-artwork summary{display:flex;align-items:center;justify-content:center;width:calc(50% - 4px);min-height:52px;padding:8px 6px;border:1px solid #8c9f9a;border-radius:10px;font-size:13px;line-height:1.7;text-align:center;list-style:none}
.cp-customize summary::-webkit-details-marker{display:none}
.cp-customize .cp-artwork[open] summary{border-color:#ba8a3e;background:#ffffff0b}
.cp-customize .cp-artwork-body{margin-top:8px;border:1px solid #8c9f9a;border-radius:10px;padding:12px}
.cp-stock-select{position:absolute;inset-block-start:0;inset-inline-end:0;display:flex;align-items:center;width:calc(50% - 4px);min-width:0;min-height:52px;padding:0 8px;border:1px solid #8c9f9a;border-radius:10px;gap:6px}
.cp-stock-select select{font:inherit;font-size:12px;line-height:1.7;width:100%;min-width:0;min-height:50px;border:0;background:transparent;color:inherit;cursor:pointer;padding:4px 0}
.cp-stock-select select option{background:#f6f8f7;color:#102235}
.cp-stock-select:focus-within{outline:3px solid #b77b0e;outline-offset:2px}
.cp-stock-swatch{flex:0 0 20px;width:20px;height:24px;border-radius:4px;background:linear-gradient(135deg,#fff,#e8e4d9);box-shadow:inset 0 0 0 1px #a49d8970,1px 2px 2px #0002}
[data-stock=kraft]>.cp-customize .cp-stock-swatch{background:repeating-linear-gradient(12deg,#b38b56 0 1px,#bc955e 1px 3px,#ad854d 3px 4px);border-bottom:3px double #6e4d29}
@media(max-width:380px){.cp-customize .cp-artwork summary{font-size:11px}.cp-stock-select{padding:0 5px;gap:4px}.cp-stock-select select{font-size:11px}.cp-stock-swatch{flex-basis:15px;width:15px;height:21px}}

/* Carton heroes reuse the native finder without squeezing results into a column. */
body.chipak-site .cp-category-preview-finder{margin:0;padding:0;border:0;background:transparent;box-shadow:none}
body.chipak-site .cp-category-preview-hero{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:24px!important;align-items:start!important}
body.chipak-site .cp-size-preview--category-hero{width:100%;margin:0;padding:12px;background:#f6f8f7;color:#102235}
body.chipak-site .cp-size-preview [data-size-form]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 12px}
body.chipak-site .cp-size-preview [data-size-form]>div{min-width:0}
body.chipak-site .cp-size-preview [data-size-submit]{grid-column:1/-1;margin:0;align-self:stretch}
body.chipak-site .cp-size-preview [data-size-form] input{width:100%;min-width:0;text-align:center}
body.chipak-site .cp-size-preview--category-hero .cp-scene{height:clamp(260px,28vw,350px)}
body.chipak-site .cp-category-preview-finder :is([data-size-status],[data-category-results],[data-global-results]){scroll-margin-top:120px}
body.chipak-site .cp-category-reference{float:none;width:min(100%,440px)!important;max-width:440px!important;margin:32px auto!important;justify-self:center}
body.chipak-site .cp-category-reference img{display:block;width:100%;height:auto;max-height:440px;object-fit:contain}
body.chipak-site .cp-category-reference figcaption{color:#526170;text-align:center;font-size:13px;line-height:1.8}
@media(max-width:900px){body.chipak-site .cp-category-preview-hero{grid-template-columns:minmax(0,1fr)!important}body.chipak-site .cp-size-preview--category-hero .cp-scene{height:300px}}
