
/* ---- assistant orb: a ribbon of light in the app's own reds, not a spinner ----
   Three soft radial-gradient layers drifting over a dark maroon core. Only transform and opacity
   animate, so it stays cheap on a mid-range Android; no blur filter, the soft edges come from the
   gradients themselves. Each state changes speed, brightness and scale, and reduced motion freezes it. */
.orb{--orb:132px;position:relative;display:block;width:var(--orb);height:var(--orb);border-radius:50%;overflow:hidden;isolation:isolate;flex:none;
  background:radial-gradient(circle at 50% 58%,var(--s3),var(--c9) 74%);
  box-shadow:0 0 0 1px var(--c58),0 10px 34px var(--c57);transition:box-shadow .4s ease}
.orb>i{position:absolute;display:block;border-radius:50%;mix-blend-mode:screen;will-change:transform,opacity}
/* each layer is a different shape and offset, so the light reads as ribbons crossing rather than one ball */
.orb>i:nth-child(1){inset:-46% -16%;background:radial-gradient(ellipse at 44% 40%,var(--c78),transparent 62%);animation:orbA 7s linear infinite}
.orb>i:nth-child(2){inset:-14% -46%;background:radial-gradient(ellipse at 58% 62%,var(--c64),transparent 58%);animation:orbB 9.5s linear infinite}
.orb>i:nth-child(3){inset:-34% -28%;background:radial-gradient(ellipse at 50% 34%,var(--c82),transparent 46%);animation:orbC 13s linear infinite}
.orb>em{position:absolute;inset:0;display:grid;place-items:center;font-style:normal;font-size:calc(var(--orb)*.34);opacity:.92;text-shadow:0 2px 10px var(--shadow);pointer-events:none}
@keyframes orbA{0%{transform:rotate(0deg) translate3d(3%,0,0) scale(1)}50%{transform:rotate(180deg) translate3d(-5%,4%,0) scale(1.14)}100%{transform:rotate(360deg) translate3d(3%,0,0) scale(1)}}
@keyframes orbB{0%{transform:rotate(0deg) translate3d(-4%,2%,0) scale(1.06)}50%{transform:rotate(-180deg) translate3d(5%,-3%,0) scale(.94)}100%{transform:rotate(-360deg) translate3d(-4%,2%,0) scale(1.06)}}
@keyframes orbC{0%{transform:rotate(0deg) scale(1);opacity:.55}50%{transform:rotate(120deg) scale(1.2);opacity:.85}100%{transform:rotate(360deg) scale(1);opacity:.55}}
@keyframes orbBreath{0%,100%{transform:scale(1)}50%{transform:scale(1.045)}}
@keyframes orbTalk{0%,100%{transform:scale(1)}35%{transform:scale(1.07)}70%{transform:scale(.98)}}
@keyframes orbRing{0%{transform:scale(.9);opacity:.55}100%{transform:scale(1.5);opacity:0}}
/* idle: slow, dim breathing */
.orb[data-state=idle]{animation:orbBreath 6.5s ease-in-out infinite}
.orb[data-state=idle]>i{opacity:.5}
/* listening: brighter, faster drift and a ring that keeps opening outward */
.orb[data-state=listening]{animation:orbBreath 2.2s ease-in-out infinite;box-shadow:0 0 0 2px var(--c74),0 12px 40px var(--c61)}
.orb[data-state=listening]>i{opacity:.95}
.orb[data-state=listening]>i:nth-child(1){animation-duration:2.8s}
.orb[data-state=listening]>i:nth-child(2){animation-duration:3.6s}
.orb[data-state=listening]>i:nth-child(3){animation-duration:4.4s}
.orb[data-state=listening]::after{content:"";position:absolute;inset:0;border-radius:50%;border:2px solid var(--c76);animation:orbRing 1.9s ease-out infinite;pointer-events:none}
/* thinking: tighter, quicker swirl, deeper maroon, no ring */
.orb[data-state=thinking]{animation:orbBreath 1.5s ease-in-out infinite;box-shadow:0 0 0 1px var(--c33),0 8px 26px var(--c32)}
.orb[data-state=thinking]>i:nth-child(1){animation-duration:1.5s;background:radial-gradient(ellipse at 46% 40%,var(--c64),transparent 56%)}
.orb[data-state=thinking]>i:nth-child(2){animation-duration:1.9s;background:radial-gradient(ellipse at 58% 60%,var(--c34),transparent 56%)}
.orb[data-state=thinking]>i:nth-child(3){animation-duration:2.4s;background:radial-gradient(ellipse at 52% 44%,var(--c77),transparent 42%)}
.orb[data-state=thinking]>em{opacity:.45}
/* speaking: the pulse quickens with the voice and the light flares */
.orb[data-state=speaking]{animation:orbTalk .62s ease-in-out infinite;box-shadow:0 0 0 2px var(--c75),0 14px 44px var(--c63)}
.orb[data-state=speaking]>i:nth-child(1){animation-duration:3.2s;opacity:1}
.orb[data-state=speaking]>i:nth-child(2){animation-duration:4.4s;opacity:1}
.orb[data-state=speaking]>i:nth-child(3){animation-duration:5.6s;opacity:.9}
/* the assistant page: orb, state word, then the conversation */
.orbwrap{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 16px 4px}
.orbstate{font-size:13px;color:var(--mut);font-weight:700;min-height:18px}
.p-mic .orb{--orb:52px;box-shadow:0 0 0 1px var(--c59),0 6px 18px var(--c59)}
.p-mic .orb>em{font-size:20px}
@media (prefers-reduced-motion:reduce){
  .orb,.orb>i{animation:none!important}
  .orb>i{opacity:.62}
  .orb[data-state=listening]{box-shadow:0 0 0 2px var(--c75),0 12px 40px var(--c61)}
  .orb[data-state=speaking]{box-shadow:0 0 0 2px var(--c75),0 14px 44px var(--c63)}
  .orb[data-state=listening]::after{display:none}
}

