/* ATRETO — «پک دلخواهت را بساز» · local prototype styles.
   Reads only the retail tokens in styles/retail-tokens.css (ATRETO Product Design System v1).
   In the Next.js app, drop the @font-face (next/font already provides --font-yekan-bakh). */
@font-face{font-family:'Yekan Bakh';src:url('/custom-pack-preview/assets/fonts/YekanBakh-VF.woff2') format('woff2');font-weight:100 950;font-stretch:62.5% 150%;font-display:swap}
body[data-commerce="true"]{--font-yekan-bakh:'Yekan Bakh';--f-ui:var(--font-sans);--cpb-summary:360px}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-padding-top:150px}
body{margin:0;background:var(--surface-page);color:var(--text-primary);font-family:var(--font-sans);font-stretch:100%;font-size:var(--type-body-size);line-height:var(--type-body-leading);font-weight:400;letter-spacing:0;-webkit-font-smoothing:antialiased}
button,input{font:inherit;font-stretch:100%;color:inherit;letter-spacing:0}
img{display:block;max-width:100%}
a{color:inherit}
h1,h2,h3,p{margin:0}
bdi[dir=ltr],.ltr{unicode-bidi:isolate}
.i{width:var(--icon-lg);height:var(--icon-lg);fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex:none}
.i.sm{width:var(--icon-md);height:var(--icon-md);stroke-width:1.75}
.i.xs{width:var(--icon-sm);height:var(--icon-sm);stroke-width:2}
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{display:inline-flex;align-items:center;min-height:var(--control-md);position:absolute;inset-inline-start:var(--space-16);top:-100px;z-index:var(--z-toast);background:var(--action-primary);color:var(--text-on-inverse);padding:var(--space-8) var(--space-16);border-radius:var(--radius-md)}
.skip:focus{top:var(--space-8)}
main h1:focus,main h1:focus-visible,[role=dialog]:focus,.sheet-head h2:focus{outline:none}
:focus-visible{outline:var(--border-2) solid var(--focus-ring);outline-offset:3px}
.frame{max-width:var(--frame-max);margin-inline:auto;padding-inline:var(--gutter-wide)}
main{display:block;min-height:60vh;outline:0}

/* ───────── header (port of RetailHeader.module.css) ───────── */
.hdr{position:sticky;top:0;z-index:var(--z-header);background:var(--surface-page);border-bottom:1px solid var(--border-subtle)}
.hdr a{text-decoration:none}
.hdr-main{display:grid;grid-template-columns:auto minmax(0,700px) 1fr auto;grid-template-areas:"logo search gap tools";align-items:center;column-gap:var(--space-32);padding-block:var(--space-16) var(--space-8)}
.hdr-brand{grid-area:logo;display:flex;align-items:center;min-height:var(--control-md);border-radius:var(--radius-sm)}
.hdr-brand img{height:56px;width:auto}
.hdr-search{grid-area:search;min-width:0}
.hdr-field{display:flex;align-items:center;gap:var(--space-12);min-height:var(--control-lg);padding-inline:var(--space-16) var(--space-4);border-radius:var(--radius-md);border:1px solid var(--border-control);background:var(--surface-sunken)}
.hdr-field input{flex:1;min-width:0;height:var(--control-lg);border:0;background:none;outline:0;font-size:var(--type-input-size)}
.hdr-field input::placeholder{color:var(--text-tertiary);opacity:1}
.hdr-tools{grid-area:tools;display:flex;align-items:center;gap:var(--space-12)}
.hdr-tools>a,.hdr-tools>button{position:relative;display:flex;align-items:center;justify-content:center;gap:var(--space-8);min-width:46px;height:var(--control-md);background:none;border:0;padding:0;cursor:pointer}
.hdr-account{padding:0 var(--space-16)!important;border:1px solid var(--border-control)!important;border-radius:var(--radius-md);font-weight:500;white-space:nowrap}
.hdr-cart{border-radius:var(--radius-md)}.hdr-cart:hover{background:var(--surface-sunken)}
.hdr-cart b{position:absolute;top:1px;left:0;min-width:21px;height:21px;border-radius:var(--radius-md);background:var(--action-primary);color:var(--text-on-inverse);font-size:var(--type-micro-size);display:grid;place-items:center;padding:0 var(--space-4);border:2px solid var(--border-subtle)}
.hdr-mtool{display:none!important}
.hdr-nav{display:flex;align-items:center;justify-content:space-between;gap:var(--space-20);height:50px}
.hdr-collections{display:flex;align-items:center;gap:var(--space-4);height:100%;min-width:0}
.hdr-collections a{display:flex;align-items:center;height:100%;min-height:44px;padding:0 var(--space-12);color:var(--text-secondary);white-space:nowrap}
.hdr-collections a:first-child{font-weight:600;color:var(--text-primary)}
.hdr-collections a:hover{text-decoration:underline;text-underline-offset:12px}
.hdr-orders{font-size:var(--type-body-sm-size);color:var(--text-secondary);white-space:nowrap;display:inline-flex;align-items:center;min-height:44px}
.hdr-focus{display:none}
@media(max-width:1180px){.hdr-main{grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"logo search tools";gap:var(--space-24)}.hdr-collections a{padding-inline:var(--space-8);font-size:var(--type-body-sm-size)}}

