:root {
  --ink: #17233d;
  --muted: #69778d;
  --line: #dce5f1;
  --paper: #f5f8fd;
  --white: #ffffff;
  --green: #2563eb;
  --green-dark: #1d4ed8;
  --mint: #dbeafe;
  --lime: #bfdbfe;
  --coral: #ff8c72;
  --shadow: 0 24px 80px rgba(30, 64, 175, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", system-ui, sans-serif;
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 40rem;
  height: 40rem;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.45;
}

.ambient-one {
  top: -20rem;
  left: -16rem;
  background: #dbeafe;
}

.ambient-two {
  right: -17rem;
  bottom: -24rem;
  background: #e0f2fe;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font: 800 1.55rem/1 "Manrope", sans-serif;
  letter-spacing: -0.06em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 2.1rem;
  height: 2.1rem;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.brand-mark span {
  position: absolute;
  top: 50%;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-50%);
}

.brand-mark span:first-child {
  left: 0.32rem;
}

.brand-mark span:last-child {
  right: 0.32rem;
}

.auth-view {
  display: grid;
  grid-template-columns: minmax(26rem, 0.9fr) minmax(30rem, 1.1fr);
  width: 100vw;
  min-height: 100vh;
  background: white;
}

.auth-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: clamp(2rem, 4vw, 4rem);
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 75% 28%, rgba(96, 165, 250, 0.48), transparent 26%),
    linear-gradient(145deg, #172554, #1d4ed8 72%, #2563eb);
}

.auth-story > .brand {
  position: relative;
  z-index: 2;
  align-self: flex-start;
}

.auth-story-content {
  position: absolute;
  z-index: 2;
  right: clamp(2rem, 6vw, 6rem);
  bottom: clamp(3.5rem, 9vh, 7rem);
  left: clamp(2rem, 6vw, 6rem);
  max-width: 34rem;
}

.auth-kicker {
  display: block;
  margin-bottom: 1.2rem;
  color: #bfdbfe;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.auth-story h1 {
  margin: 0;
  font: 800 clamp(2.8rem, 4.8vw, 5.1rem)/0.98 "Manrope", sans-serif;
  letter-spacing: -0.065em;
}

.auth-story-content > p {
  max-width: 31rem;
  margin: 1.5rem 0 2rem;
  color: #dbeafe;
  font-size: 1rem;
  line-height: 1.7;
}

.auth-proof {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auth-proof small {
  max-width: 13rem;
  color: #bfdbfe;
  font-size: 0.72rem;
  line-height: 1.5;
}

.auth-avatar-stack {
  display: flex;
}

.auth-avatar-stack span {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  margin-left: -0.55rem;
  color: #1e3a8a;
  border: 3px solid #2563eb;
  border-radius: 50%;
  background: #dbeafe;
  font-size: 0.57rem;
  font-weight: 800;
}

.auth-avatar-stack span:first-child {
  margin-left: 0;
}

.auth-avatar-stack span:nth-child(2) {
  background: #e0e7ff;
}

.auth-avatar-stack span:nth-child(3) {
  background: #bae6fd;
}

.auth-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
}

.auth-orbit-one {
  top: 10%;
  right: -12rem;
  width: 32rem;
  height: 32rem;
}

.auth-orbit-two {
  top: 20%;
  right: -4rem;
  width: 17rem;
  height: 17rem;
  border-style: dashed;
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  padding: 2rem;
  overflow-y: auto;
  place-items: center;
  background:
    radial-gradient(circle at 80% 10%, #eff6ff, transparent 28%),
    white;
}

.auth-card {
  width: min(100%, 29rem);
  padding: 1rem 0;
}

.auth-card > .eyebrow {
  margin-bottom: 0.7rem;
}

.auth-card h2 {
  margin: 0;
  font: 800 clamp(2rem, 3vw, 2.75rem)/1.08 "Manrope", sans-serif;
  letter-spacing: -0.055em;
}

.auth-card > p {
  margin: 0.7rem 0 1.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  margin-bottom: 1.35rem;
  padding: 0.28rem;
  border-radius: 0.85rem;
  background: #eef3fa;
}

.auth-tab {
  height: 2.65rem;
  color: #718096;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  font-size: 0.77rem;
  font-weight: 700;
}

.auth-tab.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 4px 16px rgba(30, 64, 175, 0.09);
}

