/* ==========================================================================
   Chain page (/scan/:id) — built on kc.css
   The page people land on after scanning a card: one job, get them to log
   an act of kindness.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.ch-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--grad-night); color: #fff;
  margin-top: calc(-1 * var(--nav-h) - 12px);
  padding: calc(var(--nav-h) + clamp(2rem, 6vw, 4.5rem)) 0 clamp(4.5rem, 9vw, 6.5rem);
}
.ch-hero-blob-1 { width: 560px; height: 560px; inset-inline-end: -160px; top: -160px; opacity: .5; }
.ch-hero-blob-2 { width: 420px; height: 420px; inset-inline-start: -200px; bottom: -60px; opacity: .4; }
.ch-hero-rings { position: absolute; width: 860px; height: 860px; inset-inline-end: -260px; top: 48%; transform: translateY(-50%); pointer-events: none; opacity: .55; z-index: -1; }
.ch-hero-rings circle { fill: none; stroke: rgba(255,179,71,.22); stroke-width: 1.5; stroke-dasharray: 4 10; transform-origin: 300px 300px; animation: kcSpin 70s linear infinite; }
.ch-hero-rings circle:nth-child(2) { animation-direction: reverse; animation-duration: 90s; }
.ch-hero-rings circle:nth-child(3) { animation-duration: 130s; }

.ch-hero-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 1.25rem; }
.ch-hero .kc-chip--live { background: rgba(34,197,94,.14); color: #a7f3c4; border: 1px solid rgba(34,197,94,.3); }
.ch-id-chip {
  display: inline-flex; align-items: center; padding: .3rem .75rem; border-radius: var(--radius-full);
  border: 1px dashed rgba(255,255,255,.25); color: rgba(255,255,255,.6);
  font: 600 .78rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em;
}

.ch-title {
  font-family: var(--font-display); font-weight: 800; color: #fff;
  font-size: clamp(3rem, 9.5vw, 6.75rem); line-height: .94; letter-spacing: -.035em;
  margin: 0 0 1.25rem; overflow-wrap: anywhere; text-wrap: balance;
  background: linear-gradient(180deg, #fff 55%, #ffe2bd 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ch-title--long { font-size: clamp(2.4rem, 6.6vw, 5rem); line-height: .98; }
.ch-title--xl-long { font-size: clamp(2rem, 4.8vw, 3.6rem); line-height: 1.04; letter-spacing: -.035em; }
[dir="rtl"] .ch-title { letter-spacing: -.01em; line-height: 1.08; }
[dir="rtl"] .ch-title, [dir="rtl"] .ch-desc { text-align: right; }

.ch-tribute { margin: 0 0 1.4rem; }
.ch-tribute-sticker { --tilt: -3deg; font-size: 1.05rem; padding: .65rem 1.15rem; color: rgb(var(--blue-900)); background: var(--grad-accent); box-shadow: 0 14px 30px -10px rgba(255,142,0,.6); transition: transform .4s var(--ease-spring); }
.ch-tribute-sticker:hover { transform: rotate(0) scale(1.04); }
.ch-tribute-sticker strong { font-weight: 800; }
.ch-tribute-icon { font-size: 1.2rem; }

.ch-desc { margin-bottom: 1.75rem; max-width: 36rem; }

.ch-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.ch-cta { position: relative; padding-inline-start: .75rem; font-size: 1.15rem; min-height: 64px; }
.ch-cta::before {
  content: ''; position: absolute; inset: -6px; border-radius: inherit; pointer-events: none;
  border: 2px solid rgba(255,179,71,.65); opacity: 0; animation: chRing 2.6s var(--ease-out) infinite 1.2s;
}
@keyframes chRing { 0% { opacity: .9; transform: scale(.96); } 70%, 100% { opacity: 0; transform: scale(1.12); } }
.ch-cta-plus {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: rgb(var(--blue-900)); color: #fff; font-size: 1rem;
  transition: transform .4s var(--ease-spring);
}
.ch-cta:hover .ch-cta-plus { transform: rotate(90deg) scale(1.08); }
.ch-share { min-height: 64px; }
.ch-quick { margin: 1rem 0 0; font-size: .92rem; font-weight: 500; color: rgba(255,255,255,.62); }
.ch-quick i { color: rgb(var(--accent-secondary)); }

/* Scoreboard */
.ch-score-wrap { position: relative; padding: 1.5rem 0; }
.ch-score {
  position: relative; padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(255,255,255,.13), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.18);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.ch-score-main { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .25rem 1rem; }
