/* @shard gamification-visible-surfaces */
/* @provides .clarks-ladder-bar, .clarks-streak-badge, .clarks-ritual-bubble */
/* @requires none */

/* ============================================================
   LADDER BAR — horizontal progress to next gate
   ============================================================ */
.clarks-ladder-bar {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  box-sizing: border-box;
  font-family: inherit;
  color: #2a2014;
  background: rgba(250, 243, 227, 0.55);
  border: 1px solid rgba(184, 92, 62, 0.18);
  border-radius: 10px;
}

.clarks-ladder-bar__label {
  font-size: 14px;
  line-height: 1.25;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clarks-ladder-bar__current,
.clarks-ladder-bar__dest {
  color: #b85c3e;
  font-weight: 700;
}

.clarks-ladder-bar__arrow {
  opacity: 0.6;
  margin: 0 2px;
}

.clarks-ladder-bar__togo {
  color: #6b5a44;
  font-size: 13px;
  margin-left: 4px;
}

.clarks-ladder-bar__track {
  position: relative;
  width: 100%;
  height: 14px;
  background: rgba(184, 92, 62, 0.10);
  border-radius: 7px;
  overflow: visible;
}

.clarks-ladder-bar__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, #d98e54, #b85c3e);
  border-radius: 7px;
  transition: width 480ms ease-out;
}

.clarks-ladder-bar__tick {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 18px;
  margin-left: -1px;
  margin-top: -9px;
  background: rgba(184, 92, 62, 0.45);
  border-radius: 1px;
}
.clarks-ladder-bar__tick.is-passed {
  background: #5f8a3a;
}

.clarks-ladder-bar__goal {
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #b85c3e;
  line-height: 1;
}

/* Ngaia surfaces: 80px minimum tap target. */
:where(.ngaia) .clarks-ladder-bar,
.ngaia-room .clarks-ladder-bar {
  min-height: 80px;
  padding: 14px 14px;
  font-size: 16px;
}
:where(.ngaia) .clarks-ladder-bar__track,
.ngaia-room .clarks-ladder-bar__track {
  height: 18px;
}

/* ============================================================
   STREAK MULTIPLIER BADGE — circular pulse-on-increase
   ============================================================ */
.clarks-streak-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: #f3e4c8;
  border: 2px solid rgba(184, 92, 62, 0.35);
  color: #2a2014;
  font-family: inherit;
  text-align: center;
  user-select: none;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.clarks-streak-badge__value {
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.clarks-streak-badge__caption {
  font-size: 9px;
  line-height: 1;
  opacity: 0.7;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.clarks-streak-badge--tier0 {
  background: #f3e4c8;
  color: #6b5a44;
  border-color: rgba(184, 92, 62, 0.22);
}
.clarks-streak-badge--tier1 {
  background: #fce0b2;
  color: #8a4a1f;
  border-color: rgba(184, 92, 62, 0.55);
}
.clarks-streak-badge--tier2 {
  background: #f4b878;
  color: #5e2d0e;
  border-color: rgba(184, 92, 62, 0.85);
}
.clarks-streak-badge--tier3 {
  background: #e8773a;
  color: #fff8ea;
  border-color: #8a3a1a;
  box-shadow: 0 0 0 3px rgba(232, 119, 58, 0.25);
}

@keyframes clarks-streak-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.clarks-streak-badge--pulse {
  animation: clarks-streak-pulse 600ms ease-out 1;
}

/* Ngaia surfaces: 80px badge. */
:where(.ngaia) .clarks-streak-badge,
.ngaia-room .clarks-streak-badge {
  width: 84px;
  height: 84px;
  min-width: 80px;
  min-height: 80px;
}
:where(.ngaia) .clarks-streak-badge__value,
.ngaia-room .clarks-streak-badge__value {
  font-size: 22px;
}
:where(.ngaia) .clarks-streak-badge__caption,
.ngaia-room .clarks-streak-badge__caption {
  font-size: 11px;
}

/* ============================================================
   RITUAL BUBBLE — flow-anchored speech bubble
   ============================================================ */
.clarks-ritual-bubble {
  position: relative;
  display: block;
  max-width: 100%;
  margin: 8px 0 0 0;
  padding: 10px 14px;
  background: #fff8ea;
  border: 1px solid rgba(184, 92, 62, 0.28);
  border-radius: 12px;
  color: #2a2014;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: 0 2px 6px rgba(120, 64, 24, 0.08);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 500ms ease, transform 500ms ease;
}

.clarks-ritual-bubble__body {
  display: block;
}

.clarks-ritual-bubble__tail {
  position: absolute;
  top: -7px;
  left: 18px;
  width: 12px;
  height: 12px;
  background: #fff8ea;
  border-left: 1px solid rgba(184, 92, 62, 0.28);
  border-top: 1px solid rgba(184, 92, 62, 0.28);
  transform: rotate(45deg);
}

.clarks-ritual-bubble--fade {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

/* Ngaia surfaces: bubble has 80px minimum interactive height + bigger type. */
:where(.ngaia) .clarks-ritual-bubble,
.ngaia-room .clarks-ritual-bubble {
  min-height: 80px;
  padding: 16px 18px;
  font-size: 16px;
}

/* ============================================================
   Reduced motion — verbatim SOLUTION 2.4 block
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
