html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(246, 201, 93, 0.28), transparent 36%),
    linear-gradient(180deg, #f5efe4 0%, #efe5d3 100%);
  color: #1f2933;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

body {
  display: grid;
  place-items: center;
  padding: 24px;
}

#chat-shell {
  width: min(100%, 420px);
  position: relative;
}

#chat-accent {
  position: absolute;
  inset: 16px -8px -16px 8px;
  border-radius: 28px;
  background: linear-gradient(145deg, #db6f45, #8b3b2f);
  opacity: 0.18;
  filter: blur(18px);
}

#chat-container {
  position: relative;
  min-height: 620px;
  border-radius: 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(255, 252, 246, 0.95);
  border: 1px solid rgba(82, 50, 32, 0.12);
  box-shadow: 0 24px 70px rgba(72, 46, 31, 0.16);
}

#chat-header {
  padding: 22px 22px 16px;
  background: linear-gradient(135deg, #1d4d58, #24485f 56%, #345d63);
  color: #f8f6f0;
}

#chat-header h1 {
  margin: 4px 0 0;
  font-size: 1.7rem;
  line-height: 1.1;
}

.eyebrow,
.subtle,
.screen-copy,
.field span,
.message,
.error,
button,
input {
  letter-spacing: 0.01em;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.72rem;
  opacity: 0.74;
}

.subtle {
  margin: 10px 0 0;
  max-width: 18rem;
  color: rgba(248, 246, 240, 0.78);
  font-size: 0.95rem;
}

.screen {
  padding: 20px;
}

#chat-verify {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.screen-copy {
  margin: 6px 0 2px;
  color: #5d6570;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field span {
  font-size: 0.84rem;
  color: #6e5443;
}

input {
  border: 1px solid rgba(111, 83, 58, 0.16);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.82);
  outline: none;
  font-size: 0.98rem;
}

input:focus {
  border-color: #cc6e43;
  box-shadow: 0 0 0 4px rgba(204, 110, 67, 0.14);
}

button {
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #cd6b42, #ab4e39);
  color: #fff9f2;
  font-weight: 600;
  cursor: pointer;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(246, 240, 230, 0.9), rgba(255, 252, 246, 0.98)),
    radial-gradient(circle at top right, rgba(36, 72, 95, 0.05), transparent 32%);
}

#chat-input {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid rgba(111, 83, 58, 0.1);
  background: rgba(255, 252, 246, 0.96);
}

#chat-input input {
  flex: 1;
}

.message {
  max-width: 78%;
  padding: 11px 14px;
  border-radius: 18px;
  line-height: 1.4;
  font-size: 0.95rem;
}

.incoming {
  align-self: flex-start;
  background: #f1ebe2;
  color: #24303d;
  border-top-left-radius: 6px;
}

.outgoing {
  align-self: flex-end;
  background: linear-gradient(135deg, #29566a, #1e4557);
  color: #f8fafc;
  border-top-right-radius: 6px;
}

.hidden {
  display: none !important;
}

.error {
  margin: 0;
  color: #b42318;
  font-size: 0.9rem;
}

@media (max-width: 520px) {
  body {
    padding: 0;
  }

  #chat-shell,
  #chat-container {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
  }

  #chat-accent {
    display: none;
  }
}