.ch-score-num {
  font-family: var(--font-display); font-weight: 800; line-height: .85; letter-spacing: -.06em;
  font-size: clamp(5rem, 15vw, 8.5rem);
  background: var(--grad-accent); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 10px 30px rgba(255,142,0,.35));
  font-variant-numeric: tabular-nums;
}
.ch-score-label { max-width: 8ch; padding-bottom: .5rem; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -.02em; color: #fff; }
.ch-score-row { list-style: none; margin: 1.5rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid rgba(255,255,255,.12); display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.ch-score-row li { display: flex; flex-direction: column; min-width: 0; }
.ch-score-row strong { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1; letter-spacing: -.03em; color: #fff; }
.ch-score-row span { margin-top: .3rem; font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.65); overflow: hidden; text-overflow: ellipsis; }

.ch-ms { margin-top: 1.5rem; }
.ch-ms-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .6rem; font-size: .88rem; font-weight: 600; color: rgba(255,255,255,.75); }
.ch-ms-goal { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .65rem; border-radius: var(--radius-full); background: rgba(255,179,71,.16); color: rgb(var(--accent-secondary)); font-weight: 800; }
.ch-progress { position: relative; height: 16px; border-radius: var(--radius-full); background: rgba(0,0,0,.28); box-shadow: inset 0 1px 3px rgba(0,0,0,.35); }
.ch-progress-fill {
  position: relative; height: 100%; width: var(--p, 0%); border-radius: inherit;
  background: repeating-linear-gradient(-45deg, rgba(255,255,255,.18) 0 8px, transparent 8px 16px), var(--grad-accent);
  background-size: 22px 22px, 100% 100%;
  box-shadow: 0 0 18px rgba(255,142,0,.55);
  animation: chFill 1.6s var(--ease-out) .5s both, chStripes 1s linear infinite;
}
@keyframes chFill { from { width: 0; } }
@keyframes chStripes { to { background-position: 22px 0, 0 0; } }
.ch-progress-knob { position: absolute; inset-inline-end: -4px; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; background: #fff; border: 4px solid rgb(var(--accent)); box-shadow: 0 0 0 6px rgba(255,142,0,.25); }
.ch-ms-hint { margin: .75rem 0 0; font-size: .95rem; color: rgba(255,255,255,.8); }
.ch-ms-hint strong { color: rgb(var(--accent-secondary)); font-family: var(--font-display); font-size: 1.15rem; }
.ch-ms-max { font-weight: 700; }

.ch-score-sticker { position: absolute; z-index: 2; max-width: 250px; animation: kcFloat 7s ease-in-out infinite; }
.ch-score-sticker-0 { top: -.25rem; inset-inline-end: -1rem; }
.ch-score-sticker-1 { bottom: -.5rem; inset-inline-start: -2.25rem; animation-delay: -3s; }
.ch-sticker-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-sticker-place { color: rgb(var(--text-muted)); font-weight: 500; }

.ch-ticker { position: relative; margin-top: clamp(2.5rem, 6vw, 4rem); padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.15); }
.ch-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(24px, 4vw, 56px); fill: rgb(var(--background-secondary)); pointer-events: none; }
.ch-wave--white { fill: #fff; }

@media (max-width: 991.98px) {
  .ch-hero-rings { display: none; }
  .ch-score-sticker { display: none; }
  .ch-score-wrap { padding: .5rem 0 0; }
}
@media (max-width: 575.98px) {
  .ch-hero { padding-top: calc(var(--nav-h) + 1.75rem); }
  .ch-actions { flex-direction: column; }
  .ch-actions .kc-btn { width: 100%; }
  .ch-cta { font-size: 1.08rem; justify-content: flex-start; }
  .ch-cta > span:last-child { flex: 1; text-align: center; padding-inline-end: 44px; }
  .ch-share { min-height: 52px; }
  .ch-quick { text-align: center; }
  .ch-score { border-radius: var(--radius-lg); }
  .ch-score-main { flex-direction: row; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
  .ch-score-num { font-size: 5rem; }
  .ch-score-label { font-size: 1.15rem; }
  .ch-desc { font-size: 1.05rem; }
}

/* --------------------------------------------------------------------------
   Celebration (after adding an act)
   -------------------------------------------------------------------------- */
.ch-celebrate {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2rem);
  margin-bottom: clamp(2rem, 5vw, 3.5rem); padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--radius-xl);
  background: var(--grad-accent); color: rgb(var(--blue-900));
  box-shadow: 0 40px 80px -30px rgba(255,142,0,.7), 0 0 0 6px rgba(255,179,71,.2);
  animation: chPop .9s var(--ease-spring) both;
}
@keyframes chPop { from { opacity: 0; transform: translateY(24px) scale(.9); } }
.ch-celebrate-burst { position: absolute; width: 520px; height: 520px; inset-inline-start: -130px; top: 50%; margin-top: -260px; z-index: -1; fill: rgba(255,255,255,.22); animation: kcSpin 30s linear infinite; }
.ch-celebrate-art { flex: 0 0 auto; width: clamp(120px, 18vw, 210px); height: auto; filter: drop-shadow(0 18px 24px rgba(15,23,55,.3)); animation: chWiggle 2.4s ease-in-out infinite .9s; }
@keyframes chWiggle { 0%, 100% { transform: rotate(-4deg) scale(1); } 50% { transform: rotate(4deg) scale(1.05); } }
.ch-celebrate-body { flex: 1; min-width: 0; }
.ch-celebrate .kc-eyebrow { color: rgb(var(--blue-900)); }
.ch-celebrate-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 4.6vw, 3.25rem); line-height: 1; letter-spacing: -.035em; margin: .6rem 0 .6rem; color: rgb(var(--blue-900)); }
.ch-celebrate-milestone { display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 .6rem; padding: .35rem .85rem; border-radius: var(--radius-full); background: rgb(var(--blue-900)); color: #fff; font-weight: 700; }
.ch-celebrate-text { margin: 0 0 1rem; font-weight: 500; color: rgba(15,23,55,.8); }
.ch-celebrate-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.ch-btn-whatsapp { --kc-btn-bg: #1fae54; --kc-btn-fg: #fff; background: #1fae54; box-shadow: 0 12px 26px -10px rgba(31,174,84,.7); }
.ch-btn-whatsapp:hover { background: #179447; }
.ch-hero--celebrating .ch-score-sticker { display: none; }
@media (max-width: 575.98px) {
  .ch-celebrate { flex-direction: column; text-align: center; border-radius: var(--radius-lg); }
  .ch-celebrate .kc-eyebrow { justify-content: center; }
  .ch-celebrate-actions { justify-content: center; }
  .ch-celebrate-actions .kc-btn { flex: 1 1 140px; }
  .ch-celebrate-burst { inset-inline-start: 50%; margin-inline-start: -260px; top: -150px; margin-top: 0; }
  [dir="rtl"] .ch-celebrate-burst { margin-inline-start: 0; margin-inline-end: -260px; inset-inline-start: auto; inset-inline-end: 50%; }
}
.kc-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 2000; }

/* --------------------------------------------------------------------------
   Journey
   -------------------------------------------------------------------------- */
.ch-journey-sec { padding-top: clamp(1.5rem, 4vw, 3rem); }
.ch-journey { display: grid; grid-template-columns: 1.55fr 1fr; overflow: hidden; }
.ch-journey-map { position: relative; min-height: 340px; padding: 1.25rem; display: flex; align-items: center; background: radial-gradient(closest-side, rgba(255,142,0,.12), transparent); }
.ch-journey-map svg { width: 100%; height: auto; display: block; }
.ch-journey-side { padding: clamp(1.75rem, 4vw, 2.75rem); display: flex; flex-direction: column; justify-content: center; border-inline-start: 1px solid rgba(255,255,255,.08); }
.ch-journey-side .kc-h2 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.ch-journey-stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.ch-journey-stats div { display: flex; flex-direction: column; }
.ch-journey-stats strong { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1; letter-spacing: -.04em; color: rgb(var(--accent-secondary)); }
.ch-journey-stats span { margin-top: .3rem; font-weight: 600; color: rgba(255,255,255,.7); }
.ch-route { list-style: none; margin: 1.75rem 0 0; padding: 0; position: relative; display: grid; gap: .9rem; }
.ch-route::before { content: ''; position: absolute; inset-inline-start: 6px; top: 14px; bottom: 14px; border-inline-start: 2px dashed rgba(255,179,71,.5); }
.ch-route li { position: relative; display: grid; grid-template-columns: 14px auto 1fr; align-items: center; gap: .75rem; }
.ch-route-dot { width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,.5); box-shadow: 0 0 0 4px rgba(255,255,255,.1); }
.ch-route-dot--now { background: rgb(var(--accent)); box-shadow: 0 0 0 4px rgba(255,142,0,.3); animation: kcPing 2s infinite; }
.ch-route-label { font-size: .85rem; color: rgba(255,255,255,.6); font-weight: 600; }
.ch-route strong { font-weight: 700; color: #fff; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 991.98px) {
  .ch-journey { grid-template-columns: 1fr; }
  .ch-journey-map { min-height: 0; padding: 1rem .5rem 0; }
  .ch-journey-side { border-inline-start: 0; border-top: 1px solid rgba(255,255,255,.08); }
}

/* --------------------------------------------------------------------------
   Acts
   -------------------------------------------------------------------------- */
.ch-acts-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.ch-acts-head .kc-h2 { color: rgb(var(--blue-900)); }
.ch-acts-head > div { min-width: 0; }
.ch-acts-head .kc-btn { flex-shrink: 0; }
.ch-count {
  display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .35em; vertical-align: .35em;
  border-radius: var(--radius-full); background: var(--grad-accent); color: rgb(var(--blue-900));
  font-size: .42em; letter-spacing: 0; transform: rotate(-6deg); box-shadow: var(--shadow-glow-orange);
}

.ch-photos {
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin: 0 calc(-1 * var(--bs-gutter-x, 1.5rem) / 2) 2rem; padding: .75rem calc(var(--bs-gutter-x, 1.5rem) / 2) 1.25rem;
  scrollbar-width: thin;
}
.ch-photo {
  flex: 0 0 auto; width: 176px; padding: .55rem .55rem .7rem; border: 0; border-radius: 10px;
  background: #fff; box-shadow: var(--shadow); scroll-snap-align: start; text-align: start;
  transform: rotate(var(--tilt, 0deg)); transition: transform .35s var(--ease-spring), box-shadow .3s ease;
}
.ch-photo:hover, .ch-photo:focus-visible { transform: rotate(0) translateY(-6px) scale(1.04); box-shadow: var(--shadow-lg); }
.ch-photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.ch-photo-cap { display: block; margin-top: .5rem; font-size: .8rem; font-weight: 600; color: rgb(var(--text-secondary)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ch-feed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.ch-feed-item { min-width: 0; display: flex; }
.ch-feed-item > .kc-act { flex: 1; }
.ch-feed-item:first-child .kc-act { border-color: rgba(255,142,0,.35); box-shadow: 0 0 0 4px rgba(255,142,0,.1), var(--shadow-sm); }
.ch-feed-item.is-collapsed { display: none; }
.ch-feed.is-expanded .ch-feed-item.is-collapsed { display: flex; animation: chIn .5s var(--ease-out) both; }
@keyframes chIn { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 767.98px) { .ch-feed { grid-template-columns: 1fr; gap: .75rem; } }
@media (max-width: 400px) {
  .ch-feed .kc-act { gap: .75rem; padding: .7rem; }
  .ch-feed .kc-act-media { flex-basis: 72px; height: 72px; }
  .ch-feed .kc-act-tile { font-size: 1.9rem; }
}

/* Your turn */
.ch-next { position: relative; overflow: hidden; display: flex; align-items: center; gap: 1.5rem 2rem; flex-wrap: wrap; margin-top: clamp(2.5rem, 6vw, 4rem); padding: clamp(1.75rem, 4vw, 2.75rem); }
.ch-next-num { position: absolute; inset-inline-end: -.05em; bottom: -.28em; font-family: var(--font-display); font-weight: 800; font-size: clamp(7rem, 20vw, 13rem); line-height: 1; letter-spacing: -.06em; color: rgba(255,255,255,.28); pointer-events: none; }
.ch-next-body { position: relative; flex: 1 1 22rem; min-width: 0; }
.ch-next .kc-h2 { color: rgb(var(--blue-900)); }
.ch-next p { font-size: 1.1rem; font-weight: 500; color: rgba(15,23,55,.8); }
.ch-next .kc-btn { position: relative; }
@media (max-width: 575.98px) { .ch-next .kc-btn { width: 100%; white-space: normal; } }

/* Empty chain */
.ch-empty { max-width: 42rem; margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 3rem); text-align: center; border-radius: var(--radius-xl); background: rgb(var(--background-secondary)); border: 2px dashed rgba(255,142,0,.35); }
.ch-empty-art { width: clamp(170px, 30vw, 240px); height: auto; margin: 0 auto 1rem; display: block; animation: kcFloat 6s ease-in-out infinite; }
.ch-empty .kc-h2 { color: rgb(var(--blue-900)); }
.ch-empty-ideas-title { margin: 2rem 0 .85rem; font-weight: 700; color: rgb(var(--text-secondary)); }
.ch-empty-ideas { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.ch-idea { border: 0; cursor: pointer; transition: transform .3s var(--ease-spring), box-shadow .3s ease; }
.ch-idea:hover, .ch-idea:focus-visible { transform: rotate(0) scale(1.06); box-shadow: 0 16px 30px -10px rgba(15,23,55,.4); }
@media (max-width: 575.98px) { .ch-empty .kc-btn { width: 100%; white-space: normal; } }

/* --------------------------------------------------------------------------
   How it works / impact / certificate / start
   -------------------------------------------------------------------------- */
.ch-steps { list-style: none; margin: 0 0 clamp(2.5rem, 6vw, 4rem); padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; counter-reset: none; }
.ch-step { position: relative; overflow: hidden; padding: 2rem 1.75rem 1.75rem; transition: transform .35s var(--ease-out), box-shadow .35s ease; }
.ch-step:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.ch-step-num { position: absolute; top: -.15em; inset-inline-end: .1em; font-family: var(--font-display); font-weight: 800; font-size: 6.5rem; line-height: 1; letter-spacing: -.06em; color: rgba(255,142,0,.14); }
.ch-step-emoji { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 1.1rem; border-radius: 20px; background: rgb(var(--orange-100)); font-size: 2rem; transition: transform .5s var(--ease-spring); }
.ch-step:hover .ch-step-emoji { transform: rotate(-8deg) scale(1.1); }
.ch-step p { position: relative; margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 1.25; letter-spacing: -.015em; color: rgb(var(--blue-900)); }
.ch-step--featured { background: rgb(var(--blue-900)); }
.ch-step--featured p { color: #fff; }
.ch-step--featured .ch-step-emoji { background: rgba(255,255,255,.1); }
.ch-step--featured .ch-step-num { color: rgba(255,179,71,.22); }
@media (max-width: 767.98px) {
  .ch-steps { grid-template-columns: 1fr; gap: .75rem; }
  .ch-step { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; }
  .ch-step-emoji { flex: 0 0 auto; width: 54px; height: 54px; margin: 0; font-size: 1.6rem; }
  .ch-step p { font-size: 1.1rem; }
  .ch-step-num { font-size: 4.5rem; top: -.1em; }
}

.ch-bento { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.ch-impact { padding: clamp(1.75rem, 4vw, 2.5rem); overflow: hidden; }
.ch-impact .kc-eyebrow { gap: .5rem; }
.ch-impact .kc-eyebrow::before { display: none; }
.ch-impact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.25rem 0 1.5rem; }
.ch-impact-grid > div { min-width: 0; }
.ch-impact-grid span { font-size: .88rem; font-weight: 600; color: rgba(255,255,255,.7); }
.ch-impact-num { margin: 0 0 .25rem; font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1; letter-spacing: -.04em; color: #fff; font-variant-numeric: tabular-nums; }
.ch-impact-num--accent { color: rgb(var(--accent-secondary)); }
.ch-cert { padding: clamp(1.75rem, 4vw, 2.5rem); display: flex; flex-direction: column; align-items: flex-start; }
.ch-cert .kc-h3 { color: rgb(var(--blue-900)); }
.ch-cert p { color: rgb(var(--text-secondary)); }
.ch-cert .kc-btn { margin-top: auto; }
.ch-cert-preview { display: block; width: 100%; margin-bottom: 1.25rem; border-radius: 14px; overflow: hidden; background: rgb(var(--blue-900)); box-shadow: var(--shadow-lg); transform: rotate(-1.5deg); transition: transform .5s var(--ease-spring); }
.ch-cert-preview img { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 707; }
.ch-cert:hover .ch-cert-preview { transform: rotate(0) scale(1.02); }
@media (prefers-reduced-motion: reduce) { .ch-cert-preview, .ch-cert:hover .ch-cert-preview { transform: none; } }
@media (max-width: 767.98px) { .ch-bento { grid-template-columns: 1fr; } }
@media (max-width: 400px) { .ch-impact-grid { gap: .5rem; } .ch-impact-num { font-size: 1.75rem; } .ch-impact-grid span { font-size: .78rem; } }

.ch-start { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 1.5rem; overflow: hidden; padding: clamp(1.75rem, 4vw, 3rem); }
.ch-start .kc-h2 { color: rgb(var(--blue-900)); }
.ch-start p { font-size: 1.1rem; font-weight: 500; color: rgba(15,23,55,.82); max-width: 30rem; }
.ch-start-art { perspective: 900px; }
.ch-start-art img { display: block; width: 100%; max-width: 440px; height: auto; margin-inline: auto; border-radius: 18px; box-shadow: 0 30px 60px -20px rgba(15,23,55,.55); transform: rotate(-5deg); transition: transform .6s var(--ease-out); }
.ch-start:hover .ch-start-art img { transform: rotate(0) scale(1.03); }
@media (max-width: 767.98px) {
  .ch-start { grid-template-columns: 1fr; }
  .ch-start-art { order: -1; }
  .ch-start-art img { max-width: 300px; }
  .ch-start .kc-btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   Phone sticky CTA
   -------------------------------------------------------------------------- */
.ch-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1020;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255,248,239,0), rgba(255,248,239,.92) 35%);
  animation: chUp .45s var(--ease-out) both;
}
.ch-sticky[hidden] { display: none; }
@keyframes chUp { from { transform: translateY(100%); } }
@media (max-width: 991.98px) { body.has-sticky-cta { padding-bottom: 5.5rem; } }

/* Toasts (main.js showNotification) */
.kc-notifications { position: fixed; top: 1rem; inset-inline-end: 1rem; z-index: 10000; width: min(400px, calc(100vw - 2rem)); display: flex; flex-direction: column; gap: .5rem; }
.kc-notifications .alert { margin: 0; border: 0; border-radius: var(--radius-md); background: #fff; font-weight: 600; box-shadow: var(--shadow-lg); }
.text-accent-strong { color: rgb(var(--accent-text)) !important; }

/* --------------------------------------------------------------------------
   "Log a kindness" sheet (#addActModal)
   -------------------------------------------------------------------------- */
.kind-sheet .modal-dialog { max-width: 620px; }
.kind-sheet .modal-content { overflow: clip; border-radius: var(--radius-xl); background: #fff; }
.kind-sheet-header {
  position: relative; overflow: hidden;
  padding: 1.5rem clamp(1.25rem, 4vw, 2rem) 1.6rem;
  background: var(--grad-night); color: #fff;
}
.kind-sheet-grab { display: none; }
.kind-sheet-deco { position: absolute; font-size: 2.6rem; opacity: .9; pointer-events: none; animation: kcFloat 6s ease-in-out infinite; }
.kind-sheet-deco-1 { inset-inline-end: 4.5rem; bottom: .6rem; --tilt: 12deg; }
.kind-sheet-deco-2 { inset-inline-end: 1.4rem; bottom: 2.6rem; font-size: 1.6rem; animation-delay: -2s; }
.kind-sheet-top { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; padding-inline-end: 3rem; min-width: 0; }
.kind-sheet-steps { display: flex; gap: .35rem; flex-shrink: 0; }
.kind-sheet-steps span { width: 26px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.22); transition: background .3s ease, width .4s var(--ease-spring); }
.kind-sheet-steps span.is-active { width: 40px; background: var(--grad-accent); }
.kind-sheet-chain { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.6); }
.kind-sheet-title { position: relative; margin: 0 0 .45rem; padding-inline-end: 4.5rem; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 5vw, 2.3rem); line-height: 1.02; letter-spacing: -.035em; color: #fff; }
.kind-sheet-sub { position: relative; padding-inline-end: 4.5rem; color: rgba(255,255,255,.75); font-size: .98rem; }
.kind-sheet-close {
  position: absolute; top: 1rem; inset-inline-end: 1rem; z-index: 2;
  display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; font-size: 1.15rem;
  transition: background .2s ease, transform .3s var(--ease-spring);
}
.kind-sheet-close:hover { background: rgba(255,255,255,.22); transform: rotate(90deg); }

.kind-step { padding: clamp(1.25rem, 4vw, 2rem); animation: chStepIn .45s var(--ease-out) both; }
@keyframes chStepIn { from { opacity: 0; transform: translateX(24px); } }
[dir="rtl"] .kind-step { animation-name: chStepInRtl; }
@keyframes chStepInRtl { from { opacity: 0; transform: translateX(-24px); } }
.kind-step fieldset { border: 0; padding: 0; min-width: 0; }
.kind-label { display: block; margin-bottom: .6rem; font-weight: 700; font-size: 1rem; color: rgb(var(--blue-900)); float: none; width: auto; padding: 0; }
.kind-label--sm { font-size: .9rem; margin-bottom: .35rem; }

.kind-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.kind-chip {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  min-height: 92px; padding: .7rem .35rem; border-radius: 20px;
  border: 2px solid rgb(var(--border-color)); background: #fff; color: rgb(var(--blue-900));
  font-weight: 700; font-size: .82rem; line-height: 1.15; text-align: center;
  transition: transform .3s var(--ease-spring), border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.kind-chip:hover { transform: translateY(-3px); border-color: rgba(255,142,0,.5); box-shadow: var(--shadow-sm); }
.kind-chip:active { transform: scale(.95); }
.kind-chip-emoji { font-size: 2.1rem; line-height: 1; transition: transform .4s var(--ease-spring); }
.kind-chip:hover .kind-chip-emoji { transform: scale(1.12) rotate(-6deg); }
.kind-chip-label { overflow-wrap: anywhere; }
.kind-chip.is-selected { border-color: rgb(var(--accent)); background: rgb(var(--orange-100)); box-shadow: 0 10px 24px -10px rgba(255,142,0,.6); }
.kind-chip.is-selected .kind-chip-emoji { animation: chBounce .55s var(--ease-spring); }
.kind-chip.is-selected::after {
  content: '\2713'; position: absolute; top: -8px; inset-inline-end: -8px;
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: rgb(var(--accent)); color: rgb(var(--blue-900)); font-size: .8rem; font-weight: 900;
  box-shadow: 0 0 0 3px #fff; animation: chPopIn .35s var(--ease-spring);
}
@keyframes chBounce { 0% { transform: scale(1); } 40% { transform: scale(1.45) rotate(-10deg); } 100% { transform: scale(1.15); } }
@keyframes chPopIn { from { transform: scale(0); } }

.kind-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; margin-bottom: .55rem; }
.kind-idea-btn {
  display: inline-flex; align-items: center; gap: .35rem; flex-shrink: 0;
  min-height: 38px; padding: .35rem .85rem; border: 2px solid rgba(33,75,165,.15); border-radius: var(--radius-full);
  background: rgb(var(--blue-100)); color: rgb(var(--primary)); font-weight: 700; font-size: .88rem;
  transition: transform .3s var(--ease-spring), background .2s ease;
}
.kind-idea-btn:hover { transform: translateY(-2px); background: #d6e3fa; }
.kind-dice { display: inline-block; font-size: 1.15rem; line-height: 1; }
.kind-idea-btn.is-rolling .kind-dice { animation: chRoll .5s var(--ease-out); }
@keyframes chRoll { from { transform: rotate(-540deg) scale(.6); } }

.kind-input { border-radius: var(--radius-md); }
.kind-input--big { min-height: 60px; font-size: 1.15rem; font-weight: 500; }
.kind-input.is-shaking { animation: chShake .45s ease; border-color: rgb(var(--danger)); }
@keyframes chShake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.kind-count { margin-top: .35rem; text-align: end; font-size: .82rem; color: rgb(var(--text-muted)); }

.kind-idea {
  display: flex; align-items: center; gap: .65rem; margin-top: .75rem; padding: .8rem 1rem;
  border-radius: 14px; background: #fff4c2; color: rgb(var(--blue-900));
  box-shadow: 0 10px 22px -12px rgba(120,90,0,.5); transform: rotate(-1deg);
}
.kind-idea[hidden] { display: none; }
.kind-idea.is-pop { animation: chIdea .5s var(--ease-spring); }
@keyframes chIdea { from { opacity: 0; transform: rotate(-4deg) scale(.85) translateY(-6px); } }
.kind-idea-emoji { font-size: 1.4rem; }
.kind-idea-text { flex: 1; min-width: 0; font-weight: 600; }
.kind-idea-use { flex-shrink: 0; border: 0; padding: .4rem .8rem; border-radius: var(--radius-full); background: rgb(var(--blue-900)); color: #fff; font-weight: 700; font-size: .85rem; transition: transform .25s var(--ease-spring); }
.kind-idea-use:hover { transform: scale(1.05); }

.kind-photo {
  position: relative; display: grid; place-items: center; overflow: hidden;
  min-height: 150px; border-radius: 20px; cursor: pointer;
  border: 2px dashed rgba(33,75,165,.28); background: linear-gradient(135deg, rgb(var(--blue-100)), #fff);
  transition: border-color .2s ease, transform .3s var(--ease-out);
}
.kind-photo:hover { border-color: rgb(var(--primary)); transform: translateY(-2px); }
.kind-photo:focus-within, #actImage:focus-visible + .kind-photo { outline: 3px solid rgb(var(--accent)); outline-offset: 3px; }
.kind-photo-empty { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 1rem; font-weight: 700; color: rgb(var(--primary)); }
.kind-photo-empty[hidden] { display: none; }
.kind-photo-icon { font-size: 2.4rem; line-height: 1; transition: transform .4s var(--ease-spring); }
.kind-photo:hover .kind-photo-icon { transform: scale(1.15) rotate(-8deg); }
.kind-photo img { width: 100%; height: 220px; object-fit: cover; display: block; animation: chPop .5s var(--ease-spring); }
.kind-photo img[hidden] { display: none; }

.kind-options { display: grid; gap: .6rem; }
.kind-option { padding: .85rem 1rem; border-radius: 16px; background: rgb(var(--background-secondary)); }
.kind-option .form-check { display: flex; align-items: center; gap: .75rem; margin: 0; padding-inline-start: 0; min-height: 0; }
.kind-option .form-check-input { flex-shrink: 0; float: none; margin: 0; width: 2.9em; height: 1.6em; cursor: pointer; }
.kind-option .form-check-label { font-weight: 600; cursor: pointer; line-height: 1.3; }
.kind-option-icon { margin-inline-end: .2rem; }
.kind-option-status { margin-top: .4rem; color: rgb(var(--text-secondary)); }

.kind-step-actions { position: sticky; bottom: 0; z-index: 2; margin: 1.5rem calc(-1 * clamp(1.25rem, 4vw, 2rem)) calc(-1 * clamp(1.25rem, 4vw, 2rem)); padding: 1rem clamp(1.25rem, 4vw, 2rem) calc(1rem + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(255,255,255,0), #fff 30%); }
.kind-step-actions--split { display: flex; gap: .6rem; }
.kind-back { width: 58px; padding: 0; flex-shrink: 0; }
[dir="rtl"] .kind-arrow { transform: scaleX(-1); }

/* Phones: a bottom sheet that slides up */
@media (max-width: 575.98px) {
  .kind-sheet .modal-dialog { margin: 0; max-width: none; min-height: 100%; align-items: flex-end; }
  .kind-sheet.fade .modal-dialog { transform: translateY(100%); transition: transform .5s var(--ease-out); }
  .kind-sheet.show .modal-dialog { transform: none; }
  .kind-sheet .modal-content { border-radius: 28px 28px 0 0; margin-top: 2.5rem; }
  .kind-sheet-grab { display: block; width: 44px; height: 5px; margin: -0.6rem auto .9rem; border-radius: 5px; background: rgba(255,255,255,.3); }
  .kind-sheet-header { padding-top: 1.25rem; }
  .kind-sheet-deco-1 { font-size: 1.5rem; inset-inline-end: 1.5rem; bottom: auto; top: 4.25rem; }
  .kind-sheet-deco-2 { display: none; }
  .kind-sheet-title, .kind-sheet-sub { padding-inline-end: 2.5rem; }
  .kind-chips { gap: .45rem; }
  .kind-step { padding: 1.25rem 1rem; }
  .kind-step-actions { margin-inline: -1rem; margin-bottom: -1.25rem; padding-inline: 1rem; }
  .kind-chip { min-height: 82px; padding: .55rem .1rem; font-size: clamp(.64rem, 2.9vw, .76rem); letter-spacing: -.01em; border-radius: 16px; }
  .kind-chip-label { overflow-wrap: normal; }
  .kind-chip-emoji { font-size: 1.8rem; }
  .kind-title-row { flex-wrap: wrap; }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ch-cta::before, .ch-hero-rings circle, .ch-celebrate-burst, .ch-celebrate-art,
  .ch-score-sticker, .ch-empty-art, .kind-sheet-deco, .ch-progress-fill { animation: none !important; }
  .ch-progress-fill { width: var(--p, 0%); }
}

/* Grid children may shrink below their content (long words in user text) */
@media (max-width: 767.98px) { .ch-feed { grid-template-columns: minmax(0, 1fr); } }
.ch-feed > *, .ch-journey > *, .ch-bento > *, .ch-start > *, .ch-steps > *, .ch-impact-grid > *, .ch-score-row > * { min-width: 0; }
.ch-journey { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
@media (max-width: 991.98px) { .ch-journey { grid-template-columns: minmax(0, 1fr); } }
