.guard-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 640px;
  margin: 1.5rem auto 2.5rem;
}

.guard-level-indicator {
  text-align: center;
}

#guard-level-text {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--paper);
}

.guard-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.guard-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
}

.guard-dot.filled {
  background: var(--spray-acid);
  border-color: var(--spray-acid);
}

.guard-dot.current {
  box-shadow: 0 0 0 3px rgba(182, 255, 60, 0.25);
}

.guard-chat-window {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-drip);
  padding: 1rem;
  height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.guard-msg {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius);
  max-width: 80%;
  line-height: 1.4;
}

.guard-msg--visitor {
  align-self: flex-end;
  background: linear-gradient(120deg, var(--spray-pink), var(--spray-purple));
  color: var(--paper);
}

.guard-msg--guard {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--paper);
  border: 1px solid var(--line);
}

.guard-msg--system {
  align-self: center;
  background: transparent;
  color: var(--muted);
  font-style: italic;
  font-size: 0.8rem;
  max-width: 100%;
  text-align: center;
}

.guard-msg--typing {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.guard-msg--typing span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--muted);
  animation: guard-typing-pulse 1.2s infinite ease-in-out;
}

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

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

@keyframes guard-typing-pulse {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: scale(0.85);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

.guard-chat-controls {
  display: flex;
  gap: 0.5rem;
}

.guard-chat-controls textarea {
  flex: 1;
  resize: none;
  font-family: var(--font-body);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--paper);
  padding: 0.5rem 0.7rem;
}

.guard-guess-panel {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 0.85rem;
  text-align: center;
}

.guard-guess-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.guard-guess-controls {
  display: flex;
  gap: 0.5rem;
}

.guard-guess-controls input {
  flex: 1;
  font-family: var(--font-body);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--paper);
  padding: 0.5rem 0.7rem;
}

.guard-guess-hint {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--spray-yellow);
  margin: 0.5rem 0 0;
  min-height: 1em;
}

.guard-victory-overlay {
  text-align: center;
  padding: 1.5rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-drip);
}

.guard-victory-overlay h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--paper);
  text-shadow: 0 0 10px var(--spray-acid);
}

.guard-controls {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

@media (max-width: 576px) {
  .guard-chat-window {
    height: 300px;
  }
}
