/* ============================================================
   COALRIDGE — The Charcoal Code Masterclass
   Brand: Charcoal #2B3139 · Ash #C4BEBC · White #FFFFFF · Fire #E46A55
   Type:  Raleway (headers) · Open Sans (body)
   ============================================================ */

@font-face {
  font-family: "Raleway";
  src: url("assets/Raleway.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("assets/OpenSans.ttf") format("truetype-variations");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  /* Brand */
  --charcoal: #2B3139;
  --charcoal-2: #242a31;
  --charcoal-deep: #1b2026;
  --charcoal-ink: #141a1f;
  --ash: #C4BEBC;
  --ash-dim: #8d8987;
  --white: #FFFFFF;
  --fire: #E46A55;          /* tweakable */
  --fire-soft: color-mix(in oklab, var(--fire) 22%, transparent);
  --fire-glow: color-mix(in oklab, var(--fire) 55%, transparent);

  /* Surfaces */
  --panel: #2f363f;
  --panel-2: #353d47;
  --line: rgba(196, 190, 188, 0.18);
  --line-strong: rgba(196, 190, 188, 0.4);

  /* Type */
  --head: "Raleway", system-ui, sans-serif;   /* tweakable */
  --body: "Open Sans", system-ui, sans-serif;  /* tweakable */

  /* Shape */
  --radius: 14px;            /* tweakable */
  --radius-sm: calc(var(--radius) * 0.55);
  --radius-lg: calc(var(--radius) * 1.5);

  /* Motion */
  --t-fast: 0.18s;
  --t-med: 0.34s;
  --t-slow: 0.6s;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --maxw: 660px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--charcoal-deep);
  color: var(--white);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#root { min-height: 100vh; }

/* App background — subtle ember warmth at the foot of the scroll */
.cc-app {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(120% 60% at 50% -10%, #2f363f 0%, var(--charcoal-deep) 60%),
    var(--charcoal-deep);
  overflow-x: clip;
}

/* ---------- Typography ---------- */
.cc-kicker {
  font-family: var(--head);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fire);
}
.cc-h1 {
  font-family: var(--head);
  font-weight: 800;
  font-size: clamp(2.1rem, 9vw, 3.1rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0;
}
.cc-h2 {
  font-family: var(--head);
  font-weight: 800;
  font-size: clamp(1.5rem, 6vw, 2rem);
  line-height: 1.02;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin: 0;
}
.cc-h3 {
  font-family: var(--head);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}
.cc-body { font-size: 1.02rem; line-height: 1.62; color: rgba(255,255,255,0.92); }
.cc-muted { color: var(--ash); }
.cc-spaced { letter-spacing: 0.34em; text-transform: uppercase; }

/* ---------- Layout ---------- */
.cc-section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.4rem, 8vw, 4.2rem) clamp(1.1rem, 5vw, 1.7rem);
}
.cc-stack { display: flex; flex-direction: column; }

/* ---------- Header / progress ---------- */
.cc-header {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem clamp(0.9rem, 4vw, 1.4rem);
  background: color-mix(in oklab, var(--charcoal-deep) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.cc-header__logo { height: 26px; display: block; }
.cc-header__right { display: flex; align-items: center; gap: 0.7rem; }
.cc-flamemark { height: 26px; width: auto; display: block; }

.cc-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.7rem 0.4rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(0,0,0,0.25);
  cursor: default;
}
.cc-pill__dots { display: flex; gap: 5px; }
.cc-dot {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid var(--ash-dim);
  background: transparent;
  transition: all var(--t-med) var(--ease);
  padding: 0;
}
.cc-dot[data-on="true"] {
  background: var(--fire); border-color: var(--fire);
  box-shadow: 0 0 9px var(--fire-glow);
}
.cc-dot[data-clickable="true"] { cursor: pointer; }
.cc-pill__label {
  font-family: var(--head); font-weight: 700;
  font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ash);
}
.cc-pill__count { color: var(--fire); }

