:root {
  --bg: #0a0e12;
  --bg-chat: #0f1419;
  --surface: #1a2329;
  --border: #2a3540;
  --text: #e8edf2;
  --text-muted: #8b9aab;
  --accent: #00c896;
  --accent-dim: #00a67c;
  --bubble-ia: #1e2a32;
  --bubble-user: #005c47;
  --danger: #ff6b6b;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --font: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  justify-content: center;
  align-items: stretch;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 200, 150, 0.12), transparent),
    var(--bg);
}

.app {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-height: 100dvh;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--bg-chat);
  box-shadow: var(--shadow);
}

.app--hidden {
  visibility: hidden;
  pointer-events: none;
  position: fixed;
  width: 100%;
  max-width: 480px;
  opacity: 0;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.topbar__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #008f6e);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.topbar__info {
  flex: 1;
  min-width: 0;
}

.topbar__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.topbar__status {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--accent);
}

.topbar__badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.chat {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.row {
  display: flex;
  width: 100%;
}

.row--user {
  justify-content: flex-end;
}

.row--ia {
  justify-content: flex-start;
}

.bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  line-height: 1.45;
  position: relative;
}

.bubble--ia {
  background: var(--bubble-ia);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}

.bubble--user {
  background: var(--bubble-user);
  border-bottom-right-radius: 4px;
  color: #e8fff8;
}

.bubble__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.bubble--user .bubble__label {
  color: rgba(255, 255, 255, 0.65);
  text-align: right;
}

.bubble__meta {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: right;
}

.bubble--ia .bubble__meta {
  text-align: left;
}

.bubble--ia em {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9em;
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 14px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.composer__input {
  flex: 1;
  resize: none;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  background: var(--bg-chat);
  color: var(--text);
  max-height: 120px;
}

.composer__input:focus {
  outline: none;
  border-color: var(--accent-dim);
}

.composer__send {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #042;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.composer__send:hover:not(:disabled) {
  background: #00e0a8;
}

.composer__send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Scène : menu de départ */
.scene-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(0, 200, 150, 0.14), transparent),
    rgba(5, 8, 10, 0.92);
  backdrop-filter: blur(10px);
}

.scene-layer[hidden] {
  display: none !important;
}

.scene-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px 22px 22px;
  box-shadow: var(--shadow);
  text-align: center;
}

