/* KouLi Coach — dense vertical mist columns (audio-reactive) */

#kouli-coach-modal .kouli-coach-stage,
.kouli-coach-stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  /* Mist canvas is the centerpiece, but it was ~50vh which pushed the
     quick-start buttons below the sheet's height cap (they got clipped /
     squished against the bottom). Trimmed so the caption + all three button
     rows fit on screen with breathing room. Floor keeps it usable on short
     screens; cap prevents it from dominating tall desktops. */
  min-height: clamp(200px, 38vh, 440px);
  border-radius: 20px;
  border: 1px solid rgba(0, 196, 160, 0.18);
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 95%, rgba(0, 122, 100, 0.20) 0%, transparent 58%),
    radial-gradient(ellipse 50% 40% at 30% 70%, rgba(0, 61, 51, 0.16) 0%, transparent 50%),
    linear-gradient(180deg, #0a0d0e 0%, #07090c 45%, #050608 100%);
  --voice-energy: 0.12;
}

.kouli-voice-stage-inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.kouli-voice-glow {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 92%;
  height: 88%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse 50% 95% at 50% 100%,
    rgba(0, 196, 160, calc(0.22 + var(--voice-energy) * 0.4)) 0%,
    rgba(0, 122, 100, calc(0.1 + var(--voice-energy) * 0.2)) 40%,
    rgba(30, 40, 46, 0.05) 70%,
    transparent 85%
  );
  filter: blur(22px);
  pointer-events: none;
}

.kouli-voice-mist-field {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.kouli-voice-mist-field.is-speaking .kouli-mist-col {
  animation-duration: calc(0.65s + (var(--col-i) % 5) * 0.08s);
}

.kouli-mist-col {
  position: absolute;
  bottom: -4%;
  left: var(--col-left, 50%);
  width: 8.5%;
  min-width: 10px;
  max-width: 36px;
  height: 88%;
  margin-left: -4.25%;
  pointer-events: none;
  transform-origin: center bottom;
  transform: scaleY(var(--col-scale, 0.32));
  filter: blur(22px);
  opacity: calc(0.38 + var(--voice-energy) * 0.42);
  border-radius: 40% 40% 8% 8% / 55% 55% 12% 12%;
  animation: kouli-mist-col-rise 2.6s ease-in-out infinite;
  will-change: transform, opacity;
}

/* Tone palette — teal-dominant aurora with cyan/blue/slate depth.
   data-tone names kept (violet/purple/plum/indigo/blue/charcoal) so the
   JS column builder is untouched; only the colours map to teal now. */
.kouli-mist-col[data-tone='violet'] {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(128, 245, 226, 0.08) 18%,
    rgba(0, 229, 192, 0.45) 50%,
    rgba(0, 196, 160, 0.72) 100%
  );
}

.kouli-mist-col[data-tone='purple'] {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 229, 192, 0.1) 20%,
    rgba(0, 196, 160, 0.5) 52%,
    rgba(0, 150, 124, 0.78) 100%
  );
}

.kouli-mist-col[data-tone='plum'] {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 196, 160, 0.08) 22%,
    rgba(0, 122, 100, 0.42) 55%,
    rgba(0, 61, 51, 0.7) 100%
  );
}

.kouli-mist-col[data-tone='indigo'] {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(102, 224, 235, 0.1) 20%,
    rgba(34, 211, 238, 0.48) 50%,
    rgba(14, 165, 233, 0.75) 100%
  );
}

.kouli-mist-col[data-tone='blue'] {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(125, 211, 252, 0.1) 25%,
    rgba(56, 189, 248, 0.46) 55%,
    rgba(2, 132, 199, 0.72) 100%
  );
}

.kouli-mist-col[data-tone='charcoal'] {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(71, 85, 105, 0.12) 22%,
    rgba(51, 65, 85, 0.38) 50%,
    rgba(30, 50, 60, 0.62) 78%,
    rgba(18, 30, 36, 0.85) 100%
  );
}

@keyframes kouli-mist-col-rise {
  0%,
  100% {
    transform: scaleY(calc(var(--col-scale, 0.3) * 0.75)) translateY(2%);
    opacity: calc(0.32 + var(--voice-energy) * 0.38);
  }
  45% {
    transform: scaleY(calc(var(--col-scale, 0.3) * 1.08)) translateY(-8%);
    opacity: calc(0.48 + var(--voice-energy) * 0.52);
  }
  70% {
    transform: scaleY(calc(var(--col-scale, 0.3) * 0.92)) translateY(-4%);
  }
}

/* Quick starts — neutral grey/blue pills (teal reserved for the mist) */
.kouli-coach-quickstarts {
  flex-shrink: 0;
  margin-top: 24px;
  /* Bottom buffer so the last button row never sits flush against the
     sheet's rounded bottom edge. */
  padding: 0 0 14px;
}