/* ───────── shared bits ───────── */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-8);min-height:var(--control-md);padding:0 var(--space-20);border-radius:var(--radius-md);border:1px solid transparent;font-size:var(--type-label-size);line-height:var(--type-label-leading);font-weight:var(--type-label-weight);cursor:pointer;text-decoration:none;white-space:nowrap;transition:background var(--duration-fast),border-color var(--duration-fast),color var(--duration-fast)}
.btn.lg{min-height:var(--control-lg);padding-inline:var(--space-24)}
.btn.block{width:100%}
.btn.primary{background:var(--button-primary-bg);color:var(--button-primary-fg)}
.btn.primary:hover{background:var(--button-primary-bg-hover)}
.btn.secondary{background:var(--surface-raised);border-color:var(--button-secondary-border);color:var(--text-primary)}
.btn.secondary:hover{background:var(--action-ghost-hover)}
.btn.ghost{background:none;color:var(--text-primary)}
.btn.ghost:hover{background:var(--action-ghost-hover)}
.btn.danger{background:var(--surface-raised);border-color:var(--danger-fg);color:var(--danger-fg)}
.btn:active:not(:disabled){transform:translateY(1px)}
.btn:disabled,.btn[aria-disabled=true]{cursor:not-allowed;background:var(--surface-sunken);color:var(--text-disabled);border-color:transparent}
.btn.secondary:disabled{border:1px dashed var(--border-control);background:var(--surface-raised)}
.btn[aria-busy=true]{cursor:progress}
.spinner{width:18px;height:18px;border-radius:50%;border:2px solid currentColor;border-inline-end-color:transparent;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.link{display:inline-flex;align-items:center;gap:var(--space-4);min-height:var(--control-md);background:none;border:0;padding:0 var(--space-4);font-weight:600;font-size:var(--type-body-sm-size);text-decoration:underline;text-underline-offset:6px;cursor:pointer;color:var(--text-primary)}
.crumbs{display:flex;flex-wrap:wrap;gap:var(--space-8);padding:var(--space-16) 0 0;font-size:var(--type-caption-size);color:var(--text-secondary);list-style:none;margin:0}
.crumbs li:not(:last-child)::after{content:'/';margin-inline-start:var(--space-8);color:var(--text-tertiary)}
.crumbs li{display:inline-flex;align-items:center;min-height:var(--control-md)}
.crumbs a{display:inline-flex;align-items:center;min-height:var(--control-md);text-decoration:none}.crumbs a:hover{text-decoration:underline}
.crumbs [aria-current]{color:var(--text-primary)}
.alert{display:flex;gap:var(--space-12);align-items:flex-start;padding:var(--space-12) var(--space-16);border-radius:var(--radius-md);font-size:var(--type-body-sm-size);line-height:var(--type-body-sm-leading)}
.alert .i{margin-top:2px}
.alert.info{background:var(--surface-subtle);color:var(--text-primary)}
.alert.warning{background:var(--warning-bg);color:var(--warning-fg)}
.alert.danger{background:var(--danger-bg);color:var(--danger-fg)}
.alert.success{background:var(--success-bg);color:var(--success-fg)}
.alert b{font-weight:700}
.alert p+p,.alert p+.alert-actions{margin-top:var(--space-4)}
.alert-actions{display:flex;flex-wrap:wrap;gap:var(--space-8);margin-top:var(--space-8)}
.alert-actions .btn{min-height:var(--control-md)}
.disclose{display:flex;gap:var(--space-8);align-items:flex-start;font-size:var(--type-caption-size);line-height:var(--type-caption-leading);color:var(--text-secondary)}
.disclose .i{margin-top:2px}
.price{font-size:var(--type-price-size);line-height:var(--type-price-leading);font-weight:var(--type-price-weight)}
.price small{font-size:var(--type-caption-size);font-weight:500;margin-inline-start:var(--space-4)}
.illus{display:inline-flex;align-items:center;gap:var(--space-4);font-size:var(--type-micro-size);line-height:var(--type-micro-leading);font-weight:600;color:var(--text-secondary);border:1px dashed var(--border-control);border-radius:var(--radius-pill);padding:0 var(--space-8)}
.skel{display:inline-block;height:1em;border-radius:var(--radius-xs);background:linear-gradient(90deg,var(--surface-sunken),var(--neutral-150),var(--surface-sunken));background-size:200% 100%;animation:sh 1.2s ease-in-out infinite}
@keyframes sh{to{background-position:-200% 0}}

/* steps */
.steps{display:flex;gap:var(--space-8);list-style:none;margin:0;padding:0;font-size:var(--type-caption-size);color:var(--text-tertiary)}
.steps li{display:flex;align-items:center;gap:var(--space-8)}
.steps li:not(:last-child)::after{content:'';width:24px;height:1px;background:var(--border-default)}
.steps li span{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;border:1px solid var(--border-default);font-size:var(--type-micro-size);font-weight:700}
.steps li[aria-current=step]{color:var(--text-primary);font-weight:700}
.steps li[aria-current=step] span{background:var(--action-primary);color:var(--text-on-inverse);border-color:var(--action-primary)}
.steps li.done{color:var(--text-secondary)}
.steps li.done span{border-color:var(--border-strong);color:var(--text-primary)}

/* segmented (size / audience) */
.seg{display:inline-flex;padding:var(--space-4);gap:var(--space-4);background:var(--surface-sunken);border-radius:var(--radius-md);border:0;margin:0;min-width:0}
.seg legend{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.seg label{position:relative;display:inline-flex}
.seg input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.seg span{display:inline-flex;align-items:center;justify-content:center;min-height:36px;min-width:44px;padding:0 var(--space-12);border-radius:var(--radius-sm);font-size:var(--type-label-sm-size);font-weight:600;color:var(--text-secondary);white-space:nowrap}
.seg input:checked+span{background:var(--action-primary);color:var(--text-on-inverse)}
.seg input:focus-visible+span{outline:var(--border-2) solid var(--focus-ring);outline-offset:2px}
.seg label:hover input:not(:checked)+span{color:var(--text-primary)}
.seg.size span{min-width:64px}

/* chips */
.chips{display:flex;gap:var(--space-8);flex-wrap:wrap}
.chip{display:inline-flex;align-items:center;gap:var(--space-4);min-height:var(--control-md);padding:0 var(--space-12);border:1px solid var(--border-default);border-radius:var(--radius-pill);background:var(--surface-raised);font-size:var(--type-label-sm-size);font-weight:500;cursor:pointer;position:relative}
.chip::after{content:'';position:absolute;inset:-2px 0}
.chip[aria-pressed=true]{background:var(--action-primary);border-color:var(--action-primary);color:var(--text-on-inverse)}
.chip:hover:not([aria-pressed=true]){border-color:var(--border-strong)}

/* ───────── entry: discovery-pack listing ───────── */
.page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:var(--space-16);padding-block:var(--space-24) var(--space-24)}
.page-head h1{font-size:var(--type-heading-1-size);line-height:var(--type-heading-1-leading);font-weight:var(--type-heading-1-weight)}
.page-head p{color:var(--text-secondary);font-size:var(--type-body-size)}
.entry{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);border:1px solid var(--border-subtle);border-radius:var(--radius-xl);overflow:hidden;background:var(--surface-raised)}
.entry-media{display:grid;grid-template-columns:repeat(5,1fr);gap:var(--space-8);padding:var(--space-24);background:var(--surface-subtle);align-content:center}
.entry-media figure{margin:0;aspect-ratio:3/4;border-radius:var(--radius-lg);overflow:hidden;background:var(--surface-media)}
.entry-media figure:nth-child(even){transform:translateY(16px)}
.entry-media img{width:100%;height:100%;object-fit:cover}
.entry-body{padding:var(--space-40);display:flex;flex-direction:column;gap:var(--space-16);justify-content:center}
.eyebrow{font-size:var(--type-caption-size);font-weight:600;color:var(--text-secondary)}
.entry-body h2{font-size:var(--type-heading-1-size);line-height:var(--type-heading-1-leading);font-weight:800}
.entry-body p{color:var(--text-secondary);max-width:46ch}
.entry-sizes{display:flex;gap:var(--space-8);flex-wrap:wrap}
.entry-sizes .btn{min-width:120px}
.entry-sizes .btn b{font-weight:800}
.entry-note{display:flex;gap:var(--space-16);flex-wrap:wrap;font-size:var(--type-caption-size);color:var(--text-secondary)}
.entry-note span{display:inline-flex;gap:var(--space-4);align-items:center}
.section-title{font-size:var(--type-heading-2-size);line-height:var(--type-heading-2-leading);font-weight:800;margin:var(--space-48) 0 var(--space-16)}
.packs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--grid-gap-wide);padding-bottom:var(--space-64)}
.pk{border:1px solid var(--border-subtle);border-radius:var(--radius-lg);overflow:hidden;display:flex;flex-direction:column;background:var(--surface-raised);text-decoration:none}
.pk figure{margin:0;aspect-ratio:1;background:var(--surface-media);display:grid;place-items:center}
.pk figure img{width:72%;height:72%;object-fit:contain}
.pk.out figure img{opacity:var(--opacity-out-of-stock-media)}
.pk div{padding:var(--space-12) var(--space-16) var(--space-16);display:flex;flex-direction:column;gap:var(--space-4)}
.pk h3{font-size:var(--type-title-card-size);line-height:var(--type-title-card-leading);font-weight:700}
.pk small{color:var(--text-secondary);font-size:var(--type-caption-size)}
.pk .oos{font-size:var(--type-label-sm-size);font-weight:600;color:var(--text-secondary)}
.home-rail{display:grid;grid-template-columns:minmax(0,1.3fr) repeat(3,minmax(0,1fr));gap:var(--grid-gap-wide);padding-bottom:var(--space-64)}
.home-cta{border-radius:var(--radius-xl);background:var(--surface-subtle);padding:var(--space-32);display:flex;flex-direction:column;justify-content:space-between;gap:var(--space-24);min-height:100%}
.home-cta h3{font-size:var(--type-heading-2-size);line-height:var(--type-heading-2-leading);font-weight:800}
.home-cta p{color:var(--text-secondary)}
.home-cta .thumbs{display:flex}
.home-cta .thumbs img{width:56px;height:56px;border-radius:50%;object-fit:cover;border:2px solid var(--surface-subtle);margin-inline-start:-12px}
.home-cta .thumbs img:first-child{margin-inline-start:0}