.scene-card__eyebrow {
  margin: 0 0 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.scene-card__title {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.scene-card__sub {
  margin: 0 0 22px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.scene-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scene-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-chat);
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.scene-btn:hover {
  border-color: var(--accent-dim);
  background: rgba(0, 200, 150, 0.06);
}

.scene-btn:active {
  transform: scale(0.98);
}

.scene-btn__emoji {
  font-size: 1.65rem;
  line-height: 1;
  flex-shrink: 0;
}

.scene-btn__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.scene-btn__label {
  font-size: 1rem;
  font-weight: 600;
}

.scene-btn__hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.score-layer[hidden] {
  display: none !important;
}

.score-layer {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 10, 0.78);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 100;
}

.score-card {
  width: 100%;
  max-width: 440px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.score-card__eyebrow {
  margin: 0 0 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.score-card__title {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 700;
}

.score-card__value {
  margin: 0 0 16px;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.score-card__text {
  margin: 0 0 16px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.feedback-dims {
  text-align: left;
  margin: 0 0 20px;
  padding: 14px 14px 4px;
  border-radius: var(--radius-sm);
  background: var(--bg-chat);
  border: 1px solid var(--border);
}

.feedback-dims[hidden] {
  display: none !important;
}

.dim {
  margin: 0 0 12px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.dim strong {
  color: var(--text);
  font-weight: 600;
}

.dim__score {
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.score-card__btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #042;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.score-card__btn:hover {
  background: #00e0a8;
}

.score-card__btn + .score-card__btn,
.conversation-history + .score-card__btn {
  margin-top: 10px;
}

.score-card__btn--ghost {
  margin-bottom: 10px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

.score-card__btn--ghost:hover {
  background: rgba(0, 200, 150, 0.08);
}

.conversation-history {
  max-height: min(52dvh, 520px);
  overflow-y: auto;
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-chat);
  text-align: left;
}

.conversation-history[hidden] {
  display: none !important;
}

.history-item {
  margin: 0 0 12px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.history-item:last-child {
  margin-bottom: 0;
}

.history-item--user {
  background: rgba(0, 200, 150, 0.08);
}

.history-item__meta {
  margin-bottom: 4px;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.history-item__body {
  font-size: 0.92rem;
  line-height: 1.48;
  color: var(--text);
}

.history-item__body em {
  color: var(--text-muted);
}

.typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--bubble-ia);
  border-radius: var(--radius);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
  width: fit-content;
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: bounce 1.2s ease infinite;
}

.typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

/* —— Lancer les tests —— */
.scene-card__tests {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.scene-card__tests-hint {
  margin: 10px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.open-debug-btn,
.run-tests-btn {
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s, opacity 0.15s;
}

.open-debug-btn:hover:not(:disabled),
.run-tests-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.open-debug-btn:disabled,
.run-tests-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.open-debug-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--bg-chat);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.open-debug-btn:hover:not(:disabled) {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.run-tests-btn.launch-tests-btn--hero,
.launch-tests-btn--hero {
  display: block;
  width: 100%;
  padding: 14px 20px;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: #041a14;
  background: linear-gradient(135deg, #00e6a8 0%, var(--accent) 55%, var(--accent-dim) 100%);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(0, 200, 150, 0.35);
}

.run-tests-btn.launch-tests-btn--hero:hover:not(:disabled),
.launch-tests-btn--hero:hover:not(:disabled) {
  box-shadow: 0 6px 28px rgba(0, 200, 150, 0.45);
}

.launch-tests-fab.open-debug-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 95;
  width: auto;
  padding: 10px 16px;
  font-size: 0.82rem;
  color: #041a14;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 200, 150, 0.3);
}

.scene-layer:not([hidden]) ~ .launch-tests-fab.open-debug-btn {
  z-index: 95;
}

.topbar__tests {
  flex-shrink: 0;
  margin-left: 6px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #041a14;
  background: var(--accent);
  border-radius: 999px;
}

.debug-layer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 12px;
  background: rgba(4, 8, 12, 0.92);
  backdrop-filter: blur(6px);
}

.debug-panel {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  max-height: 100dvh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.debug-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--border);
}

.debug-panel__eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.debug-panel__title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
}

.debug-panel__sub {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 52ch;
}

.debug-panel__close {
  flex-shrink: 0;
  padding: 8px 14px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-chat);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.debug-panel__cta {
  padding: 0 20px 14px;
}

.debug-panel__cta .launch-tests-btn--hero {
  width: 100%;
}

.debug-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 0 20px 14px;
  border-bottom: 1px solid var(--border);
}

.debug-controls__label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.debug-controls__select {
  flex: 1;
  min-width: 140px;
  padding: 8px 12px;
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg-chat);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.debug-controls__btn {
  padding: 8px 14px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-chat);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.debug-controls__btn--primary {
  color: #041a14;
  background: var(--accent);
  border-color: var(--accent-dim);
}

.debug-controls__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.debug-progress {
  margin: 0;
  padding: 10px 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.debug-results {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.debug-summary {
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  background: var(--bg-chat);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.debug-insights {
  padding: 16px 18px;
  background: linear-gradient(165deg, rgba(0, 200, 150, 0.08) 0%, var(--bg-chat) 42%);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
}

.debug-insights__head {
  margin-bottom: 14px;
}

.debug-insights__title {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 700;
}

.debug-insights__sub {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.debug-insights__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 640px) {
  .debug-insights__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.debug-insights__block {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.debug-insights__block--wide {
  margin-top: 14px;
}

.debug-insights__block h4 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.debug-insights__priority {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.debug-insights__priority li {
  padding: 10px 12px;
  background: var(--bg-chat);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  font-size: 0.86rem;
  line-height: 1.45;
}

.debug-insights__rank {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #041a14;
  background: var(--accent);
  border-radius: 999px;
}

.debug-insights__detail,
.debug-insights__fix {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.debug-insights__fix {
  color: var(--text);
}

.debug-insights__list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.86rem;
  line-height: 1.5;
}

.debug-insights__list li {
  margin-bottom: 6px;
}

.debug-insights__count {
  font-weight: 700;
  color: var(--accent);
}

.debug-insights__tag {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.debug-insights__scenes .debug-insights__scene-name {
  font-weight: 600;
}

.debug-insights__score {
  font-weight: 700;
}

.debug-insights__score--warn {
  color: #e6b800;
}

.debug-insights__score--fail {
  color: var(--danger);
}

.debug-insights__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.debug-insights__code {
  font-size: 0.72rem;
  padding: 1px 6px;
  background: var(--bg-chat);
  border-radius: 4px;
}

.debug-insights__examples {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.debug-insights__examples li {
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--danger);
}

.debug-insights__ex-label {
  margin: 0 0 6px;
  font-size: 0.84rem;
}

.debug-insights__ex-player,
.debug-insights__ex-ai {
  margin: 0 0 4px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.debug-insights__ex-ai {
  color: var(--text);
}

.debug-insights__empty {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.debug-insights__footnote {
  margin: 14px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

.debug-correction-prompt {
  padding: 16px 18px;
  background: var(--bg-chat);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent);
}

.debug-correction-prompt__head {
  margin-bottom: 10px;
}

.debug-correction-prompt__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
}

.debug-correction-prompt__sub {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.debug-correction-prompt__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.debug-correction-prompt__copy {
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: #041a14;
  background: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.debug-correction-prompt__copy:hover {
  filter: brightness(1.06);
}

.debug-correction-prompt__textarea {
  width: 100%;
  min-height: 220px;
  padding: 12px 14px;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  resize: vertical;
  box-sizing: border-box;
}

.debug-card {
  padding: 14px 16px;
  background: var(--bg-chat);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--border);
}

.debug-card--ok {
  border-left-color: var(--accent);
}

.debug-card--warn {
  border-left-color: #e6b800;
}

.debug-card--fail {
  border-left-color: var(--danger);
}

.debug-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.debug-card__title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
}

.debug-card__meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.debug-card__score {
  text-align: center;
  flex-shrink: 0;
}

.debug-card__score-val {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.debug-card__score--ok .debug-card__score-val {
  color: var(--accent);
}

.debug-card__score--warn .debug-card__score-val {
  color: #e6b800;
}

.debug-card__score--fail .debug-card__score-val {
  color: var(--danger);
}

.debug-card__score-lbl {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.debug-card__context,
.debug-card__intro,
.debug-card__scene-tag {
  margin: 0 0 10px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.debug-card__scene-tag strong {
  color: var(--text);
}

.debug-card__thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.debug-turn {
  font-size: 0.86rem;
  line-height: 1.45;
}

.debug-turn__player {
  margin-bottom: 4px;
  color: var(--text);
}

.debug-turn__ai {
  color: #b8e8d8;
}

.debug-turn__tags,
.debug-turn__phrase {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.debug-card__problems {
  margin: 0 0 8px;
  padding-left: 18px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.debug-problem--high {
  color: #ffb4b4;
}

.debug-problem--medium {
  color: #ffe08a;
}

.debug-card__ok {
  margin: 0 0 8px;
  font-size: 0.84rem;
  color: var(--accent);
}

.debug-card__detects {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}
