/* Стили для блока «Курилка жюри» (дискуссия двух систем на лендинге) */

.contest-lounge-grid {
  display: grid;
  grid-template-columns: 3fr 7fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.25rem;
}

@media (max-width: 53.75em) {
  .contest-lounge-grid {
    grid-template-columns: 1fr;
  }
}

.contest-column,
.lounge-column {
  min-width: 0;
}

.lounge-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lounge-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.lounge-header h2 {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
}

.lounge-subtitle {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.lounge-story-card {
  padding: 0.875rem 1rem;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.lounge-story-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.lounge-story-synopsis {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.lounge-story-excerpt-details summary {
  font-size: 0.75rem;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.lounge-story-excerpt-details summary:hover {
  text-decoration: underline;
}

.lounge-story-excerpt {
  margin-top: 0.5rem;
  padding: 0.625rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 0.375rem;
  font-size: 0.775rem;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.45;
  max-height: 11.25rem;
  overflow-y: auto;
}

.lounge-chat-window {
  min-height: 17.5rem;
  max-height: 26.25rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 0.875rem;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  gap: 0.75rem;
}

.lounge-messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lounge-bubble {
  position: relative;
  max-width: 90%;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.45;
  animation: loungeFadeIn 0.25s ease-out;
}

@keyframes loungeFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* План 86: пузыри в палитре конкурса — шалфей у Элизы, тёплый серый у Дениса; аватар-буква слева/справа. */
.lounge-bubble--eliza {
  align-self: flex-start;
  margin-left: 2.25rem;
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
  color: var(--text-main);
  border-bottom-left-radius: 0.125rem;
}

.lounge-bubble--denis {
  align-self: flex-end;
  margin-right: 2.25rem;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-bottom-right-radius: 0.125rem;
}

.lounge-bubble--eliza::before,
.lounge-bubble--denis::before {
  position: absolute;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.75rem;
  text-align: center;
  color: var(--on-accent);
}
.lounge-bubble--eliza::before { content: "Э"; left: -2.25rem; background: var(--primary); }
.lounge-bubble--denis::before { content: "Д"; right: -2.25rem; background: var(--text-main); }

.lounge-bubble__author {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.lounge-bubble--eliza .lounge-bubble__author {
  color: var(--success);
}

.lounge-bubble--denis .lounge-bubble__author {
  color: var(--text-muted);
}

.lounge-bubble__role {
  font-weight: normal;
  font-size: 0.7rem;
  opacity: 0.75;
}

.lounge-bubble__text {
  word-break: break-word;
}

.lounge-typing {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: color-mix(in srgb, var(--text-main) 4%, transparent);
  border-radius: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
}

.typing-dots span {
  animation: loungeBlink 1.4s infinite both;
}

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

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

@keyframes loungeBlink {
  0%, 80%, 100% {
    opacity: 0.2;
  }
  40% {
    opacity: 1;
  }
}

.lounge-cursor {
  display: inline-block;
  width: 0.125rem;
  height: 1.05em;
  background-color: currentColor;
  margin-left: 0.125rem;
  vertical-align: -0.15em;
  animation: loungeCursorBlink 0.65s infinite;
}

@keyframes loungeCursorBlink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
