/* ==========================================================================
   Sequência de dias (5.3): chama animada, semana de segunda a domingo, folga da semana,
   comemoração ao estudar e aviso de sequência em risco. Animações desligam com "reduzir movimento".
   ========================================================================== */
.h-streak { --fl-a: #FF9A3C; --fl-b: #FF5A3C; --fl-c: #FFE08A; overflow: hidden;
  background: radial-gradient(90% 120% at 0% 0%, color-mix(in srgb, var(--fl-a) 16%, transparent), transparent 60%), var(--surface); }
.h-streak.is-risk { background: radial-gradient(90% 120% at 0% 0%, color-mix(in srgb, var(--warn) 14%, transparent), transparent 60%), var(--surface);
  border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.h-streak.is-zero, .h-streak.is-rest { --fl-a: #B9B4D6; --fl-b: #8F89B5; --fl-c: #E7E4F7; }

.st-folga { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .6875rem; font-weight: 700; white-space: nowrap;
  color: var(--accent); background: var(--accent-soft); }
.st-folga svg { width: 13px; height: 13px; fill: currentColor; }
.st-folga.used { color: var(--muted); background: var(--surface-2); }

.st-main { display: flex; align-items: center; gap: 14px; }
.st-flame { position: relative; width: 62px; height: 76px; flex: none; transform-origin: 50% 90%; transform: scale(calc(.82 + var(--heat, .5) * .25)); }
.st-flame::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 60px; height: 14px; margin-left: -30px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--fl-b) 35%, transparent), transparent); }
.st-flame-svg { position: relative; z-index: 1; width: 100%; height: 100%; overflow: visible; }
.st-flame-svg path { transform-origin: 50% 100%; }
.st-flame-svg .f1 { fill: var(--fl-b); animation: st-flick 1.6s ease-in-out infinite; }
.st-flame-svg .f2 { fill: var(--fl-a); animation: st-flick 1.2s ease-in-out -.4s infinite; }
.st-flame-svg .f3 { fill: var(--fl-c); animation: st-flick .9s ease-in-out -.2s infinite; }
.h-streak.is-safe .st-flame { animation: st-pop .7s cubic-bezier(.2, .9, .3, 1.5) .3s both; }
.h-streak.is-risk .st-flame { animation: st-wobble 2.4s ease-in-out infinite; }
.h-streak.is-risk .st-flame-svg { filter: saturate(.55); }
.st-num { display: grid; }
.st-num b { font-family: var(--font-display); font-size: 3rem; line-height: .95; letter-spacing: -.02em; animation: st-count .6s cubic-bezier(.2, .9, .3, 1.3) .2s both; }
.st-num span { font-size: .875rem; color: var(--muted); font-weight: 600; }
.h-streak.is-safe .st-num b { background: linear-gradient(180deg, var(--fl-a), var(--fl-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.st-week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) repeat(2, minmax(0, .7fr)); gap: 6px; }
.st-week li { display: grid; justify-items: center; gap: 4px; animation: pace-in .45s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: calc(.25s + var(--d) * .06s); }
.st-week small { font-size: .6875rem; font-weight: 700; color: var(--muted); }
.sw-dot { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 1.5px dashed var(--line); color: #fff; }
.sw-dot svg { width: 17px; height: 17px; fill: currentColor; }
.st-week .we .sw-dot { width: 24px; height: 24px; }
.st-week .sw-on .sw-dot { border: 0; background: linear-gradient(160deg, var(--fl-a), var(--fl-b)); box-shadow: 0 6px 14px -6px var(--fl-b); }
.st-week .sw-folga .sw-dot { border: 0; background: var(--accent-soft); color: var(--accent); }
.st-week .sw-today .sw-dot { border: 2px solid var(--fl-b); background: var(--surface); animation: st-ring 1.8s ease-out infinite; }
.st-week .sw-today small { color: var(--ink); }
.h-streak.is-risk .st-week .sw-today .sw-dot { border-color: var(--warn); }
.st-week .sw-next .sw-dot { opacity: .6; }

.st-goal { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.st-goal i { display: block; height: 100%; width: var(--w); border-radius: 99px; background: linear-gradient(90deg, var(--fl-a), var(--fl-b)); transform-origin: left; animation: h-grow 1s .4s cubic-bezier(.2, .8, .2, 1) both; }
.st-msg { margin: 0; font-size: .875rem; color: var(--muted); }
.st-msg b { color: var(--ink); }

@keyframes st-flick { 0%, 100% { transform: scale(1, 1) skewX(0); } 30% { transform: scale(.96, 1.05) skewX(-2deg); } 60% { transform: scale(1.03, .96) skewX(2deg); } }
@keyframes st-pop { from { transform: scale(.3); opacity: 0; } }
@keyframes st-wobble { 0%, 100% { rotate: 0deg; } 25% { rotate: -6deg; } 75% { rotate: 6deg; } }
@keyframes st-count { from { transform: translateY(12px); opacity: 0; } }
@keyframes st-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fl-b) 45%, transparent); } 80%, 100% { box-shadow: 0 0 0 8px transparent; } }

/* ---------- Comemoração: estudou hoje, a sequência cresceu ---------- */
.st-cheer { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; pointer-events: none; background: color-mix(in srgb, #0E0C24 55%, transparent); animation: st-fade 3.6s ease forwards; }
.st-cheer-card { --fl-a: #FF9A3C; --fl-b: #FF5A3C; --fl-c: #FFE08A; display: grid; justify-items: center; gap: 8px; padding: 28px 34px 22px; border-radius: 28px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); text-align: center; animation: st-rise .6s cubic-bezier(.2, .9, .3, 1.3) both; max-width: min(92vw, 360px); }
.st-cheer .st-flame { width: 96px; height: 118px; transform: none; animation: st-pop .8s cubic-bezier(.2, .9, .3, 1.6) .1s both; }
.st-cheer b.st-big { font-family: var(--font-display); font-size: 3.5rem; line-height: 1; background: linear-gradient(180deg, var(--fl-a), var(--fl-b)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: st-count .6s cubic-bezier(.2, .9, .3, 1.5) .35s both; }
.st-cheer p { margin: 0; color: var(--muted); }
.st-cheer strong { font-size: 1.125rem; }
.st-spark { position: absolute; width: 8px; height: 8px; border-radius: 2px; background: var(--c); left: 50%; top: 50%; animation: st-spark 1.2s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(.2s + var(--k) * .02s); }
@keyframes st-spark { from { transform: translate(-50%, -50%) scale(.4); opacity: 1; } to { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(220deg) scale(1); opacity: 0; } }
@keyframes st-rise { from { transform: translateY(30px) scale(.9); opacity: 0; } }
@keyframes st-fade { 0% { opacity: 0; } 8%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
  .st-flame, .st-flame-svg path, .st-week li, .st-week .sw-today .sw-dot, .st-goal i, .st-num b, .st-cheer-card, .st-spark { animation: none !important; }
}
