/* ═══════════════════════════════════════════════════════════════════
   Reward-момент («эмоция-награда за целевое действие»).
   Переиспользуемый модуль: живая 3D-эмодзи (Lottie) + lime-взрыв → сухой
   результат. Дизайн-язык — главная ЛК клиента (paper-полотно, «парящие»
   белые карточки, статус-пиллы, аватар-чип, кнопки с press). Namespace .rw-*
   Токены берутся из хост-страницы (--paper/--lime/--ink…), есть фолбэки.
   ═══════════════════════════════════════════════════════════════════ */
/* оверлей-обёртка (для показа поверх SPA, напр. корзины) */
.rw-overlay{position:fixed;inset:0;z-index:200;background:var(--paper,#F4F4F1);overflow-y:auto;-webkit-overflow-scrolling:touch;display:none}
.rw-overlay.on{display:block}
.rw-overlay .rw-scene{min-height:100%;padding-bottom:28px;max-width:480px;margin:0 auto}
.rw-overlay .rw-top{padding-top:38px}
.rw-scene{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;background:var(--paper,#F4F4F1);min-height:100%}
.rw-top{position:relative;width:100%;padding:26px 20px 6px;display:flex;flex-direction:column;align-items:center;text-align:center}

/* эмодзи-герой + lime-взрыв */
.rw-hero{position:relative;width:168px;height:168px;display:grid;place-items:center;margin-bottom:6px;transform-origin:center center;will-change:transform;z-index:2;opacity:0}
.rw-lottie{position:relative;width:150px;height:150px;z-index:1;filter:drop-shadow(0 14px 22px rgba(0,0,0,.16))}
.rw-lottie svg{display:block}
.rw-burst{position:absolute;left:50%;top:48%;width:0;height:0;z-index:0;opacity:0}
.rw-burst>span{position:absolute;left:0;top:0;display:block;border-radius:50%;transform:translate(-50%,-50%);will-change:transform,opacity}
.rw-rays{width:366px;height:366px;background:repeating-conic-gradient(from 0deg,rgba(200,251,70,.20) 0deg 5deg,rgba(200,251,70,0) 5deg 17deg);-webkit-mask:radial-gradient(circle,#000 8%,rgba(0,0,0,.4) 38%,transparent 66%);mask:radial-gradient(circle,#000 8%,rgba(0,0,0,.4) 38%,transparent 66%)}
.rw-glow{width:300px;height:300px;background:radial-gradient(circle,rgba(236,252,199,.95) 0%,rgba(200,251,70,.28) 34%,rgba(200,251,70,0) 68%)}
.rw-ring{width:132px;height:132px;border:3px solid rgba(200,251,70,.5);background:transparent}

/* тексты героя */
.rw-h{font-family:var(--display,'Manjari',sans-serif);font-weight:700;font-size:32px;letter-spacing:-.02em;line-height:1.02;color:var(--ink,#0C0C0A);opacity:0;margin:0}
.rw-when{margin-top:12px;line-height:1;opacity:0}
.rw-when .d{font-family:var(--display,'Manjari',sans-serif);font-weight:400;font-size:18px;color:var(--gray,#8C8C85)}
.rw-when .t{font-family:var(--display,'Manjari',sans-serif);font-weight:700;font-size:38px;letter-spacing:-.03em;color:var(--ink,#0C0C0A);margin-top:2px}
.rw-amt{font-family:var(--display,'Manjari',sans-serif);font-weight:700;font-size:52px;letter-spacing:-.03em;line-height:1;color:var(--ink,#0C0C0A);margin-top:12px;opacity:0}
.rw-sub{font-size:14px;color:var(--gray,#8C8C85);margin-top:10px;line-height:1.5;opacity:0}
.rw-sub b{color:var(--ink,#0C0C0A);font-weight:600}

/* карточка сухого результата */
.rw-info{width:100%;padding:14px 18px 24px;opacity:0}
.rw-card{position:relative;overflow:hidden;text-align:left;background:var(--white,#fff);border:1px solid var(--line,#E5E5DF);border-radius:22px;padding:4px 16px 8px;box-shadow:0 10px 28px rgba(12,12,10,.07)}
.rw-card.pad-top{padding-top:15px}
.rw-card::after{content:"";position:absolute;right:-50px;top:-50px;width:180px;height:180px;border-radius:50%;background:radial-gradient(circle,#C8FB4626,transparent 70%);pointer-events:none}
.rw-eyebrow{display:flex;align-items:center;gap:8px;font-size:10.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--gray,#8C8C85);padding:13px 0 3px;position:relative;z-index:1}
.rw-eyebrow .dot{width:6px;height:6px;border-radius:50%;background:var(--lime,#C8FB46);flex:0 0 auto}
.rw-tags{display:flex;align-items:center;gap:7px;margin-top:12px;position:relative;z-index:1;flex-wrap:wrap}
.rw-tag{display:inline-flex;align-items:center;gap:5px;font-size:10.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;padding:5px 11px;border-radius:999px}
.rw-tag.lime{background:var(--lime,#C8FB46);color:var(--ink,#0C0C0A)}
.rw-tag.soft{background:var(--paper,#F4F4F1);color:var(--gray,#8C8C85);border:1px solid var(--line,#E5E5DF)}
.rw-tag.ok{background:#E7F2E2;color:#3B7A2A}
.rw-tag.amber{background:#FAEED5;color:#C77A1E}
.rw-tag svg{width:12px;height:12px;fill:none;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.rw-tag.ok svg{stroke:#3B7A2A}
.rw-master{display:flex;align-items:center;gap:11px;margin-top:13px;padding-bottom:13px;border-bottom:1px solid var(--line,#E5E5DF);position:relative;z-index:1}
.rw-mav{width:40px;height:40px;border-radius:12px;background:linear-gradient(150deg,#E9FF92,var(--lime,#C8FB46) 55%,#A9DE22);display:grid;place-items:center;font-family:var(--display,'Manjari',sans-serif);font-weight:700;color:var(--ink,#0C0C0A);font-size:17px;flex-shrink:0;overflow:hidden;background-size:cover;background-position:center}
.rw-master .mi{min-width:0;flex:1}
.rw-master .mi b{display:block;font-size:14px;font-weight:600;line-height:1.2;color:var(--ink,#0C0C0A)}
.rw-master .mi span{display:block;font-size:11.5px;color:var(--gray,#8C8C85);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rw-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid var(--line,#E5E5DF);position:relative;z-index:1}
.rw-row:last-child{border-bottom:none}
.rw-row span{font-size:12.5px;color:var(--gray,#8C8C85);flex-shrink:0}
.rw-row b{font-size:13.5px;font-weight:600;text-align:right;letter-spacing:-.01em;color:var(--ink,#0C0C0A)}
.rw-row.total{padding-top:13px}
.rw-row.total span{font-weight:600;color:var(--ink,#0C0C0A)}
.rw-row.total b{font-family:var(--display,'Manjari',sans-serif);font-weight:700;font-size:23px;letter-spacing:-.02em}
.rw-note{margin:12px 4px 0;text-align:center;font-size:12px;color:var(--gray,#8C8C85);line-height:1.5}

/* кнопки-действия */
.rw-acts{margin-top:15px;display:flex;flex-direction:column;gap:9px;position:relative;z-index:1}
.rw-act{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;height:54px;border-radius:999px;font-family:var(--ui,'Inter',sans-serif);font-weight:600;font-size:14.5px;text-decoration:none;cursor:pointer;border:none;transition:transform .06s ease,box-shadow .2s ease,background .15s ease}
.rw-act svg{width:18px;height:18px;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.rw-act:active{transform:translateY(1px)}
.rw-act.lime{background:var(--lime,#C8FB46);color:var(--ink,#0C0C0A);box-shadow:0 10px 24px rgba(200,251,70,.34)}
.rw-act.lime svg{stroke:var(--ink,#0C0C0A)}
.rw-act.lime:active{background:var(--lime-deep,#B6EC30)}
.rw-act.outline{background:var(--white,#fff);border:1.5px solid var(--line,#E5E5DF);color:var(--ink,#0C0C0A)}
.rw-act.outline svg{stroke:var(--ink,#0C0C0A)}
.rw-act.outline:active{background:var(--paper,#F4F4F1)}

/* ── keyframes ── */
@keyframes rwPos{0%{transform:translateY(150px) scale(0)}13%{transform:translateY(150px) scale(1.16)}19%{transform:translateY(150px) scale(1)}64%{transform:translateY(150px) scale(1)}80%{transform:translateY(0) scale(.66)}87%{transform:translateY(-6px) scale(.70)}100%{transform:translateY(0) scale(.68)}}
@keyframes rwBurst{0%{opacity:0}9%{opacity:1}64%{opacity:1}80%{opacity:0}100%{opacity:0}}
@keyframes rwRays{from{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}
@keyframes rwGlow{0%,100%{transform:translate(-50%,-50%) scale(.9)}50%{transform:translate(-50%,-50%) scale(1.08)}}
@keyframes rwRing{0%{transform:translate(-50%,-50%) scale(.25);opacity:0}14%{opacity:.6}100%{transform:translate(-50%,-50%) scale(2.6);opacity:0}}
@keyframes rwRise{0%{transform:translateY(16px);opacity:0}100%{transform:translateY(0);opacity:1}}
.rw-play .rw-hero{opacity:1;animation:rwPos 3s cubic-bezier(.4,0,.2,1) both}
.rw-play .rw-burst{animation:rwBurst 3s ease-out both}
.rw-play .rw-rays{animation:rwRays 9s linear infinite}
.rw-play .rw-glow{animation:rwGlow 2.4s ease-in-out infinite}
.rw-play .rw-ring{animation:rwRing 1.15s cubic-bezier(.2,.6,.3,1) .12s both}
.rw-play .rw-ring.r2{animation-delay:.36s}
.rw-play .rw-h{animation:rwRise .5s ease-out 2.55s both}
.rw-play .rw-when{animation:rwRise .5s ease-out 2.62s both}
.rw-play .rw-amt{animation:rwRise .5s ease-out 2.66s both}
.rw-play .rw-sub{animation:rwRise .5s ease-out 2.74s both}
.rw-play .rw-info{animation:rwRise .55s ease-out 2.9s both}
.rw-frozen .rw-burst *{animation:none !important}

@media (prefers-reduced-motion:reduce){
  .rw-play .rw-hero,.rw-play .rw-h,.rw-play .rw-when,.rw-play .rw-amt,.rw-play .rw-sub,.rw-play .rw-info{animation:none !important;opacity:1 !important;transform:none !important}
  .rw-play .rw-burst{opacity:0 !important}
}
