.profile-progress-card {
  --progress: 0%;
  --woman-progress-ratio: 434 / 960;
  --woman-progress-mask: url("/assets/progress/woman-mask.webp?v=3.0.83");
  --profile-progress-highlight: color-mix(in srgb, var(--accent) 80%, var(--accent-light));
  --silhouette-accent: var(--accent);
  --silhouette-accent-light: var(--accent-light);
  --silhouette-accent-dark: var(--accent-dark);
  --silhouette-glow: color-mix(in srgb, var(--accent) 25%, transparent);
  --silhouette-reward-glow: 0;
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: 100%;
  min-height: clamp(190px, 40vw, 340px);
  aspect-ratio: 1.7 / 1;
  margin: var(--spacing-5) 0;
  overflow: hidden;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  /* Preserve the reference's orbital framing. No enlarged right-side crop or
     heavy wash: the artwork already reserves a dark left area for live text. */
  background: linear-gradient(90deg, color-mix(in srgb, var(--app-bg) 14%, transparent), color-mix(in srgb, var(--app-bg) 5%, transparent) 45%, transparent 75%), url("/assets/progress/progress-bg.webp?v=3.0.83"), var(--app-bg);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat;
  box-shadow: inset 0 1px 12px color-mix(in srgb, var(--accent) 8%, transparent), 0 0 20px color-mix(in srgb, var(--accent-dark) 8%, transparent);
  font-family: inherit;
}
/* Geometry is immediate in every mode. The design system's reduced-motion
   duration must not briefly tween parent padding/insets during a measurement.
   Progress/reward animation is owned by the component's JS, not CSS transitions. */
