/* MayFaire configuration: shared kit styles and public theme/layout tokens. */
:root[data-theme=light]{--canvas:#f5f0e7;--surface:#fffaf2;--subtle:#f1e9dd;--hover:#eae0d1;--text:#33241b;--muted:#776557;--line:#dacebc;--accent:#a95024;--on-accent:#fff8ee;--inventory-width:25%;--story-width:36%;--carousel-height:36%;--banner-height:112px;--dock-gutter:12px;--dock-clearance:24px;--dock-inset:12px;--control-height:32px;--control-font:12px;--workspace-top:72px}
[data-mayfaire-shop]{height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.shop-header,.shop-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:var(--space-3);padding:var(--space-3) var(--space-4)}
.shop-header{border-bottom:1px solid var(--line);padding-block:var(--space-2)}
.wordmark{font:var(--font-xl) Georgia,serif;text-decoration:none;color:var(--text)}
.wordmark,.sister-shop{display:flex;align-items:center;gap:var(--space-3)}
.shop-header img{width:56px;height:56px;object-fit:contain;flex-shrink:0}
.sister-shop{font-size:var(--font-sm);text-decoration:none}
.sister-shop span{max-width:18ch}
.wordmark em{color:var(--accent);margin-left:var(--space-2)}
.shop-workspace{container-type:size;position:relative;min-height:0;overflow:clip}
#fire-inventory:not([layout=stack]){left:calc(100% - var(--inventory-width))!important;top:var(--space-3)!important;--w:calc(var(--inventory-width) - 2 * var(--space-3));--h:calc(100% - 2 * var(--space-3))}
#fire-carousel:not([layout=stack]){left:var(--space-3)!important;top:var(--space-3)!important;--w:calc(var(--story-width) - 2 * var(--space-3));--h:calc(var(--carousel-height) - var(--space-3))}
#fire-viewer:not([layout=stack]){left:var(--space-3)!important;top:calc(var(--carousel-height) + var(--space-3))!important;--w:calc(var(--story-width) - 2 * var(--space-3));--h:calc(100% - var(--carousel-height) - 2 * var(--space-3))}
#fire-piece,#fire-magic{--piece-size:min(calc(39cqw - 3 * var(--space-3)),calc(100cqh - var(--banner-height) - 3 * var(--space-3)))}
#fire-piece:not([layout=stack]){left:var(--story-width)!important;top:var(--space-3)!important;--w:var(--piece-size);height:auto;aspect-ratio:1}
#fire-magic:not([layout=stack]){left:var(--story-width)!important;top:calc(var(--piece-size) + 2 * var(--space-3))!important;--w:var(--piece-size);--h:var(--banner-height)}
.magic-banner{height:100%;display:flex;align-items:center;justify-content:center;gap:var(--space-3);padding:var(--space-3)}
.magic-banner img{object-fit:contain;flex-shrink:0}
.magic-banner h2{font:var(--font-xl) Georgia,serif;color:var(--accent);margin:0}
.section-content,.inventory-content,.cart-content{padding:var(--space-4)}
#fire-viewer::part(body){overflow:hidden}
[data-story-view],[data-story-view]>[data-ui=box],[data-story-view] [role=tabpanel],[data-story-pages]{height:100%;min-height:0}
[data-story-view] [role=tabpanel]{padding:0}
[data-story-viewport]{flex:1;min-height:0;overflow:clip}
[data-story-columns]{height:100%;column-count:1;column-fill:auto;column-gap:var(--space-4)}
[data-story-columns]>*{display:block;margin:0 0 var(--space-2)}
[data-story-columns]>[data-ui=heading]{break-after:avoid}
[data-story-footer]{flex-shrink:0;align-items:center}
[data-story-footer] nav{justify-content:center}
[data-ui=tabs]{flex-wrap:wrap;gap:var(--space-2)}
:is([data-story-view],[data-viewer]) [data-ui=body]{font-size:14px;line-height:1.7;max-width:70ch}
:is([data-story-view],[data-viewer]) [data-ui=heading]{font:var(--font-xl)/1.25 Georgia,serif;color:var(--accent)}
[data-ui=image]{display:block}
[data-ui=image] img{display:block;width:100%;height:auto;max-height:45dvh;object-fit:contain}
[data-carousel]{height:100%}
[data-carousel]>[data-ui=stack]{height:100%}
[data-carousel-image]{flex:1;min-height:0;padding:0;border:0;background:transparent;width:100%}
[data-carousel-image] [data-ui=image],[data-carousel-image] img{height:100%;object-fit:contain}
[data-carousel] nav,[data-carousel] [data-ui=body]{flex-shrink:0}
[data-carousel] [data-ui=body]{text-align:center}
[data-carousel] nav{justify-content:center}
.piece-copy{white-space:pre-line;font-size:14px;line-height:1.7}
.piece-photo-link{display:block;width:100%;padding:0;border:0;background:transparent;cursor:pointer}
.piece-photo-link:hover{background:transparent}
.piece-gallery nav{justify-content:center}
.inventory-heading h2,.cart-heading h2{font:var(--font-xl) Georgia,serif}
.cart-heading,.cart-subtotal{display:flex;justify-content:space-between;gap:var(--space-3)}
.cart-list{list-style:none;padding:0}
.cart-row{display:grid;grid-template-columns:64px minmax(0,1fr);gap:var(--space-3);border-bottom:1px solid var(--line);padding:var(--space-3) 0}
.cart-row h3{font-size:var(--font-md);margin:0}
.cart-row [data-ui=image] img{max-height:90px}
.quiet,.kicker,.shop-footer{color:var(--muted);font-size:var(--font-sm)}
.software-note{border-top:1px solid var(--line);margin-top:var(--space-4);padding-top:var(--space-3)}
.shop-footer{border-top:1px solid var(--line)}
#fire-cart{--flyout-width:min(430px,calc(100vw - 48px));--flyout-height:calc(100% - 24px);z-index:100}
.checkout-link{display:block;margin:var(--space-3) 0;padding:var(--space-3);background:var(--accent);color:var(--on-accent)}
@media(max-width:759px){
 .shop-workspace{container-type:inline-size;overflow:auto}
 #fire-inventory[layout=stack]{--h:320px}
 #fire-magic[layout=stack]{--h:var(--banner-height)}
 #fire-carousel[layout=stack]{--h:300px}
 #fire-piece[layout=stack]{--h:calc(100dvh - 150px);min-height:480px}
 #fire-viewer[layout=stack]{--h:calc(100dvh - 150px);min-height:480px}
 .shop-header,.shop-footer{padding:var(--space-2) var(--space-3)}
 .shop-header{--space-3:8px}
 .shop-header img{width:40px;height:40px}
 .wordmark{font-size:var(--font-lg)}
 .sister-shop span{max-width:12ch}
 :root[data-theme=light]{--workspace-top:56px}
}