/* ───────── builder layout ───────── */
.b-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--space-12) var(--space-24);padding-block:var(--space-16) var(--space-20)}
.b-head h1{font-size:var(--type-heading-1-size);line-height:var(--type-heading-1-leading);font-weight:800}
.b-head .sub{color:var(--text-secondary);font-size:var(--type-body-sm-size)}
.b-layout{display:grid;grid-template-columns:minmax(0,1fr) var(--cpb-summary);gap:var(--space-32);align-items:start;padding-bottom:var(--space-96)}
.b-main{min-width:0}
.edit-actions{display:flex;margin-bottom:var(--space-16)}

/* toolbar */
.tb{display:flex;flex-direction:column;gap:var(--space-12);padding-bottom:var(--space-16);border-bottom:1px solid var(--border-subtle);margin-bottom:var(--space-16)}
.tb-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-12)}
.tb-search{flex:1 1 320px;min-width:0;display:flex;align-items:center;gap:var(--space-8);min-height:var(--control-lg);padding-inline:var(--space-16) var(--space-4);border:1px solid var(--input-border);border-radius:var(--radius-md);background:var(--input-bg)}
.tb-search:focus-within{border-color:var(--input-border-focus);outline:var(--border-2) solid var(--focus-ring);outline-offset:3px}
.tb-search input{flex:1;min-width:0;height:46px;border:0;outline:0;background:none;font-size:var(--type-input-size)}
.tb-search input::placeholder{color:var(--text-tertiary);opacity:1}
.tb-search input::-webkit-search-cancel-button{display:none}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--control-md);height:var(--control-md);border:0;background:none;border-radius:var(--radius-md);cursor:pointer;flex:none;color:var(--text-primary)}
.icon-btn:hover{background:var(--action-ghost-hover)}
.tb-count{font-size:var(--type-body-sm-size);color:var(--text-secondary);display:flex;flex-wrap:wrap;gap:var(--space-8) var(--space-16);align-items:center;justify-content:space-between}
.tb-count b{color:var(--text-primary);font-weight:700}
.toggle-oos{display:inline-flex;align-items:center;gap:var(--space-8);min-height:44px;cursor:pointer;font-size:var(--type-body-sm-size);color:var(--text-secondary)}
.toggle-oos input{width:20px;height:20px;accent-color:var(--action-primary);margin:0}