/* ---- the assistant builds the invoice in front of the customer ----
   Each matched item lands as a lit card with its check and price, then the totals slide in and the
   cashback coins drop onto the panel. Short: about 160ms per item, so three items finish in half a second. */
.buildcard{opacity:0;transform:translateY(10px) scale(.96);animation:buildIn .32s cubic-bezier(.2,.8,.2,1) forwards}
@keyframes buildIn{to{opacity:1;transform:none}}
.binv{position:relative;opacity:0;transform:translateY(14px);animation:buildIn .36s ease forwards}
.brow{position:relative}
.bcoin{position:absolute;top:-9px;inset-inline-end:8px;width:16px;height:16px;border-radius:50%;opacity:0;pointer-events:none;animation:coinDrop 1.05s ease forwards;
 background:radial-gradient(circle at 34% 28%,var(--c83) 0 14%,var(--sun) 38%,var(--warn) 72%,var(--c55) 100%);
 box-shadow:inset 0 0 0 1.5px var(--char-ring-strong),0 1px 3px var(--shadow-45)}
.bcoin::after{content:"";position:absolute;inset:27%;border-radius:50%;border:1.5px solid var(--coin-edge)}
.cbrow .bcoin{animation-duration:.95s}
.binv .cbrow{opacity:0;transform:translateY(8px);animation:buildIn .3s ease forwards}
.bcheck{color:var(--cash);font-weight:900;margin-inline-end:4px}

/* A recommendation in the conversation is a product card, not a sentence: photo, name, price, cashback.
   It carries the same numbers as the invoice line under it, so the customer sees the item, not only a total. */
.v2line{display:flex;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid var(--hair)}
.v2line:last-child{border-bottom:0}
.v2photo{width:52px;height:52px;flex:none;border-radius:11px;overflow:hidden;background:var(--white)}
.v2photo img{width:100%;height:100%;object-fit:cover;display:block}
.v2grow{flex:1;min-width:0}
.v2name{font-weight:700;font-size:14.5px;line-height:1.45;overflow-wrap:anywhere}
.v2sub{font-size:12px;opacity:.7;margin-top:1px}
.v2price{display:flex;align-items:center;gap:6px;margin-top:3px;flex-wrap:wrap}
.v2price b{font-size:15px;font-weight:800;white-space:nowrap}
.v2cb{background:var(--c2);color:var(--c37);border-radius:8px;padding:1px 6px;font-size:11px;font-weight:800;white-space:nowrap}
