/* Brew Lab Rewards Lab — progressive animated beaker + desktop polish.
   Uses only Supabase-rendered stamps; NEVER alters rewards or payment state.
   Motion is decorative and gracefully disabled for reduced-motion preferences. */
#rewardsPage .reward-beaker-scene { position:relative; isolation:isolate; }
#rewardsPage .reward-beaker-art { flex:0 1 auto; }
#rewardsPage .reward-bubble-stream .reward-bubble {
  fill:#f9f7dc;opacity:.0;stroke:#ffffff80;stroke-width:1;
  animation:brew-reward-bubble 3.8s ease-in infinite;
  will-change:transform,opacity;
}
#rewardsPage .reward-bubble-2{animation-delay:-1.3s;animation-duration:4.5s;}
#rewardsPage .reward-bubble-3{animation-delay:-2.6s;animation-duration:3.2s;}
#rewardsPage .reward-bubble-4{animation-delay:-.8s;animation-duration:4.8s;}
#rewardsPage .reward-bubble-5{animation-delay:-3.3s;animation-duration:3.6s;}
#rewardsPage .reward-bubble-6{animation-delay:-1.8s;animation-duration:5.2s;}
#rewardsPage .reward-beaker-scene[data-reaction-stage="idle"] .reward-bubble{animation:none;opacity:0;}
#rewardsPage .reward-beaker-scene[data-reaction-stage="gentle"] .reward-bubble:nth-child(n+3){animation:none;opacity:0;}
#rewardsPage .reward-beaker-scene[data-reaction-stage="brewing"] .reward-bubble:nth-child(n+5){animation:none;opacity:0;}
#rewardsPage .reward-beaker-scene[data-reaction-stage="almost"] .reward-bubble,
#rewardsPage .reward-beaker-scene[data-reaction-stage="overflow"] .reward-bubble{animation-duration:1.7s;}
#rewardsPage .reward-beaker-scene[data-reaction-stage="almost"] .reward-bubble:nth-child(even),
#rewardsPage .reward-beaker-scene[data-reaction-stage="overflow"] .reward-bubble:nth-child(even){animation-duration:1.35s;}
#rewardsPage .reward-beaker-overflow{opacity:0;pointer-events:none;transform-origin:120px 48px;transition:opacity .24s ease;}
#rewardsPage .reward-beaker-scene[data-reaction-stage="overflow"] .reward-beaker-overflow{
  opacity:1;animation:brew-reward-overflow 2.4s ease-in-out infinite;
}
#rewardsPage .reward-beaker-scene[data-reaction-stage="overflow"] .reward-beaker-art{
  filter:drop-shadow(0 5px 12px #f3e0a455) drop-shadow(0 9px 8px #142f1d38);
}
#rewardsPage .reward-overflow-drop {transform-origin:center;animation:brew-reward-droplet 1.7s ease-in-out infinite;}
#rewardsPage .reward-overflow-drop.drop-two{animation-delay:-.65s;}
#rewardsPage .reward-overflow-drop.drop-three{animation-delay:-1.13s;}
#rewardsPage .reward-overflow-drop.drop-four{animation-delay:-.92s;}
#rewardsPage .reward-reaction-label{display:none;color:#f7e5b8;font-weight:850;font-size:11px;letter-spacing:.095em;line-height:1.4;margin-top:10px;max-width:150px;}
#rewardsPage .reward-beaker-scene[data-reaction-stage="almost"] .reward-reaction-label,
#rewardsPage .reward-beaker-scene[data-reaction-stage="overflow"] .reward-reaction-label{display:block;}
#rewardsPage .reward-beaker-scene[data-reaction-stage="overflow"] .reward-reaction-label{animation:brew-reward-glow 2.6s ease-in-out infinite;}
#rewardsPage .reward-beaker-scene[data-reaction-stage="overflow"] .reward-beaker-progress strong{color:#f8e4b1;}
@keyframes brew-reward-bubble{
  0% {transform:translate3d(0,12px,0) scale(.75);opacity:0}
  18%{opacity:.75}
  75%{opacity:.53}
  100%{transform:translate3d(0,-86px,0) scale(1.18);opacity:0}
}
@keyframes brew-reward-overflow{0%,100%{transform:translateY(2px) scale(.98)}50%{transform:translateY(-4px) scale(1.035)}}
@keyframes brew-reward-droplet{0%,100%{transform:translateY(2px);opacity:.63}45%{transform:translateY(-8px);opacity:1}}
@keyframes brew-reward-glow{0%,100%{opacity:.72}50%{opacity:1}}

