.cq-badge{position:relative;isolation:isolate}
.cq-badge-ico{display:block;line-height:var(--lh-none)}
.cq-spark{position:absolute;left:50%;top:50%;width:8px;height:8px;margin:-4px 0 0 -4px;border-radius:2px;
  background:var(--brand-500);opacity:0;pointer-events:none;z-index:-1}
.cq-spark:nth-of-type(1){--a:0deg}
.cq-spark:nth-of-type(2){--a:45deg;background:var(--xp-500)}
.cq-spark:nth-of-type(3){--a:90deg;background:var(--gem-500)}
.cq-spark:nth-of-type(4){--a:135deg;border-radius:50%}
.cq-spark:nth-of-type(5){--a:180deg;background:var(--xp-500)}
.cq-spark:nth-of-type(6){--a:225deg;background:var(--bad-500);border-radius:50%}
.cq-spark:nth-of-type(7){--a:270deg}
.cq-spark:nth-of-type(8){--a:315deg;background:var(--gem-500);border-radius:50%}
.cq-badge::after{content:"";position:absolute;inset:0;border-radius:50%;border:3px solid var(--brand-500);opacity:0;pointer-events:none}

@keyframes cq-pop{0%{transform:scale(.4);opacity:0}60%{transform:scale(1.12);opacity:1}100%{transform:scale(1);opacity:1}}
@keyframes cq-rise{from{transform:translateY(12px);opacity:0}to{transform:none;opacity:1}}
@keyframes cq-spark{0%{transform:rotate(var(--a)) translateY(0) scale(1);opacity:1}
  100%{transform:rotate(var(--a)) translateY(-74px) scale(.2);opacity:0}}
@keyframes cq-ring{from{transform:scale(.85);opacity:.8}to{transform:scale(1.9);opacity:0}}
@keyframes cq-beat{0%,100%{transform:scale(1)}30%{transform:scale(1.28)}60%{transform:scale(.94)}}

.cq-celebrate .cq-badge{animation:cq-pop var(--dur-4) var(--ease-pop) both}
.cq-celebrate .cq-spark{animation:cq-spark var(--dur-4) var(--ease-out) .18s both}
.cq-celebrate .cq-badge::after{animation:cq-ring var(--dur-4) ease-out .12s both}
.cq-celebrate .cq-rise,.cq-enter .cq-rise{animation:cq-rise var(--dur-3) var(--ease-out) both}
.cq-beat{animation:cq-beat var(--dur-3) ease-out}

@media (prefers-reduced-motion:reduce){
  .cq-celebrate .cq-badge,.cq-celebrate .cq-spark,.cq-celebrate .cq-badge::after,
  .cq-celebrate .cq-rise,.cq-enter .cq-rise,.cq-beat{animation:none}
}

.cq-console{display:block;max-width:340px;margin:-4px auto 16px;padding:12px 16px;text-align:left;border-radius:var(--r-md);
  background:var(--code-bg);color:var(--code-text);font-family:var(--font-mono);font-size:var(--fs-14);line-height:var(--lh-text);white-space:pre-wrap;overflow-wrap:anywhere}
.cq-line{display:block}
.cq-line.muted{color:var(--code-muted)}
.cq-line.ok{color:var(--code-pass);font-weight:800;letter-spacing:var(--track-caps)}
.cq-line.fail{color:var(--code-fail);font-weight:800;letter-spacing:var(--track-caps)}
#view-result.has-console .cq-badge{display:none}
@keyframes cq-type{from{opacity:0;transform:translateX(-6px)}to{opacity:1;transform:none}}
.cq-celebrate .cq-line{animation:cq-type var(--dur-2) ease-out both}
.hearts-fill{width:auto!important;padding:0 18px;border-radius:var(--r-pill)!important;gap:2px;grid-auto-flow:column;font-size:var(--fs-26)!important;background:var(--bad-100)!important}
.hearts-fill i{font-style:normal;display:inline-block;animation:cq-pop var(--dur-3) var(--ease-pop) both}
@media (prefers-reduced-motion:reduce){.cq-celebrate .cq-line,.hearts-fill i{animation:none}}

.cq-badge-svg{display:block;width:52px;height:52px;color:var(--xp-600)}

