/* Ascend Combat Feedback kit v1 (17 Nov 2026)
   Presentation only. Colours and lettering are theme variables for Tobi to set:
   --cf-font, --cf-damage, --cf-heal, --cf-guard, --cf-outline,
   --cf-size-light, --cf-size-medium, --cf-size-heavy, --cf-z                */

.cf-layer {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: var(--cf-z, 50);
}

.cf-num {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--cf-font, inherit);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  color: var(--cf-damage, #ffffff);
  text-shadow:
    -2px 0 var(--cf-outline, #14182b), 2px 0 var(--cf-outline, #14182b),
    0 -2px var(--cf-outline, #14182b), 0 2px var(--cf-outline, #14182b),
    0 3px 6px rgba(0, 0, 0, 0.45);
  will-change: transform, opacity;
  -webkit-user-select: none;
  user-select: none;
}

.cf-light  { font-size: var(--cf-size-light, 18px); }
.cf-medium { font-size: var(--cf-size-medium, 30px); }
.cf-heavy  { font-size: var(--cf-size-heavy, 46px); }
.cf-tick   { font-size: var(--cf-size-light, 18px); }
.cf-heal   { color: var(--cf-heal, #b9f5c4); }

.cf-word { font-size: 22px; }
.cf-miss {
  font-size: 32px;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* One brief flash on the character that was hit. Never the whole screen. */
.cf-flash { filter: brightness(1.9) saturate(0.6) !important; }

.cf-ring {
  position: absolute;
  box-sizing: border-box;
  border-radius: 50%;
  border: 5px solid var(--cf-guard, #f5f0c8);
  transform: translate(-50%, -50%);
}
.cf-ring-heal { border-color: var(--cf-heal, #b9f5c4); }

.cf-streak {
  position: absolute;
  height: 6px;
  border-radius: 3px;
  background: var(--cf-guard, #f5f0c8);
  transform-origin: left center;
}

.cf-ghost {
  position: absolute;
  box-sizing: border-box;
  border: 2px dashed rgba(255, 255, 255, 0.75);
  border-radius: 12px;
}

/* Lasting marks on a character follow the sprite's own outline, so they work
   on transparent pixel art. A shield is a hard outline; a status effect is a
   glow in that effect's colour. Both can show at once. */
.cf-shielded,
.cf-fx {
  filter: var(--cf-shield-f, drop-shadow(0 0 0 transparent)) var(--cf-fx-f, drop-shadow(0 0 0 transparent));
}
.cf-shielded {
  --cf-shield-f: drop-shadow(3px 0 0 var(--cf-guard, #f5f0c8)) drop-shadow(-3px 0 0 var(--cf-guard, #f5f0c8))
    drop-shadow(0 3px 0 var(--cf-guard, #f5f0c8)) drop-shadow(0 -3px 0 var(--cf-guard, #f5f0c8));
}
.cf-fx { --cf-fx-f: drop-shadow(0 0 8px var(--cf-fx-color, #ffffff)); }
[data-cf-level="full"] .cf-fx { animation: cf-glow 1.8s ease-in-out infinite; }
@keyframes cf-glow {
  50% {
    filter: var(--cf-shield-f, drop-shadow(0 0 0 transparent)) drop-shadow(0 0 15px var(--cf-fx-color, #ffffff));
  }
}
/* Hidden or invisible: the character fades but stays readable. */
.cf-hidden { opacity: 0.4; }

/* The token that carries an effect from whoever cast it. */
.cf-badge {
  position: absolute;
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cf-outline, #14182b);
  border: 3px solid var(--cf-fx-color, var(--cf-guard, #f5f0c8));
  color: #ffffff;
  font-family: var(--cf-font, inherit);
  font-weight: 800;
  font-size: 15px;
}
.cf-badge > * { width: 20px; height: 20px; }
.cf-fxword { display: inline-flex; align-items: center; gap: 6px; }
.cf-fxword > * { width: 22px; height: 22px; }
.cf-cap { display: block; font-size: 0.55em; text-align: center; letter-spacing: 0.03em; margin-bottom: 2px; }

/* The health bar acknowledges the number arriving. */
.cf-bar-land { box-shadow: 0 0 0 4px var(--cf-guard, #f5f0c8); }

/* Several answers: the track above the Ascender. A slot is told apart by
   shape and content as well as colour: dashed and empty, filled with a
   number, or a solid ring with a dash. */
.cf-slot,
.cf-pip {
  position: absolute;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cf-slot { border: 2px dashed rgba(255, 255, 255, 0.55); }
.cf-pip {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--cf-font, inherit);
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
}
.cf-pip-hit { background: var(--cf-guard, #f5f0c8); color: var(--cf-outline, #14182b); }
.cf-pip-miss {
  border: 2px solid var(--cf-guard, #f5f0c8);
  color: var(--cf-guard, #f5f0c8);
  background: rgba(20, 24, 43, 0.6);
}
.cf-tick-miss { font-style: italic; font-size: 14px; }
