/* DS4K — Thinking Loop bottom sheet (생각 확인하기) */

.tl-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.tl-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.tl-sheet {
  width: min(100%, 520px);
  max-height: min(78vh, 560px);
  overflow: auto;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 12px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.18);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.tl-overlay.is-open .tl-sheet {
  transform: translateY(0);
}

.tl-handle {
  width: 40px;
  height: 4px;
  margin: 4px auto 12px;
  border-radius: 999px;
  background: #cbd5e1;
}

.tl-question {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.45;
}

.tl-subtitle {
  margin: 0 0 14px;
  font-size: 0.82rem;
  color: #64748b;
}

.tl-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tl-option {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

.tl-option:hover:not(:disabled) {
  border-color: #818cf8;
  background: #eef2ff;
}

.tl-option:active:not(:disabled) {
  transform: scale(0.985);
}

.tl-option:disabled {
  cursor: default;
  opacity: 0.85;
}

.tl-option.is-correct {
  border-color: #22c55e;
  background: #ecfdf5;
  color: #166534;
}

.tl-option.is-wrong {
  border-color: #f87171;
  background: #fef2f2;
  color: #991b1b;
  animation: tl-shake 0.38s ease;
}

@keyframes tl-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}