/* product grid */
.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--grid-gap-wide);list-style:none;margin:0;padding:0}
.card{position:relative;display:flex;flex-direction:column;border:1px solid var(--border-subtle);border-radius:var(--radius-lg);background:var(--surface-raised);overflow:hidden;transition:border-color var(--duration-fast)}
.card:hover{border-color:var(--border-default)}
.card.sel{border:2px solid var(--border-strong);margin:-1px}
.card-media{position:relative;aspect-ratio:1;background:var(--surface-media);overflow:hidden}
.card-media img{width:100%;height:100%;object-fit:cover;transition:transform var(--duration-slow) var(--ease-emphasized)}
.card-media img.own{object-fit:contain;padding:10%}
.card:hover .card-media img{transform:scale(1.03)}
.card.off .card-media img{opacity:var(--opacity-out-of-stock-media)}
.card-flag{position:absolute;top:var(--space-8);inset-inline-start:var(--space-8);display:inline-flex;align-items:center;gap:var(--space-4);min-height:28px;padding:0 var(--space-8);border-radius:var(--radius-pill);background:var(--surface-inverse);color:var(--text-on-inverse);font-size:var(--type-caption-size);font-weight:700}
.card-flag.muted{background:var(--surface-raised);color:var(--text-primary);border:1px solid var(--border-default)}
.card-flag.warn{background:var(--warning-bg);color:var(--warning-fg)}
.card-body{display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-12) var(--space-12) 0;flex:1}
.card-meta{font-size:var(--type-micro-size);line-height:var(--type-micro-leading);color:var(--text-secondary);font-weight:500}
.card h3{font-size:var(--type-title-card-size);line-height:var(--type-title-card-leading);font-weight:700}
.card .lat{font-size:var(--type-caption-size);color:var(--text-tertiary);text-align:start;direction:ltr;unicode-bidi:plaintext;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.card .mood{font-size:var(--type-body-sm-size);line-height:var(--type-body-sm-leading);color:var(--text-secondary);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:var(--space-4)}
.card-act{padding:var(--space-12)}
.card-act .btn{width:100%;padding-inline:var(--space-12)}
.card-act .why{display:block;margin-top:var(--space-4);font-size:var(--type-micro-size);color:var(--text-secondary);text-align:center}
.empty{grid-column:1/-1;padding:var(--space-48) var(--space-24);text-align:center;border:1px dashed var(--border-default);border-radius:var(--radius-lg);display:flex;flex-direction:column;gap:var(--space-12);align-items:center}
.empty h3{font-size:var(--type-heading-3-size);font-weight:700}
.empty p{color:var(--text-secondary);max-width:44ch}

/* ───────── summary / tray ───────── */
.sum{position:sticky;top:calc(135px + var(--space-16));border:1px solid var(--border-subtle);border-radius:var(--radius-lg);background:var(--surface-raised);display:flex;flex-direction:column;max-height:calc(100vh - 135px - var(--space-32))}
.sum-head{padding:var(--space-20) var(--space-20) var(--space-12);display:flex;flex-direction:column;gap:var(--space-12);border-bottom:1px solid var(--border-subtle)}
.sum-title{display:flex;justify-content:space-between;align-items:baseline;gap:var(--space-8)}
.sum-title h2{font-size:var(--type-heading-3-size);line-height:var(--type-heading-3-leading);font-weight:700}
.sum-title output{font-size:var(--type-label-size);font-weight:700}
.prog{display:flex;gap:var(--space-4)}
.prog i{flex:1;height:4px;border-radius:var(--radius-pill);background:var(--border-default)}
.prog i.on{background:var(--action-primary)}
.prog i.bad{background:var(--warning-fg)}
.sum-body{overflow:auto;padding:var(--space-8) var(--space-20);overscroll-behavior:contain}
.slots{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.slot{display:flex;align-items:center;gap:var(--space-12);min-height:68px;padding-block:var(--space-8);border-bottom:1px solid var(--border-subtle)}
.slot:last-child{border-bottom:0}
.slot-n{flex:none;width:22px;font-size:var(--type-caption-size);color:var(--text-tertiary);text-align:center;font-weight:600}
.slot img{width:52px;height:52px;border-radius:var(--radius-sm);object-fit:cover;background:var(--surface-media);flex:none}
.slot img.own{object-fit:contain;padding:4px}
.slot-txt{flex:1;min-width:0;display:flex;flex-direction:column}
.slot-txt b{font-size:var(--type-body-sm-size);font-weight:600;line-height:1.6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.slot-txt small{font-size:var(--type-micro-size);color:var(--text-tertiary);direction:ltr;text-align:end;unicode-bidi:plaintext;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.slot-txt .warn{color:var(--warning-fg);font-size:var(--type-micro-size);font-weight:600;direction:rtl;display:flex;gap:4px;align-items:center}
.slot.empty-slot .ph{width:52px;height:52px;border-radius:var(--radius-sm);border:1px dashed var(--border-control);display:grid;place-items:center;color:var(--text-tertiary);flex:none}
.slot.empty-slot .slot-txt b{font-weight:500;color:var(--text-tertiary)}
.slot.stale{background:var(--warning-bg);margin-inline:calc(-1*var(--space-8));padding-inline:var(--space-8);border-radius:var(--radius-sm)}
.sum-foot{padding:var(--space-16) var(--space-20) var(--space-20);border-top:1px solid var(--border-subtle);display:flex;flex-direction:column;gap:var(--space-12)}
.kv{display:flex;justify-content:space-between;align-items:baseline;gap:var(--space-8);font-size:var(--type-body-sm-size)}
.kv dt{color:var(--text-secondary)}
.kv dd{margin:0;font-weight:600}
dl{margin:0}
.kv.total dd{font-size:var(--type-price-size);font-weight:800}
.hint{font-size:var(--type-caption-size);line-height:var(--type-caption-leading);color:var(--text-secondary)}
.full-note{display:flex;gap:var(--space-8);align-items:flex-start}

/* ───────── mobile bar + sheet ───────── */
.mbar{display:none}
.scrim{position:fixed;inset:0;background:var(--scrim);z-index:var(--z-overlay);animation:fade var(--duration-base) var(--ease-standard)}
@keyframes fade{from{opacity:0}}
.sheet{position:fixed;z-index:var(--z-modal);inset-inline:0;bottom:0;margin-inline:auto;max-width:640px;max-height:90dvh;display:flex;flex-direction:column;background:var(--surface-raised);border-radius:var(--radius-xl) var(--radius-xl) 0 0;box-shadow:var(--shadow-sheet);animation:up var(--duration-base) var(--ease-emphasized);outline:0}
@keyframes up{from{transform:translateY(40px);opacity:.4}}
.sheet-grab{width:40px;height:4px;border-radius:var(--radius-pill);background:var(--border-default);margin:var(--space-8) auto 0}
.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-8);min-height:56px;padding:0 var(--space-16) 0 var(--space-8)}
.sheet-head h2{font-size:var(--type-heading-3-size);font-weight:700}
.sheet-body{overflow:auto;overscroll-behavior:contain;padding:0 var(--space-16) var(--space-16);display:flex;flex-direction:column;gap:var(--space-16)}
.sheet-foot{padding:var(--space-12) var(--space-16) calc(var(--space-12) + env(safe-area-inset-bottom));border-top:1px solid var(--border-subtle);display:flex;flex-direction:column;gap:var(--space-8)}
.dialog{position:fixed;z-index:var(--z-modal);top:50%;left:50%;transform:translate(-50%,-50%);width:min(520px,calc(100vw - 32px));max-height:min(88dvh,720px);display:flex;flex-direction:column;background:var(--surface-raised);border-radius:var(--radius-xl);box-shadow:var(--shadow-overlay);outline:0;animation:fade var(--duration-base)}
.dialog .sheet-head{padding:var(--space-8) var(--space-20) 0 var(--space-12);min-height:64px}
.dialog .sheet-body{padding:0 var(--space-20) var(--space-16)}
.dialog .sheet-foot{padding:var(--space-16) var(--space-20) var(--space-20);flex-direction:row-reverse;flex-wrap:wrap;justify-content:flex-start}
.dialog .sheet-foot .btn{flex:1 1 180px}
.pick{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--space-8)}
.pick label{display:flex;align-items:center;gap:var(--space-12);min-height:64px;padding:var(--space-8) var(--space-12);border:1px solid var(--border-default);border-radius:var(--radius-md);cursor:pointer}
.pick label:has(input:checked){border:2px solid var(--border-strong);padding:calc(var(--space-8) - 1px) calc(var(--space-12) - 1px)}
.pick input{width:20px;height:20px;accent-color:var(--action-primary);margin:0;flex:none}
.pick img{width:44px;height:44px;border-radius:var(--radius-sm);object-fit:cover;background:var(--surface-media);flex:none}
.pick img.own{object-fit:contain;padding:3px}
.pick span{display:flex;flex-direction:column;min-width:0}
.pick b{font-size:var(--type-body-sm-size);font-weight:600}
.pick small{font-size:var(--type-micro-size);color:var(--text-tertiary);direction:ltr;text-align:end;unicode-bidi:plaintext}

/* ───────── purity ───────── */
.pur{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-12);border:0;padding:0;margin:0}
.pur legend{font-size:var(--type-heading-2-size);line-height:var(--type-heading-2-leading);font-weight:800;padding:0;margin-bottom:var(--space-4)}

