/* The native scroller provides touch inertia and accessible selection. The canvas
   follows its continuous position and paints type onto the curved metal face. */
pack-wheel { --tick:44px; --barrel-height:35px; --lens-diameter:46px; isolation:isolate; }
pack-wheel.drum-ready { width:85%; max-width:17.3rem; margin-inline:auto; border-radius:999px; }
pack-wheel.drum-ready::before {
  /* A soft contact shadow sits underneath the ivory barrel. */
  inset: auto 4% calc((100% - var(--barrel-height)) / 2 - 2px); height:5px;
  border:0; border-radius:50%;
  background:radial-gradient(ellipse,#ad9a782d 10%,#b5a18014 48%,transparent 73%);
  box-shadow:none;
}
.pack-track { height:50px; }
.drum-ready .pack-track { opacity:0; z-index:2; border-radius:inherit; }
.pack-drum { position:absolute; inset:0; width:100%; height:100%; pointer-events:none;
  mask-image:linear-gradient(90deg,transparent 0,#000 7%,#000 93%,transparent); }
.drum-ready .pack-lens {
  z-index:1; width:var(--lens-diameter); height:var(--lens-diameter);
  box-sizing:border-box; font-size:0!important; color:transparent;
  border:1px solid #82a6a0;
  background:radial-gradient(ellipse at 29% 15%,#ffffff66,transparent 42%),
    radial-gradient(circle,transparent 58%,#84aca62b 84%,#99b7ae72);
  box-shadow:inset 1px 1.5px 1px #ffffffdf,inset -1px -1.5px 2px #72999255,0 1.5px 2.5px #506f6430;
}
.drum-ready .pack-lens::before {
  content:""; position:absolute; top:8%; left:16%; width:32%; height:12%;
  transform:rotate(-25deg); border-radius:50%; background:linear-gradient(#fffffff5,#ffffff38);
}
.drum-ready:focus { outline:none; }
.drum-ready:focus-visible .pack-lens { outline:2px solid #31797b; outline-offset:2px; }
.pack-unit { color:#6b5b4b; }
@media(max-width:600px){
  .card pack-wheel {--tick:32px; --barrel-height:28px; --lens-diameter:39px;}
  .card .pack-track {height:44px}
}
@media(forced-colors:active){
  .drum-ready .pack-track {opacity:1}
  .drum-ready .pack-drum {visibility:hidden}
  .drum-ready .pack-lens {border:2px solid Highlight;background:transparent}
  .drum-ready:focus-visible .pack-lens {outline-color:Highlight}
}

/* Mount the dial on the image; the clear area remains the product link. */
.photo-wheel-media {position:relative; isolation:isolate; overflow:hidden; border-radius:12px}
.photo-wheel-media .card-photo {display:block}
.photo-wheel-media .quick-cart {z-index:2}
.photo-wheel-media .quick-cart:focus-visible {outline-offset:-3px}
.photo-wheel-media .card-photo:focus-visible {outline-offset:-3px}
.pack-glass {
  position:absolute; inset:auto 0 0; z-index:1; display:grid; place-items:center;
  border-radius:0 0 12px 12px;
  background:linear-gradient(115deg,#fff3db8f,#f4e3c673 62%,#f6ead38c);
  box-shadow:inset 0 -1px #ffffff31;
  -webkit-backdrop-filter:blur(7px) saturate(.77); backdrop-filter:blur(7px) saturate(.77);
}
.pack-glass pack-wheel {width:87%; max-width:17.3rem; margin-inline:auto}
.photo-wheel-media + .pack-unit {margin:3px 0 0; text-align:center}
.photo-wheel-media + .pack-unit + .price {margin:0 0 6px; text-align:center}
.product-figure {display:grid; justify-items:center; align-content:start; min-width:0}
.product-figure .photo-wheel-media {width:fit-content; max-width:100%}
.detail-body .product-figure .product-photo {display:block; width:auto; max-width:100%; border-radius:0}
@media (forced-colors:active) {
  .pack-glass {background:Canvas; color:CanvasText}
}

/* Receipt content shares a centerline with its actions in the modal and on the upload tab. */
#detail:not(.checkout-dialog)[data-view=receipt] { width:min(480px,calc(100% - 24px)); max-width:480px; max-height:calc(100dvh - 24px); padding:0; border-radius:22px; background:#fffaf2; }
#detail:not(.checkout-dialog):is([data-view=receipt],[data-view=cart]) .dialog-head { height:0; min-height:0; margin:0; padding:0; }
#detail:not(.checkout-dialog):is([data-view=receipt],[data-view=cart]) #detailLabel { display:none; }
#detail:not(.checkout-dialog):is([data-view=receipt],[data-view=cart]) .dialog-head #close {
  position:absolute; z-index:2; right:12px; top:12px; width:38px; height:38px; border:1px solid #e3d8c8; background:#faf3e9; color:#605548;
}
.gift-receipt,#uploadReceipt:not([hidden]) { display:grid; justify-items:center; text-align:center; padding:30px clamp(18px,5vw,36px) 25px; color:#443a31; }
.upload-page:has(#uploadReceipt:not([hidden])) { max-width:480px; padding:0; }
.upload-page:has(#uploadReceipt:not([hidden])) #uploadTitle { display:none; }
.receipt-check { display:grid; place-items:center; width:46px; height:46px; color:#24696a; background:#e2eee7; border:1px solid #c8ded4; border-radius:50%; font:700 23px/1 system-ui,sans-serif; }
.gift-receipt h2,#uploadReceipt>.receipt-title { margin:13px 0 4px; font:700 clamp(25px,4vw,32px)/1.15 "Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; color:#483a30; }
.gift-receipt h2:focus,#cartHeading:focus,.co-panel h3:focus { outline:none; }
.gift-receipt [data-receipt],#uploadResult { margin:0; font-size:14px; color:#716052; text-wrap:balance; overflow-wrap:anywhere; }
.gift-receipt .gift-offer,#uploadGift { position:relative; align-self:stretch; width:100%; margin:22px 0 12px; padding:22px 18px 19px; border:1px solid #abc8bd; border-radius:14px; background:linear-gradient(125deg,#eef5eb,#e0eee6); color:#234f50; }
.gift-offer::before,#uploadGift::before,.gift-offer::after,#uploadGift::after { content:""; position:absolute; top:55%; width:12px; height:18px; border:1px solid #abc8bd; background:#fffaf2; }
.gift-offer::before,#uploadGift::before { left:-1px; border-radius:0 20px 20px 0; border-left:0; }
.gift-offer::after,#uploadGift::after { right:-1px; border-radius:20px 0 0 20px; border-right:0; }
.gift-offer h3,#uploadGift h2 { margin:0 auto; max-width:100%; font:700 clamp(22px,4vw,28px)/1.12 "Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; text-wrap:balance; }
.gift-offer h3 span,#uploadGift h2 span { display:block; font-size:.78em; padding-top:4px; }
.gift-offer p,#uploadGift p { color:#536b60; margin:8px 0 15px; font-size:13px; }
.gift-offer [data-claim],#uploadClaim { display:block; width:min(100%,200px); margin:0 auto; border:0; background:#236b71; color:white; padding:10px 20px; border-radius:9px; font-weight:700; min-height:44px; }
.receipt-next,#uploadNext { display:block; margin:3px auto 0; min-height:40px; padding:6px 12px; background:transparent; color:#316c70; border:0; font-size:14px; text-decoration:underline; text-underline-offset:3px; }
.gift-receipt:not(:has(.gift-offer)) .receipt-next { margin-top:10px; }

/* Checkout in the same paper and ink palette as the catalogue. */
#detail:not(.checkout-dialog)[data-view=cart] { width:min(1140px,calc(100% - 40px)); max-width:1140px; max-height:calc(100dvh - 36px); padding:24px; background:#faf5eb; color:#43392f; border:1px solid #d5c6b4; border-radius:22px; }
#detail:not(.checkout-dialog)[data-view=cart]:not(:has(.co-shell)) { max-width:450px; padding:32px; }
.co-shell { --ink:#214f50; --line:#e4d8c7; --muted:#715f51; --paper:#fffcf6; }
.co-shell [hidden] {display:none!important}
.co-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:0 42px 0 0; margin:0 0 18px; }
.co-heading h2 { margin:0; font:700 clamp(25px,3vw,34px)/1.12 "Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; letter-spacing:-.03em; }
.co-steps { display:flex; align-items:center; gap:6px; }
.co-steps button { border:1px solid var(--line); color:#725f52; background:transparent; border-radius:100px; padding:6px 14px; font-size:13px; }
.co-steps button[aria-current] { border-color:#93bdb0; background:#e2eee6; color:#235951; font-weight:700; }
.co-steps i { font-style:normal; font-size:14px; color:#a4927c; }
.co-columns { display:grid; grid-template-columns:minmax(0,1.9fr) minmax(245px,1fr); align-items:start; gap:14px; }
.co-main,.co-aside { display:grid; min-width:0; gap:12px; }
.co-aside { position:sticky; top:0; }
.co-panel { background:var(--paper); border:1px solid var(--line); padding:18px; border-radius:14px; min-width:0; }
.co-panel h3 { margin:0 0 12px; font:700 20px/1.2 "Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; color:#43392f; }
.co-panel .cart-items { display:grid; gap:8px; }
.co-line { display:grid; grid-template-columns:18px 64px minmax(105px,1fr) auto auto; align-items:center; gap:10px; border:1px solid #e9dece; padding:10px; border-radius:10px; background:#fffdf9; }
.co-line.co-muted { background:#f6f1e9; }.co-line.co-muted .cart-thumb { opacity:.62; }
.co-line .co-check { width:17px; height:17px; margin:0; padding:0; accent-color:#287779; }
.co-line .cart-thumb { width:64px; height:80px; background:#f0e5d6; border-radius:7px; }
.co-line .cart-thumb img {object-fit:cover}
.co-line h4,.co-line p { margin:0; }.co-line h4 { font-size:14px; line-height:1.28; overflow-wrap:anywhere; }
.co-sku,.co-packs>label { color:var(--muted); font-size:11px; }
.co-line .pack-choice { margin:3px 0 0; width:min(100%,180px); }
.co-line pack-wheel { --tick:29px; --barrel-height:22px; --lens-diameter:33px; }
.co-line .pack-track {height:44px;} .co-line .pack-track span {height:24px;font-size:12px;}
.co-line .pack-unit { font-size:10px; }
.co-packs {display:grid; gap:4px; justify-items:center}
.co-stepper {display:flex; align-items:center; border:1px solid #d8cbb8; border-radius:8px; overflow:hidden; background:#fffcf6}
.co-stepper button,.co-stepper input { padding:0; font:600 14px system-ui,sans-serif; border:0; color:#384c46; background:transparent; width:28px; height:32px; text-align:center; }
.co-stepper input { appearance:textfield; -moz-appearance:textfield; border-radius:0; }
.co-stepper input::-webkit-inner-spin-button,.co-stepper input::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.co-stepper button:disabled {opacity:.33}
.co-line-end {display:flex;align-items:center;justify-content:flex-end;gap:4px}
.co-line-end strong,.co-summary dd {font-variant-numeric:tabular-nums;white-space:nowrap}
.co-line-end strong {font-size:15px;color:var(--ink)}
.co-remove { background:transparent; border:0; color:#796957; width:32px; height:32px; display:grid; place-items:center; }
.co-shell svg { width:18px; height:18px; flex:none; }
.co-options { display:flex; flex-wrap:wrap; gap:6px; }
.co-option { display:flex; align-items:center; justify-content:center; flex:1 1 auto; gap:7px; min-height:40px; padding:7px 10px; border:1px solid #d9cbb9; border-radius:8px; background:#fffdf8; cursor:pointer; font-size:13px; font-weight:650; }
.co-option input { margin:0; accent-color:#267174; }
[data-section=delivery] .co-option input { position:absolute; width:1px; height:1px; opacity:0; }
.co-option:has(input:checked) { border-color:#277573; background:#e5eee6; color:#1e5c5b; }
.co-option:has(input:focus-visible) {outline:3px solid #388a94;outline-offset:2px}
.co-location { margin:12px 0 0; overflow:hidden; display:grid; grid-template-columns:132px 1fr; align-items:stretch; background:#f5f0e6; border-radius:9px; }
.co-location iframe { width:100%; height:112px; border:0; background:#e7e1d3; }
.co-location>div { padding:12px; }
.co-location b,.co-photos b { font-size:14px; }
.co-location p,.co-location a,.co-note,.co-photos p,.co-count {font-size:13px; line-height:1.4;}
.co-location p,.co-photos p { margin:3px 0; color:var(--muted); }
.co-location a { color:#246c6e; text-underline-offset:3px; }
.co-fields { display:grid; gap:9px; margin:12px 0 0; }
.co-fields label { display:grid; gap:4px; font-size:13px; font-weight:600; }
.co-fields input,.co-fields select,.co-fields button { min-width:0; min-height:40px; border:1px solid #cfc0aa; border-radius:8px; background:#fffdf8; padding:6px 10px; color:inherit; font:inherit; }
.co-search { display:grid; grid-template-columns:1fr auto; gap:6px; }
.co-fields p { margin:0; }.co-fields p:empty,.co-error:empty {display:none}
.co-note { margin:9px 0 0; color:var(--muted); }
.co-summary h3 { font-size:25px; margin-bottom:5px; }.co-count { margin:0; color:var(--muted); }
.co-summary dl { margin:18px 0 16px; }
.co-summary dl>div { display:flex; align-items:baseline; justify-content:space-between; gap:9px; margin:8px 0; }
.co-summary dt {color:var(--muted)}.co-summary dd {margin:0; font-weight:650}
.co-summary .co-total {border-top:1px solid var(--line); margin-top:14px; padding-top:12px;}
.co-total dt,.co-total dd {font-weight:750;color:var(--ink);font-size:19px}
.co-primary { width:100%; min-height:46px; border:0; border-radius:9px; font-weight:700; color:#fff; background:#236b71; }
.co-primary:hover:not(:disabled),.gift-offer [data-claim]:hover,#uploadClaim:hover {background:#19585d}
.co-primary:disabled {background:#d6e0d9;color:#48584d;cursor:default}
.co-error {font-size:13px;color:#953c35;margin:10px 0 0;}
.co-photos {display:flex;align-items:center;gap:13px;border:1px solid #dccfb9;border-radius:14px;background:#f3ebdc;padding:15px;}
.co-photos img {flex:none;object-fit:contain;}
@media(max-width:900px){
  .co-columns {grid-template-columns:minmax(0,1fr) minmax(215px,.55fr);gap:10px}
  .co-panel {padding:13px}
  .co-line {grid-template-columns:18px 54px minmax(0,1fr) auto;gap:7px}
  .co-line .cart-thumb {width:54px;height:66px}
  .co-line-end {grid-column:3 / -1;justify-self:end}
}
@media(max-width:740px){
  #detail:not(.checkout-dialog)[data-view=cart] {width:calc(100% - 14px);max-height:calc(100dvh - 14px);padding:16px 10px 12px;border-radius:16px}
  .co-heading {display:grid;grid-template-columns:minmax(0,1fr) 36px;column-gap:4px;row-gap:0;padding:0 0 0 4px;margin-bottom:12px}
  .co-heading h2 {grid-column:1;min-width:0;font-size:clamp(20px,5.3vw,26px);text-wrap:balance}
  .co-steps {grid-column:1 / -1}
  [data-section=delivery] .co-options {display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
  [data-section=delivery] .co-option {flex-direction:column;gap:3px;padding:6px 2px;text-align:center}
  .co-steps {margin-top:11px;gap:4px}.co-steps button {padding:6px 11px;}
  .co-columns {grid-template-columns:minmax(0,1fr)}.co-aside {position:static}
  .co-line {grid-template-columns:16px 52px minmax(0,1fr);gap:7px}
  .co-line .cart-thumb {width:52px;height:68px}
  .co-line .co-packs {grid-column:2 / 3;display:flex;align-items:center;justify-self:start}
  .co-line .co-packs>label {display:none}
  .co-line-end {grid-column:3;justify-self:end;}
  .co-photos {padding:10px 14px}.co-photos img{width:40px;height:40px}
  .co-location {grid-template-columns:90px 1fr}
  .co-option {padding:7px 8px;gap:4px;min-height:42px}
}

.co-recipient {display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 12px;border-top:1px solid var(--line);margin-top:10px;padding-top:9px;font-size:13px}.co-recipient strong{color:var(--muted);font-weight:500;overflow-wrap:anywhere}

@media(min-width:355px) {
  .gift-offer h3,#uploadGift h2 {white-space:nowrap;font-size:clamp(20px,5.2vw,27px)}
}
