* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #111111;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid #ececec;
}

.name {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.about-link {
  color: #111;
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.about-link:hover {
  border-bottom-color: #111;
}

.stage {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portrait {
  width: min(360px, 80vw);
  height: min(360px, 80vw);
  margin-bottom: 2rem;
  overflow: hidden;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.intro {
  font-size: 1.15rem;
  margin: 0 0 1.75rem;
  color: #444;
}

.chat {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.messages {
  border: 1px solid #e4e4e4;
  border-radius: 10px;
  padding: 1rem;
  min-height: 220px;
  max-height: 400px;
  overflow-y: auto;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.msg {
  max-width: 85%;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  font-size: 0.95rem;
  word-wrap: break-word;
}

.msg-bot {
  background: #ffffff;
  border: 1px solid #ececec;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.msg-user {
  background: #111;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.composer {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.composer input[type="text"] {
  flex: 1;
  padding: 0.7rem 0.9rem;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: #111;
}

.composer input[type="text"]:focus {
  outline: none;
  border-color: #111;
}

.composer button {
  padding: 0.7rem 1.25rem;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.composer button:hover {
  background: #333;
}

.hint {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: #888;
  text-align: center;
}

.made-link {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}

.made-link a {
  color: #ff3030;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.made-link a:hover {
  border-bottom-color: #ff3030;
}