.cq-line.ok{position:relative;display:inline-block;isolation:isolate}
.cq-line.ok .cq-spark{left:5ch}
.cq-celebrate .cq-line.ok .cq-spark{animation:cq-spark var(--dur-4) var(--ease-out) var(--spark-delay,900ms) both}
.cq-celebrate .cq-console{animation:cq-pass var(--dur-4) var(--ease-out) var(--console-end,1.1s) both}
@keyframes cq-pass{40%{box-shadow:0 0 0 6px color-mix(in srgb,var(--code-pass) 35%,transparent)}100%{box-shadow:0 0 0 0 transparent}}
.cq-enter .cq-console{animation:cq-fail var(--dur-3) var(--ease-out) var(--console-end,1.1s) both}
@keyframes cq-fail{30%{transform:translateX(-4px)}60%{transform:translateX(4px)}100%{transform:none}}
@media (prefers-reduced-motion:reduce){.cq-celebrate .cq-console,.cq-enter .cq-console,.cq-line .cq-spark{animation:none!important}}
@media (max-width:420px){.cq-console{font-size:var(--fs-12)}}

.cq-celebrate .ach-ico{animation:cq-pop var(--dur-3) var(--ease-pop) var(--ach-delay,1.4s) both}
#view-result.streak-mode > :not(#streak-screen):not(#result-actions){display:none}
.streak-screen{display:grid;justify-items:center;gap:10px;padding:12px 0 22px;animation:cq-rise var(--dur-3) var(--ease-out) both}
.streak-screen:focus{outline:0}
.streak-hero{position:relative;line-height:0}
.streak-screen .streak-flame{width:112px;height:112px;font-size:112px;animation:cq-pop var(--dur-3) var(--ease-pop) .1s both}
.streak-hero{display:grid;justify-items:center}
.streak-hero .cq-mascot{position:relative;margin-top:-30px;width:72px;height:72px;animation:cq-rise var(--dur-3) var(--ease-out) .35s both}
.streak-day{margin:0;font-size:var(--fs-44);font-weight:900;letter-spacing:var(--track-tight);color:var(--ink-900);line-height:var(--lh-none)}
.streak-msg{margin:0;max-width:34ch;font-size:var(--fs-16);color:var(--ink-700)}
.streak-cmd{margin:6px 0 0;font:600 var(--fs-14)/var(--lh-text) var(--font-mono);color:var(--code-text);background:var(--code-bg);
  border-radius:var(--r-md);padding:10px 16px;text-align:left;white-space:pre}
.streak-cmd .m{color:var(--code-muted)}
.streak-week{display:flex;gap:10px;margin:8px 0 0;list-style:none;padding:0}
.streak-week li{display:grid;justify-items:center;gap:6px;font-size:var(--fs-12);font-weight:800;color:var(--ink-500)}
.streak-week i{width:14px;height:14px;border-radius:50%;background:var(--ink-200)}
.streak-week .on i{background:var(--warn-500)}
.streak-week .today{color:var(--ink-900)}
.btn-share{margin:14px 0 0;border:0;border-radius:var(--r-pill,999px);padding:12px 22px;cursor:pointer;color:#fff;
  font:800 var(--fs-16) var(--font-ui);background:linear-gradient(90deg,#f58529,#dd2a7b 55%,#8134af);box-shadow:0 6px 16px rgba(221,42,123,.25)}
.btn-share:hover{filter:brightness(1.05)}
.btn-share:focus-visible{outline:3px solid var(--ink-900);outline-offset:3px}
.btn-share:disabled{opacity:.75;cursor:progress}
.streak-week .today i{animation:cq-beat var(--dur-3) var(--ease-pop) .45s both;box-shadow:0 0 0 4px color-mix(in srgb,var(--warn-500) 25%,transparent)}
@media (prefers-reduced-motion:reduce){.cq-celebrate .ach-ico,.streak-screen,.streak-screen .streak-flame,.streak-hero .cq-mascot,.streak-week .today i{animation:none}}

#view-result.streak-mode{min-height:calc(100dvh - 120px);display:grid;align-content:center;
  background:radial-gradient(120% 60% at 50% 0%,color-mix(in srgb,var(--warn-500) 16%,transparent),transparent 70%),var(--surface)}
.streak-day{font-variant-numeric:tabular-nums}
.streak-day .n{display:inline-block}
.streak-day .n.tick{animation:cq-pop var(--dur-3) var(--ease-pop) both}
.cq-skip *,.cq-skip *::before,.cq-skip *::after{animation-duration:1ms!important;animation-delay:0s!important;transition:none!important}
@media (prefers-reduced-motion:reduce){.streak-day .n.tick{animation:none}}