.pur label{position:relative;display:flex;flex-direction:column;gap:var(--space-4);min-height:132px;padding:var(--space-16);border:1px solid var(--size-tile-border);border-radius:var(--radius-md);cursor:pointer;background:var(--surface-raised)}
.pur label:has(input:checked){border:2px solid var(--size-tile-border-selected);padding:calc(var(--space-16) - 1px)}
.pur label:has(input:focus-visible){outline:var(--border-2) solid var(--focus-ring);outline-offset:3px}
.pur input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.pur .pct{font-size:var(--type-heading-1-size);line-height:1.3;font-weight:800}
.pur .lbl{font-size:var(--type-label-size);font-weight:600}
.pur .dsc{font-size:var(--type-caption-size);color:var(--text-secondary)}
.pur .rec{position:absolute;top:var(--space-12);inset-inline-end:var(--space-12);font-size:var(--type-micro-size);font-weight:700;border-radius:var(--radius-pill);padding:0 var(--space-8);background:var(--surface-inverse);color:var(--text-on-inverse);line-height:22px}
.pur .chk{position:absolute;bottom:var(--space-12);inset-inline-end:var(--space-12);display:none}
.pur label:has(input:checked) .chk{display:block}
.pur .lim{font-size:var(--type-micro-size);font-weight:600;color:var(--warning-fg);display:flex;gap:4px;align-items:center;margin-top:auto}
.panel{border:1px solid var(--border-subtle);border-radius:var(--radius-lg);padding:var(--space-24);display:flex;flex-direction:column;gap:var(--space-16)}
.panel h2{font-size:var(--type-heading-3-size);line-height:var(--type-heading-3-leading);font-weight:700}
.flow{display:flex;flex-direction:column;gap:var(--space-24)}
.navrow{display:flex;justify-content:space-between;gap:var(--space-12);flex-wrap:wrap}

