/* HANABI interaction layer. Independent translate/scale leave layout/reveal transforms intact. */
.control-inline{display:inline-block}
.hanabi-control{transform-origin:center;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.hanabi-control.control-arriving:not(.is-pressed):not(.is-bouncing){animation:hanabi-control-enter .56s cubic-bezier(.16,1,.3,1) both;animation-delay:var(--control-delay,0ms)}
.hanabi-control.is-pressed{animation:none!important;translate:0 4px!important;scale:.968!important;filter:brightness(.94);box-shadow:0 1px 0 #4e192923,inset 0 2px 4px #4e192912!important;will-change:translate,scale}
.button.is-pressed,.purchase-button.is-pressed,.mobile-bottom>a.is-pressed{box-shadow:0 1px 0 #4e1929,inset 0 2px 5px #35071945!important}
.hanabi-control.is-bouncing{animation:hanabi-spring .46s cubic-bezier(.2,.8,.3,1)!important;will-change:translate,scale}
.save-button[aria-pressed=true] svg,.modal-save-button[aria-pressed=true] svg{fill:currentColor}
.just-saved svg{animation:hanabi-heart-bloom .66s cubic-bezier(.2,.8,.3,1)}
.sound-button.is-muted,.haptic-button.is-muted,#haptic-toggle.is-muted{opacity:.56}
#haptic-toggle[data-haptic-supported=false]{cursor:pointer}
.sweets-wiggle{animation:hanabi-pudding-wiggle .74s cubic-bezier(.25,.8,.3,1)!important;transform-origin:50% 80%}
.sweets-pudding-open{animation:hanabi-pudding-open .92s cubic-bezier(.2,.75,.3,1)!important;transform-origin:50% 78%}
.sweets-cake-open{animation:hanabi-cake-open .82s cubic-bezier(.16,1,.3,1)!important;transform-origin:50% 70%}
dialog[open].is-closing{animation:hanabi-dialog-close .145s ease-in both!important;pointer-events:none}
dialog[open].is-closing::backdrop{animation:hanabi-backdrop-close .145s ease-in both}
.saved-item.is-removing{animation:hanabi-saved-remove .145s ease-in both;pointer-events:none}
#mobile-nav{overscroll-behavior:contain;overflow-y:auto}
.hanabi-burst{width:0;height:0;z-index:200;pointer-events:none;overflow:visible;isolation:isolate}
.hanabi-petal{position:absolute;display:block;width:var(--petal-size,7px);height:calc(var(--petal-size,7px) * 1.35);left:-3px;top:-4px;border-radius:80% 20% 70% 30%;background:#aa596e;box-shadow:inset 1px 1px 1px #fff3db88;animation:hanabi-petal-flight .72s cubic-bezier(.16,.65,.3,1) both;animation-delay:var(--petal-delay,0ms)}
.hanabi-petal:nth-child(3n+1){background:#d194a0}
.hanabi-petal:nth-child(3n+2){background:#e8baa7}
.hanabi-burst.is-complete .hanabi-petal{animation-duration:1.1s}
.hanabi-petal.is-sparkle{background:#d2a259;border-radius:1px;height:var(--petal-size,7px);box-shadow:0 0 7px #d2a25955}
.hanabi-bloom-core{display:block;position:absolute;width:22px;height:22px;left:-11px;top:-11px;border:1px solid #bc82927a;border-radius:50%;animation:hanabi-bloom-ring .58s ease-out both}
.hanabi-burst.is-complete .hanabi-bloom-core{width:64px;height:64px;left:-32px;top:-32px;border-color:#c49a6655;animation-duration:.9s}

@keyframes hanabi-control-enter{0%{opacity:.36;translate:0 8px;scale:.972}65%{opacity:1;translate:0 -1px;scale:1.004}100%{opacity:1;translate:0 0;scale:1}}
@keyframes hanabi-spring{0%{translate:0 4px;scale:.968;filter:brightness(.95)}43%{translate:0 -3px;scale:1.023;filter:brightness(1.035)}70%{translate:0 1px;scale:.994}100%{translate:0 0;scale:1;filter:brightness(1)}}
@keyframes hanabi-heart-bloom{0%{scale:.8;rotate:-8deg}43%{scale:1.3;rotate:8deg}68%{scale:.96;rotate:-3deg}100%{scale:1;rotate:0deg}}
@keyframes hanabi-pudding-wiggle{0%,100%{rotate:0deg;scale:1}18%{rotate:-3deg;scale:1.025 .97}36%{rotate:2.8deg;scale:.98 1.024}57%{rotate:-1.9deg;scale:1.018 .99}77%{rotate:.8deg;scale:.995 1.008}}
@keyframes hanabi-pudding-open{0%{opacity:0;scale:.9 .94;rotate:-3deg}25%{opacity:1;scale:1.03 .96;rotate:3deg}45%{scale:.982 1.02;rotate:-2.3deg}67%{scale:1.013 .99;rotate:1.2deg}84%{scale:.997 1.005;rotate:-.6deg}100%{opacity:1;scale:1;rotate:0deg}}
@keyframes hanabi-cake-open{0%{opacity:0;scale:.88;rotate:-2deg;filter:brightness(1.13)}64%{opacity:1;scale:1.014;rotate:.3deg;filter:brightness(1.02)}100%{opacity:1;scale:1;rotate:0deg;filter:brightness(1)}}
@keyframes hanabi-dialog-close{from{opacity:1;scale:1}to{opacity:0;scale:.98;translate:0 7px}}
@keyframes hanabi-backdrop-close{from{opacity:1}to{opacity:0}}
@keyframes hanabi-saved-remove{from{opacity:1;translate:0 0}to{opacity:0;translate:10px 0}}
@keyframes hanabi-petal-flight{0%{opacity:0;translate:0 0;scale:.2;rotate:0deg}12%{opacity:1;scale:1}72%{opacity:.88}100%{opacity:0;translate:var(--petal-x) var(--petal-y);scale:.4;rotate:var(--petal-turn)}}
@keyframes hanabi-bloom-ring{0%{opacity:.8;scale:.5}100%{opacity:0;scale:2.5}}

@media(prefers-reduced-motion:reduce){
  .hanabi-control,.hanabi-control.control-arriving,.hanabi-control.is-bouncing,.just-saved svg,.sweets-wiggle,.sweets-pudding-open,.sweets-cake-open,dialog[open].is-closing,.saved-item.is-removing{animation:none!important;translate:none!important;scale:1!important;rotate:none!important}
  .hanabi-control.is-pressed{translate:0 1px!important;scale:1!important;filter:brightness(.97)}
  .hanabi-burst{display:none!important}
}

/* Product facts and checkout stay readable while the detail content scrolls. */
.product-dialog[open]{display:flex;flex-direction:column;width:min(1040px,calc(100% - 36px));max-height:92dvh;overflow:hidden;border-radius:10px}
#product-dialog-body{display:flex;flex-direction:column;min-height:0;max-height:92dvh;width:100%}
.product-detail-scroll{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;outline-offset:-3px}
.product-detail-layout{grid-template-columns:minmax(0,.94fr) minmax(0,1.06fr);align-items:start;min-height:0}
.product-detail-visual{position:sticky;top:0;min-width:0;padding:28px 20px 22px;background:radial-gradient(ellipse at 42% 18%,#fffdf8,#eee1d6);overflow:hidden;isolation:isolate}
.product-detail-visual .product-detail-image{display:block;width:100%;height:auto;aspect-ratio:1;max-height:none;object-fit:contain;background:transparent;mix-blend-mode:multiply}
.detail-visual-caption{display:block;font-size:14px;line-height:1.7;text-align:center;color:#755d5c;padding:16px 8px 0}
.product-detail-copy{padding:54px 32px 32px;gap:20px;min-width:0}
.product-detail-copy h2{font-size:30px;line-height:1.55}
.product-detail-copy>.product-category,.product-detail-copy>.product-detail-subtitle,.product-detail-copy>.product-description{font-size:14px;line-height:1.9}
.product-detail-copy>.product-description{font-size:15px;line-height:2}
.product-detail-copy .detail-tags span{font-size:14px;padding:4px 9px}
.product-detail-copy section{width:100%}
.product-detail-copy h3{font-family:var(--serif);font-size:20px;line-height:1.6;font-weight:500;margin:0 0 12px}
.product-taste-note{border-left:3px solid #ac687c;padding:2px 0 2px 16px}
.product-taste-note p{font-size:15px;line-height:1.95;color:#695458}
.product-facts,.product-sensory,.saved-facts{display:grid;gap:0;margin:0;width:100%;font-size:14px;line-height:1.8}
.product-facts>div,.product-sensory>div,.saved-facts>div{display:grid;grid-template-columns:96px minmax(0,1fr);gap:14px;padding:12px 0;border-top:1px solid #d7c4bc}
.product-facts dt,.product-sensory dt,.saved-facts dt{color:#8a626b;font-weight:500}
.product-facts dd,.product-sensory dd,.saved-facts dd{margin:0;color:#543f44;overflow-wrap:anywhere}
.product-sensory{background:#f1e4dc;border-radius:5px;padding:1px 15px}
.product-sensory>div:first-child{border-top:0}
.product-facts-note{font-size:14px;line-height:1.85;color:#725e61;margin:14px 0 0}
.product-flavors ul{display:flex;flex-wrap:wrap;gap:8px;padding:0;margin:0;list-style:none}
.product-flavors li{font-size:14px;line-height:1.65;padding:5px 10px;border:1px solid #d2b7b5;border-radius:4px;background:#fff9f0}
.purchase-flow{padding-top:20px;border-top:1px solid #d6bdb7}
.purchase-flow ol{display:grid;gap:11px;padding:0;margin:0;list-style:none}
.purchase-flow li{display:flex;align-items:flex-start;gap:11px;font-size:14px;line-height:1.8}
.purchase-flow li>span{display:grid;place-items:center;width:23px;height:23px;flex:0 0 23px;border-radius:50%;background:#e5cdd0;color:var(--wine);font-family:var(--latin);font-size:17px;line-height:1;margin-top:2px}
.purchase-flow p{font-size:14px;line-height:1.8;margin:15px 0 0;color:#735d61}
.product-purchase-dock{flex:0 0 auto;display:grid;grid-template-columns:minmax(125px,.7fr) minmax(220px,1.3fr) auto;align-items:center;gap:12px 22px;padding:18px 27px max(15px,env(safe-area-inset-bottom));border-top:1px solid #ceb0b0;background:#fffaf2;box-shadow:0 -8px 25px #6039460b;position:relative;z-index:5}
.product-purchase-dock .product-price{font-size:34px;color:var(--wine);gap:8px;line-height:1.15}
.product-purchase-dock .product-price small,.product-purchase-dock .product-price del{font-size:14px}
.product-purchase-dock .purchase-button{min-height:54px;font-size:15px;letter-spacing:.03em;margin:0;padding:14px 18px;white-space:nowrap}
.product-purchase-dock .modal-save-button{position:static;display:inline-flex;gap:8px;align-items:center;justify-content:center;min-height:44px;font-size:14px;line-height:1.5;padding:8px 3px;white-space:nowrap;background:none}
.purchase-destination{grid-column:1/-1;font-size:14px;line-height:1.6;color:#80666b;margin:0;overflow-wrap:anywhere}
.purchase-destination>span{margin-left:16px}
#product-dialog>.dialog-close{position:absolute;top:12px;right:12px;z-index:12;min-width:44px;min-height:44px;box-shadow:0 3px 14px #55343e25;border-color:#cab1ab;background:#fffaf3f2}
.saved-dialog{width:min(730px,calc(100% - 28px))}
.saved-heading{position:sticky;top:-1px;z-index:4;background:var(--cream);padding:8px 50px 14px 0}
.saved-heading .dialog-close{min-width:44px;min-height:44px;top:5px;right:0}
.saved-dialog .saved-intro,.saved-count-label,.saved-purchase-note{font-size:14px;line-height:1.9}
.saved-count-label{color:var(--wine);margin:22px 0 14px;font-weight:500}
.saved-list .saved-item{grid-template-columns:104px minmax(0,1fr);align-items:start;gap:14px 20px;padding:22px 0}
.saved-item .saved-item-image{width:104px;height:116px;padding:0;border-radius:5px;background:#fffcf7}
.saved-item .saved-item-copy h3{font-size:23px;line-height:1.6}
.saved-item .saved-item-copy .product-category,.saved-item .saved-item-copy .saved-item-subtitle{font-size:14px;line-height:1.7}
.saved-item .saved-item-copy .product-price{font-size:30px;color:var(--wine);margin-top:10px}
.saved-item .product-price small{font-size:14px}
.saved-comparison,.saved-item>.saved-item-actions{grid-column:1/-1}
.saved-facts>div{grid-template-columns:100px minmax(0,1fr);padding:9px 0}
.saved-facts>div:first-child{border-top:0}
.saved-item>.saved-item-actions{display:flex;flex-wrap:wrap;gap:8px 20px;align-items:center;margin:0}
.saved-item-actions .saved-details,.saved-item-actions .saved-purchase,.saved-item-actions .saved-remove{font-size:14px;min-height:44px;display:inline-flex;align-items:center;padding:8px 0;line-height:1.6}
.saved-item-actions .saved-purchase{color:var(--wine);font-weight:500}
.saved-item-actions .saved-remove{margin-left:auto}
.saved-purchase-note{padding:18px 0 3px;border-top:1px solid var(--line);color:#785f65}
.saved-empty,.saved-empty p{font-size:14px;line-height:1.9}
.saved-empty h3{font-size:23px;font-family:var(--serif);margin-bottom:12px}

/* Rose, cut cake and golden crumbs each have their own small reveal. */
.sweets-rose-open{animation:hanabi-rose-unfold 1s cubic-bezier(.16,1,.3,1)!important;transform-origin:50% 65%}
.sweets-slice-open:after{content:'';pointer-events:none;position:absolute;top:4%;left:48%;height:78%;width:2px;background:linear-gradient(transparent,#fff9e3c9 22%,#edd0a785 80%,transparent);box-shadow:1px 0 8px #ffe0b24d;rotate:24deg;transform-origin:top;animation:hanabi-slice-glint .82s ease-out both}
.hanabi-burst.is-crumb .hanabi-petal{border-radius:30% 48% 20% 40%;height:var(--petal-size,4px);background:#c6964d;box-shadow:inset 1px 1px 0 #ffdc9855;animation-duration:.67s}
.hanabi-burst.is-crumb .hanabi-petal:nth-child(3n+1){background:#e1bb76}
.hanabi-burst.is-crumb .hanabi-petal:nth-child(3n+2){background:#a5753c}
.hanabi-burst.is-crumb .hanabi-bloom-core{display:none}
.hanabi-burst.is-rose .hanabi-petal{animation-duration:.78s}
@keyframes hanabi-rose-unfold{0%{opacity:0;scale:.84;rotate:-5deg}60%{opacity:1;scale:1.035;rotate:1deg}100%{opacity:1;scale:1;rotate:0deg}}
@keyframes hanabi-slice-glint{0%{opacity:0;scale:1 0;translate:-15px 0}30%{opacity:.9;scale:1 1}70%{opacity:.6;scale:1 1;translate:8px 0}100%{opacity:0;scale:1 1;translate:19px 0}}

@media(max-width:760px){
  .product-dialog[open]{width:calc(100% - 16px);max-height:94dvh;border-radius:9px}
  #product-dialog-body{max-height:94dvh}
  .product-detail-layout{display:block}
  .product-detail-visual{position:relative;padding:18px 18px 12px}
  .product-detail-visual .product-detail-image{max-height:29dvh;aspect-ratio:auto;width:100%;height:29dvh;object-fit:contain}
  .detail-visual-caption{font-size:14px;padding:10px 15px 0}
  .product-detail-copy{padding:22px 22px 30px;gap:19px}
  .product-detail-copy h2{font-size:27px}
  .product-detail-copy>.product-description{font-size:15px}
  .product-facts>div,.product-sensory>div{grid-template-columns:78px minmax(0,1fr);gap:12px}
  .product-purchase-dock{grid-template-columns:1fr auto;gap:8px 12px;padding:12px 18px max(12px,env(safe-area-inset-bottom))}
  .product-purchase-dock .product-price{font-size:31px;grid-column:1;grid-row:1}
  .product-purchase-dock .modal-save-button{grid-column:2;grid-row:1;min-height:44px;font-size:14px;max-width:135px;white-space:normal}
  .product-purchase-dock .purchase-button{grid-column:1/-1;grid-row:2;min-height:51px;font-size:15px}
  .purchase-destination{font-size:14px;line-height:1.45}
  .purchase-destination>span{display:block;margin:3px 0 0}
  .saved-dialog{padding:22px 21px}
  .saved-list .saved-item{grid-template-columns:82px minmax(0,1fr);gap:11px 15px}
  .saved-item .saved-item-image{width:82px;height:100px}
  .saved-item .saved-item-copy h3{font-size:21px}
  .saved-item .saved-item-copy .product-price{font-size:29px}
  .saved-facts>div{grid-template-columns:78px minmax(0,1fr);gap:12px}
  .saved-item>.saved-item-actions{gap:5px 18px}
  .saved-item-actions .saved-remove{margin-left:0}
}
@media(prefers-reduced-motion:reduce){.sweets-rose-open,.sweets-slice-open:after{animation:none!important;opacity:1;scale:1;rotate:none}.sweets-slice-open:after{display:none}}