.kouli-coach-quickstarts.hidden {
  display: none !important;
}

.kouli-coach-suggested-hint {
  margin: 0 0 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.kouli-coach-suggested-hint:empty {
  display: none;
}

.kouli-coach-quickstarts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.kouli-coach-quick-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 calc(50% - 10px);
  min-width: calc(50% - 10px);
  max-width: 100%;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 11px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.08) 0%,
      rgba(255, 255, 255, 0.03) 100%
    );
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  padding: 7px 14px;
  cursor: pointer;
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.kouli-coach-quick-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.kouli-coach-quick-btn-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.kouli-coach-quick-btn-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kouli-coach-quick-btn:hover {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.05) 100%
    );
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.kouli-coach-quick-btn:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.05s;
}

.kouli-coach-quick-btn:focus-visible {
  outline: 3px solid rgba(0, 196, 160, 0.85);
  outline-offset: 2px;
}

/* Staggered entrance — plays each time the quick-starts section becomes visible */
@keyframes kouli-coach-quick-btn-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kouli-coach-quickstarts:not(.hidden) .kouli-coach-suggested-hint,
.kouli-coach-quickstarts:not(.hidden) .kouli-coach-quick-btn {
  animation: kouli-coach-quick-btn-in 0.35s ease-out both;
}

.kouli-coach-quickstarts:not(.hidden) .kouli-coach-suggested-hint { animation-delay: 0ms; }
.kouli-coach-quickstarts:not(.hidden) .kouli-coach-quick-btn[data-coach-quick="interview"]       { animation-delay: 75ms;  }
.kouli-coach-quickstarts:not(.hidden) .kouli-coach-quick-btn[data-coach-quick="pitch"]           { animation-delay: 150ms; }
.kouli-coach-quickstarts:not(.hidden) .kouli-coach-quick-btn[data-coach-quick="ted"]             { animation-delay: 225ms; }
.kouli-coach-quickstarts:not(.hidden) .kouli-coach-quick-btn[data-coach-quick="daily-challenge"] { animation-delay: 300ms; }
.kouli-coach-quickstarts:not(.hidden) .kouli-coach-quick-btn[data-coach-quick="confidence"]      { animation-delay: 375ms; }

/* Primary action — Interview is the headline mode: full-width and elevated.
   Reads as primary through size + frosted weight, NOT colour (teal is spent
   on the mist; see colour contract). */
.kouli-coach-quick-btn[data-coach-quick="interview"] {
  order: -1;
  flex: 1 1 100%;
  min-width: 100%;
  min-height: 44px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 13px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.12) 55%,
      rgba(255, 255, 255, 0.06) 100%
    );
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.kouli-coach-quick-btn[data-coach-quick="interview"]:hover {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.18) 55%,
      rgba(255, 255, 255, 0.1) 100%
    );
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.kouli-coach-quick-btn[data-coach-quick="interview"] .kouli-coach-quick-btn-icon {
  width: 18px;
  height: 18px;
  color: #fff;
}

.kouli-coach-quick-btn.is-suggested {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.kouli-coach-quick-btn.is-suggested .kouli-coach-quick-btn-icon {
  color: #fff;
}

.kouli-coach-quick-btn.is-suggested::after {
  content: none;
}

@media (prefers-reduced-motion: reduce) {
  .kouli-coach-quick-btn,
  .kouli-coach-quick-btn:hover,
  .kouli-coach-quick-btn:active,
  .kouli-coach-quickstarts:not(.hidden) .kouli-coach-suggested-hint,
  .kouli-coach-quickstarts:not(.hidden) .kouli-coach-quick-btn,
  .kouli-coach-quickstarts:not(.hidden) .kouli-coach-more,
  .kouli-coach-more summary,
  .kouli-coach-more summary:hover,
  .kouli-coach-more summary:active {
    animation: none;
    transition: none;
    transform: none;
  }
}

.kouli-coach-more {
  margin-top: 16px;
  text-align: center;
}

.kouli-coach-more summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transform-origin: center;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.1s ease;
}

.kouli-coach-more summary:hover {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

.kouli-coach-more summary:active {
  transform: scale(0.98);
  transition-duration: 0.05s;
}

.kouli-coach-more summary:focus-visible {
  outline: 3px solid rgba(0, 196, 160, 0.85);
  outline-offset: 2px;
}

.kouli-coach-more summary::-webkit-details-marker {
  display: none;
}

.kouli-coach-more[open] summary {
  margin-bottom: 12px;
}

.kouli-coach-more .kouli-coach-quick-btn {
  display: inline-flex;
  flex: none;
  min-width: 10rem;
  justify-content: center;
}