/* ---------- Cards / panels ---------- */
.cc-card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--charcoal-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 22px 50px -28px rgba(0,0,0,0.85);
}
.cc-inset {
  background: rgba(0,0,0,0.24);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

/* Module index badge */
.cc-modnum {
  font-family: var(--head); font-weight: 800;
  font-size: 0.78rem; letter-spacing: 0.1em;
  width: 2.1rem; height: 2.1rem; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid var(--fire);
  color: var(--fire);
}
.cc-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--head); font-weight: 700;
  font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.4rem 0.7rem; border-radius: 999px;
  background: var(--fire); color: var(--white);
}
.cc-chip--ghost { background: transparent; color: var(--ash); border: 1px solid var(--line-strong); }

/* ---------- Buttons ---------- */
.cc-btn {
  appearance: none; border: none; cursor: pointer;
  font-family: var(--head); font-weight: 800;
  font-size: 0.98rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 1.05rem 1.3rem;
  border-radius: var(--radius-sm);
  background-color: var(--fire); color: var(--white);
  box-shadow: 0 10px 26px -10px var(--fire-glow), inset 0 1px 0 rgba(255,255,255,0.18);
  transition: transform var(--t-fast) var(--ease), filter var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast);
  width: 100%;
  touch-action: manipulation;
}
.cc-btn:hover { filter: brightness(1.06); }
.cc-btn:active { transform: scale(0.972); box-shadow: 0 5px 14px -8px var(--fire-glow); }
.cc-btn:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.cc-btn[disabled] { cursor: not-allowed; }

.cc-btn--ghost {
  background-color: transparent; color: var(--white);
  border: 1.5px solid var(--line-strong);
  box-shadow: none;
}
.cc-btn--ghost:hover { border-color: var(--ash); background-color: rgba(255,255,255,0.04); }
.cc-btn--locked { background-color: var(--ash-dim); color: var(--charcoal); box-shadow: none; }

/* ---------- Range sliders ---------- */
.cc-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 30px; background: transparent; cursor: pointer; margin: 0;
  touch-action: pan-y;
}
.cc-range:focus { outline: none; }
.cc-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(255,255,255,0.4), 0 0 14px var(--fire-glow); }
.cc-range::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--fire) var(--fill, 50%), rgba(196,190,188,0.22) var(--fill, 50%));
}
.cc-range::-moz-range-track { height: 8px; border-radius: 999px; background: rgba(196,190,188,0.22); }
.cc-range::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--fire); }
.cc-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 30px; height: 30px; margin-top: -11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #f0f0f0 38%, #cfcccb 100%);
  border: 3px solid var(--fire);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5), 0 0 0 0 var(--fire-glow);
  transition: box-shadow var(--t-fast);
}
.cc-range::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 3px solid var(--fire);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.cc-range:active::-webkit-slider-thumb { box-shadow: 0 4px 12px rgba(0,0,0,0.5), 0 0 16px var(--fire-glow); }

/* ---------- Result cards (slide in beneath modules) ---------- */
.cc-result {
  margin-top: 1.2rem;
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.25rem;
  display: flex; gap: 0.85rem; align-items: flex-start;
  border: 1px solid var(--line);
  background: var(--panel-2);
  animation: ccResultIn var(--t-med) var(--ease) both;
}
@keyframes ccResultIn {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to   { opacity: 1; transform: none; }
}
.cc-result__icon {
  flex: none; width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.1rem; font-weight: 800;
}
.cc-result__title {
  font-family: var(--head); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em; font-size: 0.96rem; margin: 0 0 0.25rem;
}
.cc-result__text { font-size: 0.92rem; line-height: 1.5; color: var(--ash); margin: 0; }

/* success = FIRE + white (strictly on-brand) */
.cc-result--win {
  border-color: var(--fire);
  background: linear-gradient(180deg, color-mix(in oklab, var(--fire) 16%, var(--panel-2)) 0%, var(--panel-2) 70%);
  box-shadow: 0 0 0 1px var(--fire-soft), 0 18px 40px -26px var(--fire-glow);
}
.cc-result--win .cc-result__icon { background: var(--fire); color: var(--white); box-shadow: 0 0 16px var(--fire-glow); }
.cc-result--win .cc-result__title { color: var(--white); }
.cc-result--win .cc-result__text { color: rgba(255,255,255,0.9); }

