:root {
  font-family: ui-rounded, "Hiragino Maru Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  color: #25221f;
  background: #f4f0e7;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 35rem),
    #f4f0e7;
}

button,
textarea,
input {
  font: inherit;
}

button,
.button-link {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.shell {
  width: min(100% - 24px, 760px);
  margin: 0 auto;
  padding: 40px 0;
}

.panel {
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(37, 34, 31, 0.1);
  border-radius: 28px;
  box-shadow: 0 18px 50px rgba(66, 56, 43, 0.08);
  padding: clamp(22px, 5vw, 44px);
}

.landing {
  margin-top: min(12vh, 90px);
}

.eyebrow {
  margin: 0 0 8px;
  color: #7b6c57;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 9vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.lead {
  max-width: 34rem;
  margin: 24px 0 8px;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  line-height: 1.7;
}

.note,
.footer-note,
.small {
  color: #766d62;
}

.note {
  margin: 0 0 28px;
  line-height: 1.7;
}

.primary {
  background: #25221f;
  color: #fffdf8;
  font-weight: 800;
  padding: 13px 22px;
}

.button-link {
  display: inline-block;
  margin-top: 18px;
  text-decoration: none;
}

.room {
  min-height: min(760px, calc(100vh - 80px));
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr) auto auto auto;
  gap: 18px;
}

.room-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.room-header h1 {
  font-size: clamp(2rem, 7vw, 3.6rem);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: #eee8dc;
  color: #5c5349;
  padding: 8px 12px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.status[data-state="open"] {
  background: #e1eee1;
  color: #31583a;
}

.status[data-state="expired"],
.status[data-state="closed"] {
  background: #eee2df;
  color: #76453f;
}

.invite {
  padding: 14px 16px;
  border-radius: 18px;
  background: #f6f1e8;
}

.invite label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.84rem;
  font-weight: 800;
}

.invite-row {
  display: flex;
  gap: 8px;
}

.invite-row input {
  min-width: 0;
  flex: 1;
  border: 1px solid #d9d0c2;
  border-radius: 12px;
  background: #fffdf8;
  padding: 10px 12px;
}

.invite-row button {
  background: #ded5c7;
  color: #403a33;
  padding: 9px 14px;
  font-weight: 700;
}

.small {
  margin: 7px 0 0;
  font-size: 0.78rem;
}

.messages {
  min-height: 260px;
  overflow-y: auto;
  padding: 8px 2px;
  scroll-behavior: smooth;
}

.message {
  max-width: 78%;
  margin: 0 auto 12px 0;
}

.message.own {
  margin-left: auto;
  margin-right: 0;
}

.message-meta {
  margin: 0 8px 5px;
  color: #877e72;
  font-size: 0.72rem;
}

.message.own .message-meta {
  text-align: right;
}

.message-body {
  margin: 0;
  border-radius: 18px 18px 18px 6px;
  background: #eee8dc;
  padding: 10px 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message.own .message-body {
  border-radius: 18px 18px 6px 18px;
  background: #25221f;
  color: #fffdf8;
}

.composer {
  border: 1px solid #d9d0c2;
  border-radius: 20px;
  background: #fffdf8;
  padding: 10px;
}

.composer textarea {
  width: 100%;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 6px 8px;
  line-height: 1.55;
}

.composer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.composer-bottom .small {
  margin: 0 0 0 8px;
}

.error {
  margin: 0;
  border-radius: 12px;
  background: #f4e4e0;
  color: #7a352d;
  padding: 10px 12px;
  line-height: 1.5;
}

.footer-note {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  .shell {
    width: 100%;
    padding: 0;
  }

  .panel {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 24px 16px;
  }

  .landing {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .room {
    min-height: 100vh;
  }

  .room-header {
    align-items: center;
  }

  .message {
    max-width: 88%;
  }
}