.profile-progress-card, .profile-progress-card * { transition-property: none; }
.profile-progress-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 42%;
  height: 100%;
  min-height: inherit;
  padding: clamp(var(--spacing-4), 4.8vw, var(--spacing-7));
  padding-right: 0;
}
.profile-progress-copy h2 {
  max-width: 100%;
  margin: 0 0 clamp(var(--spacing-3), 3.6vw, var(--spacing-6));
  color: var(--text-primary);
  font-family: inherit;
  font-size: clamp(19px, 4.3vw, 40px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.025em;
}
.profile-progress-percent {
  max-width: 100%;
  color: var(--accent-light);
  font-family: inherit;
  font-size: clamp(40px, 10.8vw, 80px);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px color-mix(in srgb, var(--accent) 20%, transparent);
}
.profile-progress-completed {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-1);
  max-width: 100%;
  margin-top: clamp(var(--spacing-2), 2.5vw, var(--spacing-4));
  color: var(--accent-light);
  font-size: clamp(12px, 3.4vw, 20px);
  line-height: 1.23;
  overflow-wrap: anywhere;
}
.profile-progress-completed strong { font-weight: 700; }
.profile-progress-art {
  position: absolute;
  z-index: 1;
  inset: 0 5% 0 33%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.4% 3% 3.5%;
  pointer-events: none;
}
.profile-progress-atmosphere { position: absolute; inset: 0; overflow: hidden; }
.profile-progress-atmosphere::before {
  content: none;
}
.profile-progress-atmosphere::after {
  content: "";
  position: absolute;
  inset: 79% 3% 1%;
  background: radial-gradient(ellipse at 54% 65%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 68%);
}
.woman-progress {
  position: relative;
  isolation: isolate;
  height: 100%;
  max-width: 100%;
  aspect-ratio: var(--woman-progress-ratio);
  flex: 0 0 auto;
  translate: var(--silhouette-offset-x, 0px) 0;
  /* Global reduced-motion rules set a tiny duration even on elements that
     normally have none. Alignment must never become an in-flight transition. */
  transition-property: none;
}
.woman-progress-base, .woman-progress-fill, .woman-progress-outline, .woman-progress-reward {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
}
.woman-progress-base, .woman-progress-fill, .woman-progress-reward {
  display: none;
  -webkit-mask-image: var(--woman-progress-mask);
  mask-image: var(--woman-progress-mask);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  mask-mode: alpha;
}
.woman-progress-base {
  z-index: 1;
  background: color-mix(in srgb, var(--accent-dark) 14%, var(--app-bg));
  filter: drop-shadow(0 0 .35px var(--accent-light)) drop-shadow(0 0 1px color-mix(in srgb, var(--accent) 25%, transparent));
}
.woman-progress-fill {
  z-index: 2;
  /* Local luminosity texture stays inside the body/tail alpha and moves with
     neither the fill height nor the viewport: progress reveals, not stretches.
     A light brand tint preserves violet in the brightest texture regions. */
  background-image: linear-gradient(color-mix(in srgb, var(--accent) 18%, transparent), color-mix(in srgb, var(--accent) 18%, transparent)), url("/assets/progress/fill-texture.webp?v=3.0.83"), radial-gradient(ellipse at 62% 85%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 46%), linear-gradient(to top, var(--profile-progress-highlight), var(--accent) 15%, var(--accent) 49%, var(--accent-dark) 83%, color-mix(in srgb, var(--accent-dark) 75%, var(--app-bg)));
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  /* Luminosity texture stays visible; the color wash no longer screens the
     lower body toward white, including at small progress values. */
  background-blend-mode: normal, overlay, normal, normal;
  -webkit-clip-path: inset(calc(100% - var(--progress)) 0 0 0);
  clip-path: inset(calc(100% - var(--progress)) 0 0 0);
  filter: drop-shadow(0 0 2px color-mix(in srgb, var(--accent-light) 35%, transparent));
  transition: none;
}
.woman-progress-outline {
  z-index: 3;
  object-fit: contain;
  object-position: center;
  opacity: .9;
  /* Measured front-raster rim ~268deg; the brand accent/light is ~249–254deg.
     Correct the raster only, then add unrotated theme-colored light. */
  filter: hue-rotate(-16deg) saturate(.7) brightness(1.08) drop-shadow(0 0 .25px var(--silhouette-accent-light)) drop-shadow(0 0 1.1px var(--silhouette-glow));
}
.woman-progress-reward {
  z-index: 4;
  background-image: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--accent-light) 80%, transparent), transparent);
  background-size: 100% 14%;
  background-repeat: no-repeat;
  background-position: center var(--silhouette-sweep, -20%);
  opacity: calc(var(--silhouette-reward-glow) * .70);
  pointer-events: none;
}
.has-progress-mask .woman-progress-outline { mix-blend-mode: screen; }
.woman-progress::after {
  content: "";
  position: absolute;
  z-index: 0;
  bottom: -.8%;
  /* Front-view feet are centered at ~41% of this body/cloth/tail frame. */
  left: -14%;
  width: 110%;
  height: 5%;
  border: 1px solid color-mix(in srgb, var(--accent-light) 30%, transparent);
  border-radius: 50%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
  box-shadow: 0 0 9px color-mix(in srgb, var(--accent) 18%, transparent);
}
.silhouette-progress-canvas {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: none;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  pointer-events: none;
  contain: strict;
}
.has-silhouette-webgl > .silhouette-progress-canvas { display: block; }
.has-silhouette-webgl > .woman-progress-fill { opacity: 0; }
.has-silhouette-webgl > .woman-progress-reward { display: none; }
.is-silhouette-reward .woman-progress-outline {
  filter: hue-rotate(-16deg) saturate(.7) brightness(calc(1.08 + var(--silhouette-reward-glow) * .28)) drop-shadow(0 0 .5px var(--silhouette-accent-light)) drop-shadow(0 0 2.6px var(--silhouette-glow));
}
.profile-progress-card[data-progress-percent="0"] .woman-progress::after { opacity: .4; }
@supports ((mask-image: url("/assets/progress/woman-mask.webp?v=3.0.83")) or (-webkit-mask-image: url("/assets/progress/woman-mask.webp?v=3.0.83"))) {
  .has-progress-mask .woman-progress-base, .has-progress-mask .woman-progress-fill, .has-progress-mask .woman-progress-reward { display: block; }
  .has-progress-mask .has-silhouette-webgl > .woman-progress-reward { display: none; }
}
/* JavaScript drives the CSS fallback and shader from the same number. A second
   clip-path transition would desynchronize the percentage and fill. */
@media (min-width: 768px) {
  .profile-progress-card { min-height: 270px; aspect-ratio: 1.85 / 1; max-height: 520px; }
  .profile-progress-copy { padding-left: var(--spacing-7); }
}
@media (max-width: 359px) {
  .profile-progress-copy { width: 43%; padding-left: var(--spacing-4); }
  .profile-progress-copy h2 { font-size: 19px; }
  .profile-progress-percent { font-size: 38px; }
  .profile-progress-completed { font-size: 12px; }
  .profile-progress-art { left: 36%; padding-inline: 2%; }
}
@media (prefers-reduced-motion: reduce) {
  .profile-progress-card.is-progress-animating .woman-progress-fill { transition: none; }
}