/* warning / error = "charred" — muted charcoal + ash, fire only as alert accent */
.cc-result--warn {
  border-color: var(--line-strong);
  background: var(--charcoal-ink);
}
.cc-result--warn .cc-result__icon { background: rgba(196,190,188,0.16); color: var(--ash); border: 1px solid var(--line-strong); }
.cc-result--warn .cc-result__title { color: var(--ash); }

.cc-result--info { border-color: var(--line); }
.cc-result--info .cc-result__icon { background: rgba(196,190,188,0.14); color: var(--ash); }

/* ---------- Gauges / readouts ---------- */
.cc-readout {
  font-family: var(--head); font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ---------- Lightbox / field guide modal ---------- */
.cc-lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(0.8rem, 4vw, 1.6rem);
  background: rgba(12, 15, 18, 0.74);
  backdrop-filter: blur(8px) saturate(0.9);
  -webkit-backdrop-filter: blur(8px) saturate(0.9);
}
.cc-lightbox__panel {
  width: 100%; max-height: 90vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--panel) 0%, var(--charcoal-2) 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.9);
  overflow: hidden;
  animation: ccPanelIn 0.32s var(--ease) both;
}
@keyframes ccPanelIn { from { transform: translateY(16px) scale(0.98); } to { transform: none; } }
[data-motion="off"] .cc-lightbox__panel { animation: none; }
.cc-lightbox__head {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--charcoal-deep) 40%, transparent);
}
.cc-lightbox__close {
  flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(0,0,0,0.25);
  color: var(--ash); font-size: 0.9rem; cursor: pointer;
  display: grid; place-items: center;
  transition: all var(--t-fast);
}
.cc-lightbox__close:hover { color: var(--white); border-color: var(--ash); background: rgba(255,255,255,0.06); }
.cc-lightbox__close:focus-visible { outline: 3px solid var(--fire); outline-offset: 2px; }
.cc-lightbox__body {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: clamp(0.9rem, 4vw, 1.3rem);
}

/* Field guide trigger link */
.cc-fg-link {
  width: 100%; margin: 0.2rem 0 1.4rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.18); color: var(--white);
  cursor: pointer; font: inherit; text-align: left;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.cc-fg-link:hover { border-color: var(--line-strong); background: rgba(0,0,0,0.28); }
.cc-fg-link:focus-visible { outline: 3px solid var(--fire); outline-offset: 2px; }
.cc-fg-thumbs { display: flex; }
.cc-fg-thumbs img {
  width: 30px; height: 30px; object-fit: cover; border-radius: 6px;
  border: 1.5px solid var(--charcoal-2); margin-left: -8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}
.cc-fg-thumbs img:first-child { margin-left: 0; }