/* ───────── review ───────── */
.rv-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:var(--grid-gap-wide)}
.rv-list li{display:flex;flex-direction:column;gap:var(--space-8)}
.rv-list figure{margin:0;aspect-ratio:1;border-radius:var(--radius-lg);overflow:hidden;background:var(--surface-media);position:relative}
.rv-list figure img{width:100%;height:100%;object-fit:cover}
.rv-list figure img.own{object-fit:contain;padding:10%}
.rv-list figure span{position:absolute;bottom:var(--space-8);inset-inline-start:var(--space-8);background:var(--surface-raised);border-radius:var(--radius-pill);padding:0 var(--space-8);font-size:var(--type-micro-size);font-weight:700;line-height:24px}
.rv-list b{font-size:var(--type-body-sm-size);font-weight:700}
.rv-list small{font-size:var(--type-micro-size);color:var(--text-tertiary);direction:ltr;text-align:end;unicode-bidi:plaintext}
.qty-fixed{display:flex;align-items:center;justify-content:space-between;gap:var(--space-8);font-size:var(--type-body-sm-size)}
.stepper{display:inline-flex;align-items:center;border:1px solid var(--border-control);border-radius:var(--radius-md);height:var(--control-lg)}
.stepper button{width:var(--control-lg);height:100%;border:0;background:none;display:grid;place-items:center;cursor:pointer;border-radius:var(--radius-md)}
.stepper button:hover:not(:disabled){background:var(--action-ghost-hover)}
.stepper button:disabled{color:var(--text-disabled);cursor:not-allowed}
.stepper output{min-width:36px;text-align:center;font-weight:700}

