:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #edf4f2;
  color: #173638;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(155deg, #d9ebe6 0%, #f7faf9 48%, #e8f0ee 100%);
}

.shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 18px 24px;
  display: flex;
  flex-direction: column;
}

header {
  padding: 24px;
  border-radius: 22px;
  background: #0d5c63;
  color: #fff;
  box-shadow: 0 16px 44px rgb(13 92 99 / 18%);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  opacity: 0.8;
}

h1 { margin: 0; font-size: clamp(1.65rem, 7vw, 2.5rem); line-height: 1.08; }
.status { margin: 14px 0 0; color: #d9f0ec; line-height: 1.45; }

.chat {
  flex: 1;
  min-height: 180px;
  padding: 22px 2px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  max-width: 88%;
  padding: 12px 15px;
  border-radius: 17px 17px 17px 5px;
  background: #fff;
  box-shadow: 0 5px 18px rgb(24 58 60 / 8%);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.48;
}

.message.mine {
  align-self: flex-end;
  border-radius: 17px 17px 5px 17px;
  background: #d2ebe5;
}

.message.error { color: #7b1c1c; background: #fff0f0; }

.composer {
  position: sticky;
  bottom: 0;
  padding: 16px;
  border: 1px solid #d6e4e0;
  border-radius: 20px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 14px 36px rgb(24 58 60 / 14%);
}

label { display: block; margin-bottom: 7px; font-weight: 750; }

textarea {
  width: 100%;
  resize: vertical;
  min-height: 86px;
  padding: 12px;
  border: 1px solid #aec7c1;
  border-radius: 12px;
  font: inherit;
  line-height: 1.4;
  color: inherit;
  background: #fbfdfc;
}

textarea:focus { outline: 3px solid rgb(17 128 137 / 20%); border-color: #117b83; }
.actions { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
#counter { color: #647b78; font-size: 0.82rem; }

button {
  min-width: 112px;
  padding: 11px 18px;
  border: 0;
  border-radius: 11px;
  background: #0d6870;
  color: #fff;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

button:hover { background: #09545a; }
button:disabled { opacity: 0.55; cursor: wait; }

@media (min-width: 680px) {
  .shell { min-height: 720px; padding: 44px 24px; }
  header { padding: 30px; }
  .composer { bottom: 18px; }
}