/* Field guide stage card */
.cc-fg-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--charcoal-2);
  transition: border-color var(--t-med), box-shadow var(--t-med);
}
.cc-fg-card[data-active="true"] {
  border-color: var(--fire);
  box-shadow: 0 0 0 1px var(--fire-soft), 0 16px 40px -24px var(--fire-glow);
}
.cc-fg-photo { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.cc-fg-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-fg-photo__scrim { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,26,31,0.82) 0%, transparent 52%); }
.cc-fg-badge {
  position: absolute; top: 0.6rem; right: 0.6rem;
  font-family: var(--head); font-weight: 800; font-size: 0.6rem; letter-spacing: 0.1em;
  padding: 0.3rem 0.55rem; border-radius: 999px;
}
.cc-fg-badge--go { background: var(--fire); color: #fff; box-shadow: 0 0 14px var(--fire-glow); }
.cc-fg-badge--wait { background: rgba(0,0,0,0.5); color: var(--ash); border: 1px solid var(--line-strong); }
.cc-fg-photo__label { position: absolute; left: 0.8rem; bottom: 0.6rem; right: 0.8rem; display: flex; align-items: baseline; gap: 0.5rem; }
.cc-fg-num { font-family: var(--head); font-weight: 800; color: var(--fire); font-size: 0.8rem; }
.cc-fg-title { font-family: var(--head); font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; color: #fff; font-size: 1.05rem; }
.cc-fg-time { margin-left: auto; font-size: 0.66rem; letter-spacing: 0.08em; color: var(--ash); }
.cc-fg-cap { padding: 0.8rem 0.9rem 1rem; font-size: 0.86rem; line-height: 1.5; color: var(--ash); }
.cc-fg-youarehere {
  display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.5rem;
  font-family: var(--head); font-weight: 700; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fire);
}

/* Annotated diagram (Module 2 vent guide) */
.cc-diagram {
  background: linear-gradient(158deg, #f2f0ee 0%, #d9d6d3 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.7rem 0.4rem;
  margin-bottom: 1rem;
}
.cc-diagram__stage { position: relative; width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 1000 / 1352; }
.cc-diagram__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cc-diagram__cap { text-align: center; font-family: var(--head); font-weight: 700; font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: #6b6562; padding: 0.5rem 0 0.2rem; }
.cc-vent-marker { position: absolute; transform: translate(-50%, -50%); z-index: 2; }
.cc-vent-dot {
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--fire); border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--fire), 0 2px 6px rgba(0,0,0,0.4);
  position: relative; z-index: 2;
}
.cc-vent-marker::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 17px; height: 17px; transform: translate(-50%, -50%);
  border-radius: 50%; border: 2px solid var(--fire);
  z-index: 1;
}
[data-motion="rich"] .cc-vent-marker::before,
[data-motion="restrained"] .cc-vent-marker::before { animation: ccPing 2.1s ease-out infinite; }
@keyframes ccPing {
  0% { transform: translate(-50%,-50%) scale(1); opacity: 0.85; }
  100% { transform: translate(-50%,-50%) scale(3.4); opacity: 0; }
}
.cc-vent-tag {
  position: absolute; top: 50%; left: 16px; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 4px 9px; border-radius: 999px;
  background: var(--charcoal); color: #fff;
  font-family: var(--head); font-weight: 800; font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase;
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
}
.cc-vent-tag::before { content: ""; width: 14px; height: 2px; background: var(--fire); position: absolute; left: -13px; }
.cc-vent-tag__n { color: var(--fire); }