/* Desktop: a true Rewards + Orders + Account experience, not stretched phone cards.
   Matches the 920px breakpoint used by the working menu and checkout. */
@media (min-width:920px) {
  #rewardsPage .page-intro p,#ordersPage .page-intro p,#accountPage .page-intro p{max-width:620px;font-size:14px;}
  #rewardsPage #rewardsMember:not(.hidden){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start;}
  #rewardsPage #rewardsMember>.reward-summary{grid-column:1/-1;margin:12px 0 0;display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);grid-template-areas:'kicker beaker' 'heading beaker' 'lead beaker' 'stamps stamps' 'claim claim';column-gap:25px;align-items:center;padding:28px 34px 30px;}
  #rewardsPage .reward-summary>.reward-small{grid-area:kicker;align-self:end;}
  #rewardsPage .reward-summary>h2{grid-area:heading;align-self:center;font-size:clamp(28px,3vw,36px);}
  #rewardsPage .reward-summary>p{grid-area:lead;max-width:36ch;align-self:start;font-size:13px;}
  #rewardsPage .reward-summary>.reward-beaker-scene{grid-area:beaker;margin:0;max-width:none;min-height:220px;}
  #rewardsPage .reward-summary>.reward-stamp-grid{grid-area:stamps;margin:7px 0 9px;grid-template-columns:repeat(8,minmax(0,1fr));}
  #rewardsPage .reward-summary>#rewardsClaim{grid-area:claim;width:min(100%,400px);justify-self:center;}
  #rewardsPage #rewardsMember>.reward-section{margin:0;min-width:0;}
  #rewardsPage .reward-section>h2{font-size:22px;}
  #rewardsPage .reward-section .reward-voucher,#rewardsPage .reward-section .reward-history{min-width:0;}
  #rewardsPage #rewardsGuest{max-width:690px;}
  #ordersPage .orders-view-tabs{max-width:430px;}
  #ordersPage .orders-dashboard-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:stretch;}
  #ordersPage .orders-dashboard-card{min-width:0;height:100%;}
  #ordersPage .orders-bottom-actions{display:flex;align-items:center;justify-content:flex-start;gap:14px;margin-top:22px;flex-wrap:wrap;}
  #accountPage .crew-signed-in:not(.hidden){grid-template-columns:repeat(12,minmax(0,1fr));gap:18px;align-items:stretch;}
  #accountPage .crew-signed-in>.crew-welcome{grid-column:span 5;margin:0;min-height:305px;padding:30px 26px;}
  #accountPage .crew-signed-in>.crew-shortcuts{grid-column:span 7;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;}
  #accountPage .crew-shortcuts>.crew-shortcut-rewards{min-height:0;}
  #accountPage .crew-shortcuts>.crew-shortcut:not(.crew-shortcut-rewards){min-height:136px;}
  #accountPage .crew-signed-in>.crew-profile-details{grid-column:span 9;align-self:start;}
  #accountPage .crew-signed-in>.crew-signout{grid-column:span 3;margin:0;width:100%;max-width:none;align-self:start;}
  #accountPage .account-preview{max-width:700px;}
  #accountPage .push-settings{padding:24px;}
  #accountPage .push-settings .push-switches{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
  #accountPage .push-settings .push-switches>label{min-width:0;}
}
@media (prefers-reduced-motion:reduce) {
  #rewardsPage .reward-bubble,
  #rewardsPage .reward-overflow-drop,
  #rewardsPage .reward-beaker-overflow,
  #rewardsPage .reward-reaction-label {animation:none!important;transition:none!important;}
  #rewardsPage #rewardBeakerLiquid{transition:none!important;}
  #rewardsPage .reward-beaker-scene[data-reaction-stage="overflow"] .reward-beaker-overflow{opacity:1;}
}