/* ───────── cart ───────── */
.cart-steps{display:flex;justify-content:center;margin:var(--space-16) 0 var(--space-24)}
.cart-head{display:flex;justify-content:space-between;align-items:center;gap:var(--space-12);margin-bottom:var(--space-16)}
.cart-head h1{font-size:var(--type-heading-1-size);font-weight:800;line-height:var(--type-heading-1-leading)}
.cart-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:var(--space-32);align-items:start;padding-bottom:var(--space-96)}
.cline{display:grid;grid-template-columns:120px minmax(0,1fr) auto;gap:var(--space-16) var(--space-20);padding:var(--space-20);border:1px solid var(--border-subtle);border-radius:var(--radius-lg)}
.cline+.cline{margin-top:var(--space-12)}
.mosaic{display:grid;gap:3px;width:120px;height:120px;border-radius:var(--radius-md);overflow:hidden;background:var(--surface-raised)}
.mosaic.n3{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.mosaic.n3 img:first-child{grid-row:span 2}
.mosaic.n4{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}
.mosaic.n5{grid-template-columns:repeat(6,1fr);grid-template-rows:1fr 1fr}.mosaic.n5 img{grid-column:span 2}.mosaic.n5 img:nth-child(-n+2){grid-column:span 3}
.mosaic img{width:100%;height:100%;object-fit:cover;background:var(--surface-media)}
.mosaic img.own{object-fit:contain}
.cline-info{display:flex;flex-direction:column;gap:var(--space-4);min-width:0}
.cline-info h2{font-size:var(--type-title-card-size);font-weight:700;line-height:var(--type-title-card-leading)}
.cline-info p{font-size:var(--type-body-sm-size);color:var(--text-secondary)}
.cline-mem{list-style:none;margin:var(--space-4) 0 0;padding:0;display:flex;flex-wrap:wrap;gap:var(--space-4)}
.cline-mem li{font-size:var(--type-caption-size);border:1px solid var(--border-subtle);border-radius:var(--radius-pill);padding:0 var(--space-8);line-height:24px}
.cline-in{display:inline-flex;gap:4px;align-items:center;font-size:var(--type-caption-size);color:var(--text-secondary)}
.cline-ctl{grid-column:2/3;display:flex;flex-wrap:wrap;gap:var(--space-8);align-items:center}
.cline-price{grid-row:1;grid-column:3;text-align:end;display:flex;flex-direction:column;gap:var(--space-4);align-items:flex-end}
.osum{position:sticky;top:calc(135px + var(--space-16));border:1px solid var(--border-subtle);border-radius:var(--radius-lg);padding:var(--space-20);display:flex;flex-direction:column;gap:var(--space-12)}
.osum h2{font-size:var(--type-heading-3-size);font-weight:700}
.cart-empty{padding:var(--space-64) var(--space-24);text-align:center;display:flex;flex-direction:column;align-items:center;gap:var(--space-16)}

/* toasts */
.toast-wrap{position:fixed;z-index:var(--z-toast);bottom:var(--space-24);inset-inline:0;display:flex;flex-direction:column;align-items:center;gap:var(--space-8);pointer-events:none;padding-inline:var(--space-16)}
.toast{pointer-events:auto;display:flex;align-items:center;gap:var(--space-12);max-width:520px;background:var(--surface-inverse);color:var(--text-on-inverse);border-radius:var(--radius-md);padding:var(--space-12) var(--space-16);box-shadow:var(--shadow-overlay);font-size:var(--type-body-sm-size);animation:up var(--duration-base) var(--ease-emphasized)}
.toast button{background:none;border:0;color:inherit;font-weight:700;text-decoration:underline;min-height:44px;cursor:pointer;padding:0 var(--space-4)}

/* prototype-only state switcher (not product UI) */
.proto-btn{position:fixed;z-index:var(--z-dropdown);right:var(--space-16);bottom:var(--space-16);min-height:44px;padding:0 var(--space-12);border:1px dashed var(--border-control);background:var(--surface-raised);border-radius:var(--radius-md);font-size:var(--type-caption-size);font-weight:600;color:var(--text-secondary);cursor:pointer;box-shadow:var(--shadow-popover)}
.proto-panel fieldset{border:1px solid var(--border-subtle);border-radius:var(--radius-md);padding:var(--space-12);margin:0;display:flex;flex-direction:column;gap:var(--space-4)}
.proto-panel legend{font-weight:700;font-size:var(--type-label-sm-size);padding:0 var(--space-4)}
.proto-panel label{display:flex;gap:var(--space-8);align-items:center;min-height:40px;font-size:var(--type-body-sm-size);cursor:pointer}
.proto-panel input{accent-color:var(--action-primary);width:18px;height:18px;margin:0}

/* ───────── medium ───────── */
@media(max-width:1180px){
  body[data-commerce="true"]{--cpb-summary:320px}
  .grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .packs{grid-template-columns:repeat(3,minmax(0,1fr))}
  .home-rail{grid-template-columns:minmax(0,1.4fr) repeat(2,minmax(0,1fr))}.home-rail>.pk:nth-child(4){display:none}
  .entry-body{padding:var(--space-32)}
  .cart-layout{grid-template-columns:minmax(0,1fr) 320px}
  .pur .pct{font-size:var(--type-heading-2-size)}
}
@media(max-width:960px) and (min-width:901px){
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* ───────── compact (mobile) ───────── */
@media(max-width:900px){
  html{scroll-padding-top:72px}
  .frame{padding-inline:var(--gutter-compact)}
  .hdr{position:sticky;border-bottom:1px solid var(--border-subtle)}
  .hdr-main{display:flex;justify-content:space-between;align-items:center;gap:var(--space-8);height:calc(var(--header-compact) + env(safe-area-inset-top));padding:env(safe-area-inset-top) var(--space-16) 0}
  .hdr-brand img{height:42px}
  .hdr-search,.hdr-nav,.hdr-account span,.hdr-orders{display:none}
  .hdr-tools{gap:0}
  .hdr-mtool{display:inline-flex!important}
  .hdr-tools>a,.hdr-tools>button{width:var(--control-md);min-width:var(--control-md)}
  .hdr-account{padding:0!important;border:0!important}
  body.focused .hdr-main{display:none}
  body.focused .hdr-focus{display:grid;grid-template-columns:44px 1fr 54px;align-items:center;height:calc(56px + env(safe-area-inset-top));padding:env(safe-area-inset-top) var(--space-16) 0;text-align:center;font-size:var(--type-title-card-size)}
  body.focused .hdr-focus a{display:grid;place-items:center;min-height:44px}
  body.focused .hdr-focus img{height:34px;width:auto}
  .crumbs{display:none}
  .page-head{padding-block:var(--space-16)}
  .entry{grid-template-columns:1fr;border-radius:var(--radius-lg)}
  .entry-media{grid-template-columns:repeat(5,1fr);padding:var(--space-16) var(--space-16) var(--space-24);gap:var(--space-4)}
  .entry-media figure{border-radius:var(--radius-sm)}
  .entry-media figure:nth-child(even){transform:translateY(8px)}
  .entry-body{padding:var(--space-20) var(--space-16) var(--space-24);gap:var(--space-12)}
  .entry-sizes{display:grid;grid-template-columns:repeat(3,1fr)}
  .entry-sizes .btn{min-width:0;padding-inline:var(--space-8)}
  .section-title{margin-top:var(--space-40)}
  .packs{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--grid-gap-compact)}
  .home-rail{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:var(--grid-gap-compact);margin-inline:calc(-1*var(--gutter-compact));padding-inline:var(--gutter-compact);scrollbar-width:none}
  .home-rail>*{flex:0 0 66%;scroll-snap-align:start}.home-rail>.home-cta{flex-basis:84%}.home-rail>.pk:nth-child(4){display:flex}

  .b-head{padding-block:var(--space-12) var(--space-8);gap:var(--space-8)}
  .b-head .steps-wrap{width:100%}
  .b-head .sub{display:none}
  .b-layout{display:block;padding-bottom:calc(var(--purchase-bar) + var(--space-48) + env(safe-area-inset-bottom))}
  .b-layout>.sum{display:none}
  .size-row{display:flex;align-items:center;justify-content:space-between;gap:var(--space-8);width:100%}
  .size-row .lbl{font-size:var(--type-label-sm-size);font-weight:600}
  .seg.size span{min-width:52px}
  .tb{margin-inline:calc(-1*var(--gutter-compact));padding:var(--space-8) var(--gutter-compact) var(--space-8);gap:var(--space-8)}
  .tb-row.filters{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-inline:calc(-1*var(--gutter-compact));padding-inline:var(--gutter-compact)}
  .tb-row.filters::-webkit-scrollbar{display:none}
  .tb-row.filters .seg,.tb-row.filters .chips{flex:none;flex-wrap:nowrap}
  .tb-search{flex-basis:100%}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--grid-gap-compact)}
  .card-body{padding:var(--space-8) var(--space-8) 0}
  .card .mood{-webkit-line-clamp:2;font-size:var(--type-caption-size);line-height:var(--type-caption-leading)}
  .card-act{padding:var(--space-8)}
  .card-flag{top:var(--space-4);inset-inline-start:var(--space-4);min-height:24px;font-size:var(--type-micro-size)}
  .mbar{display:flex;position:fixed;z-index:var(--z-purchase-bar);inset-inline:0;bottom:0;background:var(--surface-raised);box-shadow:var(--shadow-sheet);padding:var(--space-12) var(--space-16) calc(var(--space-12) + env(safe-area-inset-bottom));gap:var(--space-12);align-items:center;border-radius:var(--radius-lg) var(--radius-lg) 0 0}
  .mbar-open{flex:1;min-width:0;display:flex;align-items:center;gap:var(--space-8);min-height:var(--control-lg);background:none;border:0;padding:0;cursor:pointer;text-align:start}
  .mbar-dots{display:flex;flex:none}
  .mbar-dots i{width:30px;height:30px;border-radius:50%;border:2px solid var(--surface-raised);margin-inline-start:-10px;background:var(--surface-media);overflow:hidden;display:grid;place-items:center}
  .mbar-dots i:first-child{margin-inline-start:0}
  .mbar-dots i.e{border:1.5px dashed var(--border-control);background:var(--surface-raised)}
  .mbar-dots i.w{box-shadow:0 0 0 2px var(--warning-fg)}
  .mbar-dots img{width:100%;height:100%;object-fit:cover}
  .mbar-dots img.own{object-fit:contain}
  .mbar-txt{display:flex;flex-direction:column;min-width:0;line-height:1.5}
  .mbar-txt b{font-size:var(--type-label-size);font-weight:700;display:flex;align-items:center;gap:2px}
  .mbar-txt small{font-size:var(--type-micro-size);color:var(--text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mbar .btn{flex:none;min-height:var(--control-lg);padding-inline:var(--space-16)}
  .proto-btn{bottom:calc(var(--purchase-bar) + var(--space-12) + env(safe-area-inset-bottom));right:var(--space-8);min-height:36px;opacity:.92}
  .toast-wrap{bottom:auto;top:calc(var(--header-compact) + var(--space-8))}
  .pur{grid-template-columns:1fr;gap:var(--space-8)}
  .pur label{min-height:0;display:grid;grid-template-columns:64px 1fr;column-gap:var(--space-12);row-gap:2px;align-items:center;justify-items:start;padding:var(--space-12) var(--space-16);padding-inline-end:48px}
  .pur label:has(input:checked){padding:calc(var(--space-12) - 1px) calc(var(--space-16) - 1px);padding-inline-end:47px}
  .pur .pct{grid-column:1;grid-row:1/span 4;font-size:var(--type-heading-2-size)}
  .pur .lbl,.pur .dsc,.pur .lim,.pur .rec{grid-column:2}
  .pur .rec{position:static;grid-row:1;justify-self:end;margin-inline-end:-36px}
  .pur .lbl{grid-row:1}
  .flow-cta .tot small{white-space:nowrap}
  .pur .chk{bottom:auto;top:50%;transform:translateY(-50%)}
  .panel{padding:var(--space-16);border-radius:var(--radius-lg)}
  .rv-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-8)}
  .rv-list b{font-size:var(--type-caption-size)}
  .flow{gap:var(--space-16)}
  .flow-cta{position:fixed;z-index:var(--z-purchase-bar);inset-inline:0;bottom:0;background:var(--surface-raised);box-shadow:var(--shadow-sheet);padding:var(--space-12) var(--space-16) calc(var(--space-12) + env(safe-area-inset-bottom));display:flex;align-items:center;gap:var(--space-12);border-radius:var(--radius-lg) var(--radius-lg) 0 0}
  .flow-cta .btn{flex:1}
  .flow-cta .tot{display:flex;flex-direction:column;line-height:1.4;min-width:0}
  .flow-cta .tot small{font-size:var(--type-micro-size);color:var(--text-secondary)}
  .flow-cta .tot b{font-size:var(--type-price-size);font-weight:800;white-space:nowrap}
  .desk-only{display:none!important}
  .cart-layout{display:flex;flex-direction:column;gap:var(--space-16)}
  .cart-steps{margin-block:var(--space-12) var(--space-16)}
  .cart-head h1{font-size:var(--type-heading-2-size)}
  .cline{grid-template-columns:88px minmax(0,1fr);padding:var(--space-12);gap:var(--space-12)}
  .mosaic{width:88px;height:88px}
  .cline-price{grid-column:1/-1;grid-row:auto;flex-direction:row;justify-content:space-between;align-items:center;border-top:1px solid var(--border-subtle);padding-top:var(--space-12)}
  .cline-ctl{grid-column:1/-1}
  .osum{position:static}
  .dialog{top:auto;bottom:0;left:0;transform:none;width:100%;max-height:90dvh;border-radius:var(--radius-xl) var(--radius-xl) 0 0;animation:up var(--duration-base) var(--ease-emphasized)}
  .dialog .sheet-foot{padding-bottom:calc(var(--space-16) + env(safe-area-inset-bottom))}
}
@media(min-width:901px){.mob-only{display:none!important}}
/* narrow */
@media(max-width:359px){
  .frame{padding-inline:var(--space-12)}
  .hdr-main{padding-inline:var(--space-12)}
  .hdr-brand img{height:34px}
  .grid{gap:var(--space-8)}
  .card h3{font-size:var(--type-body-sm-size)}
  .card .mood{display:none}
  .card-act .btn{font-size:var(--type-label-sm-size);padding-inline:var(--space-8);gap:var(--space-4)}
  .card-act .btn .i{width:18px;height:18px}
  .seg.size span{min-width:44px;padding-inline:var(--space-8)}
  .size-row .lbl{display:none}
  .mbar{gap:var(--space-8);padding-inline:var(--space-12)}
  .mbar-dots i{width:26px;height:26px;margin-inline-start:-12px}
  .mbar .btn .i{display:none}
  .mbar .btn{padding-inline:var(--space-12)}
  .rv-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .entry-sizes .btn{font-size:var(--type-label-sm-size)}
  .tb-row.filters,.tb{margin-inline:calc(-1*var(--space-12));padding-inline:var(--space-12)}
  .flow-cta .tot b{font-size:15px}
  .flow-cta .btn .i{display:none}
  .flow-cta .btn{padding-inline:var(--space-12)}
  .packs{grid-template-columns:1fr 1fr;gap:var(--space-8)}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* Integrates the local Claude journey with the current retail shell. */
.preview-note{font-size:var(--type-body-sm-size);color:var(--text-secondary);line-height:1.8;margin-block:var(--space-16)}
.link{min-height:44px}

.hdr-collections .hdr-build-pack{font-weight:700;color:var(--text-primary);background:var(--surface-subtle);border-radius:var(--radius-md);height:var(--control-md);margin-block:auto}
.hdr-collections{overflow-x:auto;scrollbar-width:none}

.hdr-collections .hdr-build-pack:hover{background:var(--action-ghost-hover)}