/* Tip / rule card */
.cc-tip {
  margin-top: 0.2rem; display: flex; gap: 0.7rem; align-items: flex-start;
  padding: 0.95rem 1.05rem; border-radius: var(--radius-sm);
  border: 1px solid var(--fire); background: linear-gradient(180deg, color-mix(in oklab, var(--fire) 14%, var(--panel-2)) 0%, var(--panel-2) 70%);
}
.cc-tip__icon { flex: none; }
.cc-tip__title { font-family: var(--head); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.86rem; color: #fff; margin: 0 0 0.25rem; }
.cc-tip__text { font-size: 0.84rem; line-height: 1.5; color: rgba(255,255,255,0.9); margin: 0; }

/* Doneness chart (Module 4 guide) */
.cc-dn-group {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--charcoal-2); overflow: hidden; margin-bottom: 0.9rem;
}
.cc-dn-head {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--charcoal-deep) 35%, transparent);
}
.cc-dn-thumb { width: 46px; height: 46px; border-radius: 50%; flex: none; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.cc-dn-name { font-family: var(--head); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.92rem; color: #fff; }
.cc-dn-rows { padding: 0.35rem 0.85rem 0.6rem; }
.cc-dn-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0; border-bottom: 1px solid var(--line);
}
.cc-dn-row:last-child { border-bottom: none; }
.cc-dn-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.cc-dn-label { font-size: 0.88rem; color: var(--white); font-weight: 600; }
.cc-dn-note {
  font-family: var(--head); font-weight: 800; font-size: 0.54rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; margin-left: 0.4rem;
}
.cc-dn-note--target { background: var(--fire); color: #fff; }
.cc-dn-note--safety { background: rgba(196,190,188,0.16); color: var(--ash); border: 1px solid var(--line-strong); }
.cc-dn-temp {
  margin-left: auto; font-family: var(--head); font-weight: 800; font-variant-numeric: tabular-nums;
  font-size: 0.96rem; color: var(--ash); white-space: nowrap; flex: none;
}
.cc-dn-row--target { margin: 0.15rem -0.5rem; padding: 0.6rem 0.5rem; border-radius: 8px; border-bottom: none;
  background: linear-gradient(90deg, var(--fire-soft) 0%, transparent 90%); }
.cc-dn-row--target .cc-dn-label,
.cc-dn-row--target .cc-dn-temp { color: #fff; }

/* ---------- Module gating ---------- */
.cc-locked > .cc-card { position: relative; }
.cc-lockveil {
  position: absolute; inset: 0; z-index: 5;
  border-radius: inherit;
  background: color-mix(in oklab, var(--charcoal-deep) 78%, transparent);
  backdrop-filter: blur(3px) saturate(0.6);
  -webkit-backdrop-filter: blur(3px) saturate(0.6);
  display: grid; place-items: center; text-align: center;
  padding: 1.5rem;
}
.cc-lockveil__inner { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; max-width: 280px; }
.cc-lockveil__icon { font-size: 1.5rem; opacity: 0.8; }

/* ---------- Reveal (pure-CSS entrance; always ends visible) ---------- */
.cc-reveal { animation: ccRevealIn 0.6s var(--ease) both; }
@keyframes ccRevealIn {
  from { transform: translateY(16px); }
  to   { transform: none; }
}

/* ============================================================
   ANIMATIONS (gated by motion intensity)
   ============================================================ */
@keyframes ccEmber {
  0%,100% { opacity: 0.55; transform: scale(1); }
  50%     { opacity: 1; transform: scale(1.06); }
}
@keyframes ccPulseGlow {
  0%   { box-shadow: 0 0 0 0 var(--fire-glow); }
  100% { box-shadow: 0 0 26px 6px var(--fire-soft); }
}
@keyframes ccSizzle {
  0%   { transform: translateY(0) rotate(-1.5deg) scale(1); }
  100% { transform: translateY(-3px) rotate(1.5deg) scale(1.04); }
}
@keyframes ccFlash {
  0%   { opacity: 0.45; }
  100% { opacity: 1; }
}
@keyframes ccFloat {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-6px); }
}
@keyframes ccSpark {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translateY(-46px) scale(0.3); opacity: 0; }
}
@keyframes ccPop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes ccConfettiFall {
  0%   { transform: translateY(-12vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(108vh) rotate(540deg); opacity: 0.9; }
}
@keyframes ccShake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* Motion intensity control */
[data-motion="rich"] .cc-anim-ember { animation: ccEmber 2.4s var(--ease) infinite; }
[data-motion="rich"] .cc-anim-glow { animation: ccPulseGlow 1.8s ease-in-out infinite alternate; }
[data-motion="rich"] .cc-anim-sizzle { animation: ccSizzle 0.42s ease-in-out infinite alternate; }
[data-motion="rich"] .cc-anim-flash { animation: ccFlash 0.7s ease-in-out infinite alternate; }
[data-motion="rich"] .cc-anim-float { animation: ccFloat 3.6s ease-in-out infinite; }
[data-motion="rich"] .cc-shake { animation: ccShake 0.4s ease both; }

[data-motion="restrained"] .cc-anim-ember { animation: ccEmber 4s ease-in-out infinite; }
[data-motion="restrained"] .cc-anim-glow { animation: none; }
[data-motion="restrained"] .cc-anim-sizzle { animation: none; }
[data-motion="restrained"] .cc-anim-flash { animation: ccFlash 1.4s ease-in-out infinite alternate; }
[data-motion="restrained"] .cc-anim-float { animation: none; }
[data-motion="restrained"] .cc-shake { animation: none; }

[data-motion="off"] .cc-anim-ember,
[data-motion="off"] .cc-anim-glow,
[data-motion="off"] .cc-anim-sizzle,
[data-motion="off"] .cc-anim-flash,
[data-motion="off"] .cc-anim-float,
[data-motion="off"] .cc-shake { animation: none !important; }

[data-motion="off"] .cc-reveal { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .cc-anim-ember, .cc-anim-glow, .cc-anim-sizzle, .cc-anim-flash, .cc-anim-float, .cc-shake { animation: none !important; }
  .cc-reveal { animation: none; }
}

/* small helpers */
.cc-row { display: flex; align-items: center; gap: 0.75rem; }
.cc-between { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.cc-grow { flex: 1; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