.auth-form {
  display: grid;
  gap: 0.85rem;
}

.auth-form label {
  color: #46556b;
  font-size: 0.75rem;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  height: 3.15rem;
  margin-top: 0.45rem;
  padding: 0 0.95rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.78rem;
  outline: none;
  background: #fbfdff;
  transition: 160ms ease;
}

.auth-form input:focus {
  border-color: var(--green);
  background: white;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.09);
}

.auth-submit {
  width: 100%;
  margin-top: 0.35rem;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.auth-error {
  margin-top: 0.9rem;
  padding: 0.75rem 0.85rem;
  color: #9f2d28;
  border: 1px solid #f4c9c5;
  border-radius: 0.7rem;
  background: #fdf0ef;
  font-size: 0.72rem;
  line-height: 1.45;
}

.auth-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 1.15rem 0 0 !important;
  color: #8a98aa !important;
  font-size: 0.65rem !important;
  text-align: center;
}

.auth-security span {
  color: var(--green);
  font-size: 0.55rem;
}

.join-view {
  display: grid;
  grid-template-columns: minmax(26rem, 0.9fr) minmax(32rem, 1.1fr);
  min-height: 100vh;
}

.join-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 38rem;
  padding: 3rem clamp(3rem, 7vw, 7.5rem);
}

.join-card .brand {
  position: absolute;
  top: 3rem;
}

