* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f6f8;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #111827;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 32px;
}

.avatar-panel,
.control-panel {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.avatar-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.avatar {
  max-width: 80%;
  max-height: 80vh;
  object-fit: contain;
}

.mouth {
  position: absolute;
  bottom: 26%;
  width: 48px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  transition: height 80ms linear;
}

h1 {
  margin-top: 0;
  font-size: 28px;
}

button {
  font-size: 16px;
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

button.secondary {
  background: #374151;
}

button.danger {
  background: #b91c1c;
}

.persona-row,
.main-row {
  display: flex;
  gap: 12px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.status-box {
  margin: 20px 0;
  padding: 14px;
  background: #eef2ff;
  border-radius: 12px;
  line-height: 1.8;
}

.status-box span.ok {
  color: #047857;
  font-weight: 700;
}

.status-box span.warn {
  color: #b45309;
  font-weight: 700;
}

.status-box span.bad {
  color: #b91c1c;
  font-weight: 700;
}

.notice {
  padding: 12px;
  background: #fff7ed;
  border-radius: 12px;
  color: #9a3412;
  line-height: 1.6;
}

.chat {
  margin-top: 20px;
  line-height: 1.7;
}

.chat-block {
  margin-bottom: 18px;
}

.chat p {
  min-height: 48px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 12px;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .avatar {
    max-height: 50vh;
  }
}