.join-account {
  position: absolute;
  top: 2.9rem;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.join-profile-button {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.5rem 0.3rem 0.35rem;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 0.75rem;
  background: transparent;
  text-align: left;
}

.join-profile-button:hover {
  border-color: #cbdcf5;
  background: white;
}

.join-account-avatar {
  width: 2rem;
  height: 2rem;
  font-size: 0.78rem;
}

.join-account-copy {
  display: grid;
  min-width: 0;
}

.join-account-copy strong,
.join-account-copy small {
  display: block;
  max-width: 8.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.join-account-copy strong {
  font-size: 0.69rem;
}

.join-account-copy small {
  margin-top: 0.08rem;
  color: var(--muted);
  font-size: 0.59rem;
}

.join-logout-button {
  padding: 0.38rem 0.58rem;
  color: var(--green);
  border: 1px solid #cbdcf5;
  border-radius: 0.5rem;
  background: white;
  font-size: 0.65rem;
  font-weight: 700;
}

.join-logout-button:hover {
  background: #eff6ff;
}

.eyebrow {
  margin-bottom: 1rem;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.join-card > .eyebrow {
  margin-top: 3.5rem;
}

.join-card h1 {
  max-width: 31rem;
  margin: 0;
  font: 800 clamp(2.8rem, 4.5vw, 4.6rem)/0.99 "Manrope", sans-serif;
  letter-spacing: -0.065em;
}

.join-card h1 span {
  color: var(--green);
}

.join-copy {
  max-width: 29rem;
  margin: 1.5rem 0 2.25rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.join-form {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: 27rem;
}

.join-form label {
  color: #46556b;
  font-size: 0.78rem;
  font-weight: 700;
}

.join-form input {
  width: 100%;
  height: 3.5rem;
  margin-top: 0.5rem;
  padding: 0 1rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  outline: none;
  background: rgba(255, 255, 255, 0.8);
  transition: 160ms ease;
}

.join-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.room-input {
  position: relative;
}

.room-input span {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 1rem;
  margin-top: 0.25rem;
  color: var(--green);
  font-size: 1.1rem;
  font-weight: 700;
  transform: translateY(-50%);
}

.room-input input {
  padding-left: 2.1rem;
}

.primary-button,
.call-button,
.secondary-button,
.reject-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  height: 3.5rem;
  border: 0;
  border-radius: 0.85rem;
  font-weight: 700;
  transition: 160ms ease;
}

.primary-button,
.call-button {
  color: white;
  background: var(--green);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

.primary-button {
  margin-top: 0.35rem;
}

.primary-button span {
  font-size: 1.35rem;
}

.primary-button:hover,
.call-button:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
  color: #909a95;
  font-size: 0.75rem;
}

.privacy-note span {
  color: var(--green);
  font-size: 0.45rem;
}

.join-visual {
  position: relative;
  display: grid;
  place-items: center;
  margin: 1.25rem;
  overflow: hidden;
  border-radius: 2rem;
  background:
    radial-gradient(circle at 50% 43%, rgba(255, 255, 255, 0.7), transparent 34%),
    linear-gradient(145deg, #e5effd, #cbdcf5);
}

.join-visual::before,
.join-visual::after {
  position: absolute;
  width: 20rem;
  height: 20rem;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
  content: "";
}

.join-visual::before {
  top: -8rem;
  right: -5rem;
}

.join-visual::after {
  bottom: -10rem;
  left: -7rem;
}

.orb {
  position: relative;
  display: grid;
  width: min(29vw, 28rem);
  height: min(29vw, 28rem);
  place-items: center;
}

.orb-ring {
  position: absolute;
  border: 1px solid rgba(37, 99, 235, 0.23);
  border-radius: 50%;
}

.orb-ring-one {
  inset: 0;
  animation: breathe 5s ease-in-out infinite;
}

.orb-ring-two {
  inset: 2.8rem;
  border-style: dashed;
  animation: rotate 28s linear infinite;
}

.orb-core {
  position: relative;
  width: 58%;
  height: 58%;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(219, 234, 254, 0.85));
  box-shadow:
    0 28px 70px rgba(30, 64, 175, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.mini-avatar,
.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #1e3a8a;
  border-radius: 50%;
  font-weight: 700;
}

.mini-avatar {
  position: absolute;
  width: 4.5rem;
  height: 4.5rem;
  border: 5px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 10px 30px rgba(30, 64, 175, 0.15);
}

.avatar-sage {
  top: -1rem;
  left: 50%;
  background: #bfdbfe;
  transform: translateX(-50%);
}

.avatar-coral {
  right: -1.3rem;
  bottom: 1rem;
  background: #ffc0ad;
}

.avatar-blue {
  bottom: 1rem;
  left: -1.3rem;
  background: #bad9e8;
}

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 13.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 40px rgba(30, 64, 175, 0.12);
  backdrop-filter: blur(14px);
}

.floating-card strong,
.floating-card small {
  display: block;
}

.floating-card strong {
  font-size: 0.85rem;
}

.floating-card small {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.floating-chat {
  top: 15%;
  right: 8%;
}

.floating-call {
  bottom: 14%;
  left: 8%;
}

.status-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.call-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--green);
  border-radius: 0.65rem;
  background: var(--mint);
  font-size: 1.4rem;
}

.app-view {
  display: grid;
  grid-template-columns: 18.5rem 1fr;
  width: 100vw;
  height: 100vh;
  background: var(--white);
}

.sidebar {
  z-index: 4;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.8rem 1.2rem 1.2rem;
  border-right: 1px solid var(--line);
  background: #f5f8fd;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.45rem 2.4rem;
}

.brand-small {
  font-size: 1.35rem;
}

.brand-small .brand-mark {
  width: 1.75rem;
  height: 1.75rem;
}

.brand-small .brand-mark span {
  width: 0.48rem;
  height: 0.48rem;
}

.sidebar-close {
  display: none !important;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.people-section {
  min-height: 0;
  flex: 1;
}

.section-label {
  padding: 0 0.55rem;
  color: #8a958f;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.active-room {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.7rem;
  padding: 0.9rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.9rem;
  background: #eff6ff;
}

.active-room strong,
.active-room small {
  display: block;
  max-width: 10.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-room strong {
  font-size: 0.88rem;
}

.active-room small {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.room-hash {
  color: var(--green);
  font-size: 1.15rem;
  font-weight: 700;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}

.count-badge {
  display: grid;
  min-width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  color: var(--muted);
  border-radius: 1rem;
  background: #e8eef7;
  font-size: 0.65rem;
}

.people-list {
  display: grid;
  gap: 0.22rem;
  max-height: 100%;
  overflow: auto;
}

.person {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.55rem;
  border-radius: 0.7rem;
}

.person:hover {
  background: #edf3fb;
}

.avatar {
  width: 2.2rem;
  height: 2.2rem;
  background: var(--mint);
  font-size: 0.72rem;
}

.avatar.avatar-emoji {
  font-size: 1rem;
}

.person-copy {
  min-width: 0;
}

.person-copy strong,
.person-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-copy strong {
  font-size: 0.8rem;
}

.person-copy small {
  margin-top: 0.12rem;
  color: #8b9690;
  font-size: 0.65rem;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: white;
}

.profile-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 0.7rem;
  padding: 0.35rem;
  color: var(--ink);
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  text-align: left;
}

.profile-main:hover {
  background: #edf3fb;
}

.profile-copy {
  min-width: 0;
  flex: 1;
}

.profile-copy strong,
.profile-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy strong {
  font-size: 0.78rem;
}

.profile-copy small {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.65rem;
}

.icon-button {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  padding: 0;
  color: var(--muted);
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
}

.icon-button:hover {
  color: var(--ink);
  background: #edf3fb;
}

.chat-shell {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto 1fr auto auto;
  background:
    linear-gradient(rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.96)),
    radial-gradient(#b9c9c0 0.7px, transparent 0.7px);
  background-size: auto, 20px 20px;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5.3rem;
  padding: 1rem clamp(1.2rem, 3vw, 2.7rem);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.87);
  backdrop-filter: blur(12px);
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.title-row h2 {
  margin: 0;
  font: 700 1.15rem/1.2 "Manrope", sans-serif;
  letter-spacing: -0.03em;
}

.chat-title p {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.73rem;
}

.live-pill {
  padding: 0.26rem 0.45rem;
  color: var(--green);
  border-radius: 0.35rem;
  background: var(--mint);
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.header-actions {
  display: flex;
  gap: 0.65rem;
}

.secondary-button {
  height: 2.75rem;
  padding: 0 1rem;
  color: #4f5b55;
  border: 1px solid var(--line);
  background: white;
  box-shadow: none;
  font-size: 0.75rem;
}

.secondary-button:hover {
  border-color: #b9c9df;
  background: #f8faff;
}

.call-button {
  height: 2.75rem;
  padding: 0 1rem;
  font-size: 0.75rem;
}

.camera-symbol {
  position: relative;
  display: inline-block;
  width: 0.95rem;
  height: 0.7rem;
  border: 1.7px solid currentColor;
  border-radius: 0.2rem;
}

.camera-symbol::after {
  position: absolute;
  top: 0.08rem;
  right: -0.42rem;
  width: 0.35rem;
  height: 0.4rem;
  background: currentColor;
  clip-path: polygon(100% 0, 100% 100%, 0 75%, 0 25%);
  content: "";
}

.menu-button {
  display: none;
}

.messages {
  width: 100%;
  max-width: 58rem;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  overflow-y: auto;
}

.welcome-message {
  max-width: 34rem;
  margin: 2rem auto 3rem;
  text-align: center;
}

.welcome-icon {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  place-items: center;
  color: var(--green);
  border-radius: 1.1rem;
  background: var(--mint);
  font-size: 1.35rem;
  transform: rotate(-4deg);
}

.welcome-message h3 {
  margin: 0 0 0.45rem;
  font: 700 1.1rem "Manrope", sans-serif;
  letter-spacing: -0.025em;
}

.welcome-message p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.message {
  display: grid;
  grid-template-columns: 2.3rem minmax(0, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0;
  animation: message-in 200ms ease-out;
}

.message-content {
  min-width: 0;
}

.message-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.message-meta strong {
  font-size: 0.79rem;
}

.message-meta time {
  color: #98a29d;
  font-size: 0.62rem;
}

.message p {
  margin: 0.26rem 0 0;
  color: #35413b;
  font-size: 0.86rem;
  line-height: 1.58;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message.own .avatar {
  background: #dfe9b8;
}

.system-message {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.35rem 0;
  color: #8b9690;
  font-size: 0.68rem;
}

.system-message::before,
.system-message::after {
  height: 1px;
  flex: 1;
  background: #edf0ee;
  content: "";
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 58rem;
  width: 100%;
  margin: 0 auto;
  padding: 0.2rem clamp(1rem, 4vw, 3rem) 0.65rem;
  color: var(--muted);
}

.typing-indicator span {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: #84918a;
  animation: dots 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 120ms;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 240ms;
}

.typing-indicator em {
  margin-left: 0.35rem;
  font-size: 0.67rem;
  font-style: normal;
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  width: calc(100% - 2rem);
  max-width: 54rem;
  margin: 0 auto 1.5rem;
  padding: 0.5rem;
  border: 1px solid #d5e0ee;
  border-radius: 1rem;
  background: white;
  box-shadow: 0 10px 35px rgba(30, 64, 175, 0.08);
}

.composer:focus-within {
  border-color: #a9c4ea;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08), 0 10px 35px rgba(30, 64, 175, 0.08);
}

.composer textarea {
  min-height: 2.5rem;
  max-height: 8rem;
  flex: 1;
  padding: 0.62rem 0.35rem;
  resize: none;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.84rem;
  line-height: 1.3rem;
}

.composer textarea::placeholder {
  color: #a1aaa5;
}

.composer-action,
.send-button {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 0.75rem;
}

.composer-action {
  color: #78847e;
  background: #eff4fa;
  font-size: 1.2rem;
}

.send-button {
  color: white;
  background: var(--green);
  font-size: 1.25rem;
}

.send-button:hover {
  background: var(--green-dark);
}

.call-view {
  position: fixed;
  z-index: 20;
  inset: 0;
  padding: 1rem;
  background: #0f172a;
}

.video-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at 30% 20%, #24416d, transparent 40%),
    #172554;
}

.video-stage > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jitsi-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #101827;
}

.jitsi-container iframe {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  color: white;
  text-align: center;
}

.jitsi-loading {
  z-index: 2;
  background:
    radial-gradient(circle at 50% 35%, rgba(37, 99, 235, 0.3), transparent 30%),
    #101827;
  transition: opacity 220ms ease;
}

.jitsi-loading.ready {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.meeting-loader {
  display: flex;
  gap: 0.45rem;
  min-height: 3.5rem;
  align-items: center;
}

.meeting-loader span {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #60a5fa;
  animation: meeting-wave 1.1s infinite ease-in-out;
}

.meeting-loader span:nth-child(2) {
  animation-delay: 120ms;
}

.meeting-loader span:nth-child(3) {
  animation-delay: 240ms;
}

.video-avatar {
  width: 7rem;
  height: 7rem;
  color: #1e3a8a;
  background: #bfdbfe;
  font-size: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.video-placeholder h2 {
  margin: 1.3rem 0 0.3rem;
  font: 700 1.35rem "Manrope", sans-serif;
}

.video-placeholder p {
  margin: 0;
  color: #aab9b2;
  font-size: 0.8rem;
}

.call-topbar {
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1.5rem 1.7rem;
  background: linear-gradient(rgba(0, 0, 0, 0.4), transparent);
}

.brand-light {
  color: white;
  font-size: 1.3rem;
}

.brand-light .brand-mark {
  width: 1.7rem;
  height: 1.7rem;
}

.call-room-label {
  padding: 0.55rem 0.8rem;
  color: #dce7e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.6rem;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.72rem;
  backdrop-filter: blur(10px);
}

.local-video-wrap {
  position: absolute;
  top: 5.2rem;
  right: 1.5rem;
  width: min(20vw, 13rem);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 1rem;
  background: #263731;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.local-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.local-video-wrap span {
  position: absolute;
  bottom: 0.5rem;
  left: 0.55rem;
  padding: 0.25rem 0.42rem;
  color: white;
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.45);
  font-size: 0.6rem;
}

.call-controls {
  position: absolute;
  z-index: 4;
  bottom: 2rem;
  left: 50%;
  display: flex;
  gap: 0.8rem;
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.1rem;
  background: rgba(15, 23, 42, 0.76);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.control-button {
  display: grid;
  width: 3.3rem;
  height: 3.3rem;
  place-items: center;
  color: white;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.control-button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.control-button.off {
  color: #ed9c91;
  background: rgba(226, 75, 63, 0.16);
}

.control-button.end-call {
  background: #dc4b42;
  font-size: 1.4rem;
  transform: rotate(135deg);
}

.control-button.end-call:hover {
  background: #c73a32;
}

.modal-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(13, 23, 19, 0.58);
  backdrop-filter: blur(8px);
}

.incoming-card {
  width: min(100%, 26rem);
  padding: 2.4rem;
  border-radius: 1.4rem;
  background: white;
  box-shadow: var(--shadow);
  text-align: center;
}

.incoming-avatar {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.4rem;
  background: #d7e9df;
  font-size: 1.2rem;
}

.incoming-card .eyebrow {
  margin-bottom: 0.6rem;
  font-size: 0.62rem;
}

.incoming-card h2 {
  margin: 0;
  font: 700 1.45rem "Manrope", sans-serif;
  letter-spacing: -0.035em;
}

.incoming-card p {
  margin: 0.55rem 0 1.8rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.incoming-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.profile-modal {
  width: min(100%, 35rem);
  max-height: min(48rem, calc(100vh - 2rem));
  overflow: auto;
  border-radius: 1.4rem;
  background: white;
  box-shadow: var(--shadow);
}

.profile-modal-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.7rem 1.8rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.profile-modal-header .eyebrow {
  margin-bottom: 0.45rem;
  font-size: 0.62rem;
}

.profile-modal-header h2 {
  margin: 0;
  font: 800 1.55rem/1.15 "Manrope", sans-serif;
  letter-spacing: -0.04em;
}

.profile-form {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem 1.8rem 1.8rem;
}

.profile-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #dbe7f5;
  border-radius: 1rem;
  background: linear-gradient(135deg, #f8fbff, #eff6ff);
}

.profile-preview-avatar {
  width: 4rem;
  height: 4rem;
  font-size: 1.55rem;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.profile-preview-avatar.avatar-emoji {
  font-size: 1.7rem;
}

.profile-preview strong,
.profile-preview small {
  display: block;
  max-width: 24rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-preview strong {
  font: 800 1rem "Manrope", sans-serif;
}

.profile-preview small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.profile-fields {
  display: grid;
  gap: 0.9rem;
}

.profile-fields label {
  position: relative;
  display: grid;
  gap: 0.4rem;
  color: #42516a;
  font-size: 0.7rem;
  font-weight: 700;
}

.profile-fields input,
.profile-fields textarea {
  width: 100%;
  padding: 0.78rem 0.9rem;
  color: var(--ink);
  border: 1px solid #cad7e8;
  border-radius: 0.75rem;
  outline: none;
  background: white;
  font-size: 0.82rem;
  font-weight: 500;
  resize: vertical;
}

.profile-fields input:focus,
.profile-fields textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.profile-character-count {
  position: absolute;
  right: 0.75rem;
  bottom: 0.58rem;
  color: #8b99ad;
  font-size: 0.58rem;
  font-weight: 600;
}

.profile-choice-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.profile-choice-group legend {
  margin-bottom: 0.55rem;
  color: #42516a;
  font-size: 0.7rem;
  font-weight: 700;
}

.avatar-options,
.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.avatar-choice,
.color-choice {
  position: relative;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  padding: 0;
  border: 1px solid #d6e1ef;
  border-radius: 0.8rem;
  background: white;
}

.avatar-choice {
  font-size: 1.18rem;
}

.avatar-choice:hover,
.color-choice:hover {
  border-color: #93b4e6;
  transform: translateY(-1px);
}

.avatar-choice[aria-pressed="true"],
.color-choice[aria-pressed="true"] {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.color-choice::before {
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid rgba(23, 35, 61, 0.08);
  border-radius: 50%;
  background: var(--choice-color);
  content: "";
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 0.7rem;
  padding-top: 0.3rem;
}

.profile-actions button {
  min-height: 2.9rem;
}

.reject-button {
  height: 2.75rem;
  color: #b33c35;
  background: #f9e8e6;
  font-size: 0.75rem;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 1.5rem;
  bottom: 1.5rem;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.8rem 1rem;
  color: white;
  border-radius: 0.75rem;
  background: #172554;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  font-size: 0.75rem;
  animation: toast-in 180ms ease-out;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes breathe {
  50% {
    transform: scale(1.035);
  }
}

@keyframes dots {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-0.2rem);
  }
}

@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes meeting-wave {
  0%,
  60%,
  100% {
    opacity: 0.45;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-0.45rem);
  }
}

@media (max-width: 900px) {
  .auth-view {
    grid-template-columns: 1fr;
  }

  .auth-story {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    padding: 1.5rem;
  }

  .join-view {
    grid-template-columns: 1fr;
  }

  .join-card {
    max-width: 36rem;
    min-height: 100vh;
    margin: 0 auto;
    padding: 5.5rem 2rem 2rem;
  }

  .join-card .brand {
    top: 2rem;
  }

  .join-visual {
    display: none;
  }

  .app-view {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(20rem, 88vw);
    box-shadow: 20px 0 60px rgba(30, 64, 175, 0.2);
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close,
  .menu-button {
    display: grid !important;
  }

  .chat-header {
    min-height: 4.8rem;
  }
}

@media (max-width: 620px) {
  .auth-card {
    padding: 0;
  }

  .auth-card h2 {
    font-size: 2rem;
  }

  .join-card h1 {
    font-size: 2.75rem;
  }

  .join-account {
    top: 1.9rem;
    right: 0;
  }

  .join-account-copy {
    display: none;
  }

  .join-profile-button {
    padding-right: 0.35rem;
  }

  .chat-title p,
  .desktop-label {
    display: none;
  }

  .chat-header {
    padding: 0.8rem;
  }

  .header-actions {
    gap: 0.35rem;
  }

  .secondary-button {
    width: 2.6rem;
    padding: 0;
  }

  .call-button {
    padding: 0 0.75rem;
  }

  .messages {
    padding: 1rem;
  }

  .welcome-message {
    margin: 1rem auto 2rem;
  }

  .composer {
    width: calc(100% - 1rem);
    margin-bottom: 0.5rem;
  }

  .local-video-wrap {
    top: 4.8rem;
    right: 0.8rem;
    width: 8rem;
  }

  .call-view {
    padding: 0;
  }

  .video-stage {
    border-radius: 0;
  }

  .profile-modal {
    max-height: calc(100vh - 1rem);
    border-radius: 1rem;
  }

  .profile-modal-header,
  .profile-form {
    padding-right: 1.2rem;
    padding-left: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
