:root {
  --bg: #07101d;
  --bg-deep: #040a12;
  --panel: rgba(16, 30, 51, 0.82);
  --panel-solid: #101e33;
  --panel-raised: #14243d;
  --line: rgba(154, 184, 219, 0.14);
  --line-strong: rgba(154, 184, 219, 0.24);
  --text: #eef6ff;
  --muted: #8ea4bf;
  --muted-2: #6e829b;
  --accent: #63f5d2;
  --accent-2: #5fb9ff;
  --accent-ink: #03241f;
  --warning: #ffd47a;
  --danger: #ff8298;
  --danger-soft: rgba(255, 130, 152, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 15px;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(99, 245, 210, 0.11), transparent 32rem),
    radial-gradient(circle at 88% 18%, rgba(95, 185, 255, 0.12), transparent 30rem),
    radial-gradient(circle at 50% 110%, rgba(99, 245, 210, 0.06), transparent 36rem),
    var(--bg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.chat-active {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(155, 190, 230, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 190, 230, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0, transparent 72%);
  z-index: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.screen {
  position: relative;
  z-index: 1;
}

/* Boot */

.boot-screen {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.boot-mark {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 10px rgba(99, 245, 210, 0.06), 0 18px 50px rgba(99, 245, 210, 0.2);
  animation: breathe 2.4s ease-in-out infinite;
}

.boot-mark .icon {
  width: 30px;
  height: 30px;
  stroke-width: 2;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Landing */

.landing-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.landing-nav {
  width: min(100%, 1220px);
  margin: 0 auto;
  padding: 22px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px rgba(99, 245, 210, 0.16);
  flex: none;
}

.brand-mark .icon {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.brand-mark.small {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.brand-mark.small .icon {
  width: 19px;
  height: 19px;
}

.brand-name {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 24, 42, 0.52);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  backdrop-filter: blur(12px);
}

.nav-pill .icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.landing-main {
  width: min(100%, 1220px);
  margin: auto;
  padding: 22px 30px 26px;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: center;
  gap: clamp(34px, 6vw, 86px);
  padding: 36px 0 50px;
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(99, 245, 210, 0.12);
  animation: live 2s ease-out infinite;
}

@keyframes live {
  0% { box-shadow: 0 0 0 0 rgba(99, 245, 210, 0.3); }
  70% { box-shadow: 0 0 0 9px rgba(99, 245, 210, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 245, 210, 0); }
}

.hero h1 {
  max-width: 690px;
  margin: 20px 0 20px;
  font-size: clamp(46px, 6.3vw, 82px);
  line-height: 0.97;
  letter-spacing: -0.058em;
  font-weight: 760;
  text-wrap: balance;
}

.hero-text {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.55vw, 17px);
  line-height: 1.65;
  text-wrap: pretty;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 27px 0 32px;
  min-height: 31px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(14, 28, 48, 0.66);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}

.status-chip strong {
  color: var(--text);
  font-weight: 750;
}

.status-chip .icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.status-chip.warm .icon {
  color: var(--warning);
}

.status-chip.warm strong {
  color: var(--warning);
}

.hero-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 570px;
}

.hero-points > div {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.point-icon {
  width: 35px;
  height: 35px;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(99, 245, 210, 0.06);
  flex: none;
}

.point-icon .icon {
  width: 17px;
  height: 17px;
}

.hero-points strong {
  display: block;
  margin: 1px 0 3px;
  font-size: 12.5px;
  font-weight: 750;
}

.hero-points small {
  display: block;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.45;
}

.join-card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(155deg, rgba(24, 43, 71, 0.92), rgba(12, 24, 43, 0.9) 58%, rgba(10, 20, 36, 0.94));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(22px);
}

.join-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 85% 0%, rgba(99, 245, 210, 0.1), transparent 42%);
}

.join-card > * {
  position: relative;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.card-kicker {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.capacity-badge {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(7, 16, 29, 0.45);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.03em;
}

.join-card h2 {
  margin: 0 0 7px;
  font-size: 25px;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.card-subtitle {
  margin: 0 0 23px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.field-label {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  display: grid;
  place-items: center;
  color: var(--muted-2);
  transform: translateY(-50%);
  pointer-events: none;
}

.input-icon .icon {
  width: 18px;
  height: 18px;
}

.input-wrap input {
  width: 100%;
  height: 52px;
  padding: 0 15px 0 45px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  outline: 0;
  color: var(--text);
  background: rgba(5, 13, 24, 0.58);
  font-size: 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.input-wrap input::placeholder {
  color: #5f7188;
}

.input-wrap input:focus {
  border-color: rgba(99, 245, 210, 0.7);
  background: rgba(5, 13, 24, 0.82);
  box-shadow: 0 0 0 4px rgba(99, 245, 210, 0.09);
}

.form-error {
  min-height: 17px;
  margin: 7px 1px 10px;
  color: var(--danger);
  font-size: 11.5px;
  line-height: 1.4;
}

.btn {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -0.01em;
  transition: transform 0.18s ease, filter 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn-primary {
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent) 0%, #66e8ff 100%);
  box-shadow: 0 14px 30px rgba(99, 245, 210, 0.14);
}

.btn-primary:hover {
  filter: brightness(1.04);
}

.btn-block {
  width: 100%;
}

.btn-ghost {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(18, 34, 57, 0.72);
}

.btn-ghost:hover {
  border-color: rgba(154, 184, 219, 0.4);
}

.btn-whatsapp {
  color: #042d1f;
  border-color: rgba(37, 211, 102, 0.45);
  background: linear-gradient(135deg, #b9f7d4, #7df0b8);
}

.btn-whatsapp:hover {
  border-color: rgba(37, 211, 102, 0.75);
}

.btn-danger {
  color: #2c0610;
  background: linear-gradient(135deg, #ff9aaa, #ff718b);
}

.btn-danger-ghost {
  color: var(--danger);
  border-color: rgba(255, 130, 152, 0.28);
  background: var(--danger-soft);
}

.no-host-box {
  margin-top: 8px;
  padding: 22px 16px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  text-align: center;
  background: rgba(7, 16, 29, 0.34);
}

.empty-orbit {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  box-shadow: 0 0 0 8px rgba(142, 164, 191, 0.04);
}

.no-host-box strong {
  display: block;
  font-size: 13px;
}

.no-host-box p {
  margin: 6px 0 15px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.trust-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.45;
}

.trust-note .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--accent);
}

.landing-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 16px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.footer-dot {
  opacity: 0.5;
}

.text-button {
  margin-left: auto;
  padding: 4px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 10.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button:hover {
  color: var(--accent);
}

/* Setup */

.setup-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 26px;
}

.setup-wrap {
  position: relative;
  width: min(100%, 540px);
}

.back-button {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}

.setup-card {
  padding: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 90% 0%, rgba(99, 245, 210, 0.1), transparent 40%),
    linear-gradient(155deg, rgba(23, 41, 68, 0.94), rgba(10, 21, 38, 0.96));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.setup-mark,
.modal-mark {
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  border: 1px solid rgba(99, 245, 210, 0.2);
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(99, 245, 210, 0.07);
  box-shadow: 0 0 0 9px rgba(99, 245, 210, 0.025);
}

.setup-mark .icon,
.modal-mark .icon {
  width: 22px;
  height: 22px;
}

.modal-mark.danger {
  color: var(--danger);
  border-color: rgba(255, 130, 152, 0.2);
  background: var(--danger-soft);
  box-shadow: 0 0 0 9px rgba(255, 130, 152, 0.025);
}

.setup-card h1 {
  margin: 12px 0 10px;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.setup-subtitle {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.field-group {
  margin-top: 18px;
}

.host-code-display {
  margin-top: 16px;
  padding: 12px 12px 12px 14px;
  border: 1px solid rgba(99, 245, 210, 0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(99, 245, 210, 0.06);
}

.host-code-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.host-code-label .icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.host-code-display code {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.host-code-display .icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  background: rgba(99, 245, 210, 0.07);
  color: var(--accent);
}

.host-code-display .icon-button .icon {
  width: 16px;
  height: 16px;
}

.field-hint {
  margin: 7px 1px 0;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.45;
}

.setup-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.5;
}

.setup-note .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--accent);
}

/* Waiting */

.waiting-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 26px;
}

.waiting-card {
  width: min(100%, 540px);
  padding: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 50% 0%, rgba(99, 245, 210, 0.1), transparent 38%),
    linear-gradient(155deg, rgba(22, 40, 66, 0.94), rgba(10, 21, 38, 0.96));
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(22px);
}

.radar {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 26px;
  display: grid;
  place-items: center;
}

.radar-ring {
  position: absolute;
  border: 1px solid rgba(99, 245, 210, 0.18);
  border-radius: 50%;
  animation: radar 3.2s ease-out infinite;
}

.ring-one {
  width: 76px;
  height: 76px;
}

.ring-two {
  width: 76px;
  height: 76px;
  animation-delay: 1.6s;
}

.radar-core {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 40px rgba(99, 245, 210, 0.2);
}

.radar-core .icon {
  width: 26px;
  height: 26px;
  stroke-width: 2;
}

@keyframes radar {
  0% { width: 76px; height: 76px; opacity: 0.8; }
  100% { width: 140px; height: 140px; opacity: 0; }
}

.waiting-card .eyebrow {
  justify-content: center;
}

.waiting-card h1 {
  margin: 12px 0 10px;
  font-size: 35px;
  letter-spacing: -0.05em;
}

.waiting-text {
  margin: 0 auto;
  max-width: 360px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.waiting-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 24px 0;
}

.waiting-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(6, 14, 26, 0.38);
  font-size: 11px;
}

.waiting-meta .icon {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

.waiting-actions {
  display: flex;
  justify-content: center;
}

.waiting-actions .btn {
  min-width: 180px;
}

.waiting-tip {
  margin: 18px 0 0;
  color: var(--muted-2);
  font-size: 10.5px;
}

/* Chat */

.chat-screen {
  height: 100dvh;
  overflow: hidden;
}

.chat-shell {
  position: relative;
  width: min(100%, 1000px);
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% -10%, rgba(99, 245, 210, 0.055), transparent 32rem),
    linear-gradient(180deg, rgba(9, 20, 35, 0.92), rgba(6, 13, 24, 0.97));
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.connection-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 7px 12px;
  color: #332304;
  background: linear-gradient(90deg, #ffd47a, #ffc24b);
  font-size: 10.5px;
  font-weight: 750;
  text-align: center;
  letter-spacing: 0.02em;
}

.chat-header {
  position: relative;
  z-index: 10;
  min-height: 72px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 11px;
  background: rgba(8, 18, 32, 0.72);
  backdrop-filter: blur(18px);
}

.room-heading {
  flex: 1;
  min-width: 0;
}

.room-heading h2 {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-heading p {
  margin: 3px 0 0;
  color: var(--muted-2);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-button {
  position: relative;
  width: 39px;
  height: 39px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(18, 34, 57, 0.58);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.icon-button:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(25, 45, 73, 0.72);
}

.icon-button .icon {
  width: 18px;
  height: 18px;
}

.button-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid #0b1728;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  background: var(--accent);
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

.pending-bar {
  position: relative;
  z-index: 9;
  margin: 12px 16px 0;
  padding: 13px;
  border: 1px solid rgba(255, 212, 122, 0.2);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(57, 45, 22, 0.72), rgba(35, 30, 20, 0.58));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.pending-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--warning);
  font-size: 11px;
}

.pending-heading strong {
  font-weight: 750;
  letter-spacing: 0.01em;
}

.pending-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(255, 212, 122, 0.1);
  animation: live 2s ease-out infinite;
}

.pending-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.pending-person {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 12px;
  background: rgba(8, 15, 26, 0.34);
}

.pending-person .avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pending-person-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pending-person-name small {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 500;
}

.pending-actions {
  display: flex;
  gap: 5px;
}

.mini-btn {
  min-height: 29px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 750;
}

.mini-btn .icon {
  width: 13px;
  height: 13px;
}

.mini-btn.approve {
  color: var(--accent-ink);
  background: var(--accent);
}

.mini-btn.decline {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(7, 15, 27, 0.34);
}

.mini-btn.decline:hover {
  color: var(--danger);
  border-color: rgba(255, 130, 152, 0.25);
}

.messages {
  flex: 1;
  min-height: 0;
  padding: 20px 20px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(142, 164, 191, 0.22) transparent;
}

.messages::-webkit-scrollbar {
  width: 7px;
}

.messages::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(142, 164, 191, 0.2);
}

.empty-state {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
}

.empty-icon {
  width: 66px;
  height: 66px;
  margin-bottom: 17px;
  border: 1px solid var(--line);
  border-radius: 24px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(99, 245, 210, 0.05);
  box-shadow: 0 0 0 12px rgba(99, 245, 210, 0.018);
}

.empty-icon .icon {
  width: 28px;
  height: 28px;
}

.empty-state h3 {
  margin: 0 0 6px;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.empty-state p {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
}

.date-separator {
  align-self: center;
  margin: 18px 0 10px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-2);
  background: rgba(8, 17, 31, 0.54);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.system-message {
  align-self: center;
  max-width: 86%;
  margin: 10px auto;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(20, 36, 59, 0.55);
  font-size: 10.5px;
  line-height: 1.4;
  text-align: center;
}

.message-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 3px;
  animation: messageIn 0.24s ease both;
}

.message-row.grouped {
  margin-top: 2px;
}

.message-row.own {
  flex-direction: row-reverse;
}

@keyframes messageIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.avatar {
  width: 31px;
  height: 31px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: none;
  color: #061f1b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: -0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.message-row.grouped .avatar {
  visibility: hidden;
}

.message-stack {
  max-width: min(76%, 580px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.message-row.own .message-stack {
  align-items: flex-end;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 4px 4px;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1;
}

.message-meta strong {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
}

.message-row.grouped .message-meta {
  display: none;
}

.bubble {
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 17px 17px 17px 5px;
  color: var(--text);
  background: linear-gradient(145deg, rgba(25, 45, 73, 0.94), rgba(18, 35, 58, 0.94));
  font-size: 14px;
  line-height: 1.48;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.1);
}

.message-row.own .bubble {
  border-color: transparent;
  border-radius: 17px 17px 5px 17px;
  color: #04241f;
  background: linear-gradient(135deg, #74f7d9, #63d7ff);
  box-shadow: 0 10px 26px rgba(99, 245, 210, 0.13);
}

.bubble.attachment-only {
  padding: 5px;
  background: rgba(17, 33, 55, 0.9);
}

.message-row.own .bubble.attachment-only {
  background: rgba(22, 52, 69, 0.88);
}

.bubble-text {
  padding: 1px 1px 0;
}

.bubble.attachment-only .bubble-text {
  display: none;
}

.attachment-image-button {
  display: block;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}

.attachment-image {
  display: block;
  width: auto;
  min-width: 120px;
  min-height: 100px;
  max-width: min(320px, 100%);
  max-height: 340px;
  object-fit: cover;
  border-radius: 12px;
  background: #0a1628;
}

.attachment-file {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(280px, 62vw);
  padding: 8px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  background: rgba(7, 16, 29, 0.26);
}

.message-row.own .attachment-file {
  background: rgba(4, 36, 31, 0.14);
}

.file-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--accent);
  background: rgba(99, 245, 210, 0.1);
}

.message-row.own .file-icon {
  color: #04352d;
  background: rgba(4, 53, 46, 0.12);
}

.file-icon .icon {
  width: 18px;
  height: 18px;
}

.file-copy {
  flex: 1;
  min-width: 0;
}

.file-name {
  display: block;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 9.5px;
}

.message-row.own .file-size {
  color: rgba(4, 36, 31, 0.58);
}

.file-download {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--muted);
  background: rgba(142, 164, 191, 0.09);
}

.message-row.own .file-download {
  color: #04352d;
  background: rgba(4, 53, 46, 0.1);
}

.file-download .icon {
  width: 15px;
  height: 15px;
}

.scroll-bottom {
  position: absolute;
  left: 50%;
  bottom: 104px;
  z-index: 12;
  transform: translateX(-50%);
  padding: 8px 12px;
  border: 1px solid rgba(99, 245, 210, 0.2);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  background: rgba(9, 22, 38, 0.94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  font-size: 10.5px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.scroll-bottom .icon {
  width: 13px;
  height: 13px;
  transform: rotate(90deg);
}

/* Composer */

.composer {
  position: relative;
  z-index: 11;
  padding: 9px 16px calc(11px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(7, 16, 29, 0.76);
  backdrop-filter: blur(18px);
}

.composer-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: rgba(15, 29, 50, 0.8);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.composer-row:focus-within {
  border-color: rgba(99, 245, 210, 0.48);
  box-shadow: 0 0 0 4px rgba(99, 245, 210, 0.055);
}

.composer-row.drop-active {
  border-color: rgba(99, 245, 210, 0.8);
  box-shadow: 0 0 0 4px rgba(99, 245, 210, 0.09);
}

.attach-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: transparent;
}

.attach-button:hover {
  background: rgba(142, 164, 191, 0.08);
}

.composer textarea {
  flex: 1;
  min-height: 38px;
  max-height: 118px;
  padding: 9px 3px 8px;
  border: 0;
  outline: 0;
  resize: none;
  color: var(--text);
  background: transparent;
  font-size: 14px;
  line-height: 1.45;
}

.composer textarea::placeholder {
  color: #61758e;
}

.send-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: opacity 0.18s ease, transform 0.18s ease, filter 0.18s ease;
}

.send-button:hover:not(:disabled) {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.send-button:disabled {
  cursor: default;
  opacity: 0.3;
}

.send-button .icon {
  width: 19px;
  height: 19px;
}

.composer-hint {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 5px 0;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.01em;
}

.upload-status {
  margin: 0 4px 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(16, 32, 54, 0.7);
}

.upload-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9.5px;
}

.upload-meta span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-track {
  height: 4px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(142, 164, 191, 0.14);
}

.upload-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.18s ease;
}

/* Drawer */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(1, 6, 12, 0.62);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  width: min(360px, 88vw);
  padding: 22px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 100% 0%, rgba(99, 245, 210, 0.07), transparent 30rem),
    #0b1728;
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.4);
  transform: translateX(102%);
  transition: transform 0.26s cubic-bezier(0.22, 0.9, 0.25, 1);
  visibility: hidden;
}

.drawer.open {
  transform: translateX(0);
  visibility: visible;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  margin: 8px 0 0;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.members-list {
  flex: 1;
  min-height: 0;
  padding: 14px 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 13px;
}

.member-row:hover {
  background: rgba(142, 164, 191, 0.045);
}

.member-row .avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.member-copy {
  flex: 1;
  min-width: 0;
}

.member-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.host-tag {
  padding: 2px 5px;
  border-radius: 5px;
  color: var(--warning);
  background: rgba(255, 212, 122, 0.1);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.member-status {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 9.5px;
}

.online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
}

.online-dot.on {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 245, 210, 0.08);
}

.remove-member {
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted-2);
  background: transparent;
  font-size: 9.5px;
  font-weight: 650;
}

.remove-member:hover {
  color: var(--danger);
  border-color: rgba(255, 130, 152, 0.22);
  background: var(--danger-soft);
}

.drawer-footer {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.drawer-footer p {
  margin: 0 0 12px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.5;
}

.drawer-footer .btn {
  width: 100%;
  min-height: 44px;
  font-size: 12px;
}

/* Modals */

.modal,
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 6, 12, 0.7);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.2s ease both;
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 450px);
  max-height: min(90dvh, 720px);
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background:
    radial-gradient(circle at 90% 0%, rgba(99, 245, 210, 0.08), transparent 22rem),
    linear-gradient(155deg, #162843, #0b1728);
  box-shadow: var(--shadow);
  overflow-y: auto;
  animation: modalIn 0.22s cubic-bezier(0.22, 0.9, 0.25, 1) both;
}

.modal-card.compact {
  width: min(100%, 390px);
  text-align: center;
}

.modal-card.compact .modal-mark {
  margin-left: auto;
  margin-right: auto;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 17px;
  right: 17px;
}

.modal-card h2 {
  margin: 12px 0 8px;
  font-size: 27px;
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.modal-subtitle {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.invite-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 7px 7px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(5, 13, 24, 0.5);
}

.invite-url-row code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-url-row .icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  background: rgba(99, 245, 210, 0.07);
  color: var(--accent);
}

.invite-url-row .icon-button .icon {
  width: 16px;
  height: 16px;
}

.invite-steps {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
}

.invite-steps li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.invite-steps li span {
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
}

#invite-modal .btn {
  margin-top: 14px;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 22px;
}

/* Lightbox */

.lightbox {
  z-index: 90;
  background: rgba(0, 4, 9, 0.9);
  backdrop-filter: blur(14px);
}

.lightbox img {
  position: relative;
  z-index: 1;
  max-width: min(100%, 1200px);
  max-height: 82dvh;
  border-radius: 16px;
  object-fit: contain;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.lightbox-download {
  position: absolute;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 2;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  text-decoration: none;
  backdrop-filter: blur(12px);
}

.lightbox-download .icon {
  width: 15px;
  height: 15px;
}

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 100;
  max-width: min(90vw, 420px);
  padding: 10px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  background: rgba(17, 34, 57, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
  animation: toastIn 0.22s ease both;
}

.toast.error {
  color: #ffd4da;
  border-color: rgba(255, 130, 152, 0.3);
  background: rgba(54, 18, 27, 0.97);
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Responsive */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 18px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero h1 {
    max-width: 760px;
  }

  .join-card {
    max-width: 560px;
  }
}

@media (max-width: 640px) {
  .landing-nav {
    padding: 16px 18px;
  }

  .brand-name {
    font-size: 14px;
  }

  .landing-main {
    padding: 8px 18px 18px;
  }

  .hero {
    gap: 25px;
    padding: 18px 0 30px;
  }

  .hero h1 {
    margin: 16px 0 16px;
    font-size: clamp(42px, 13vw, 58px);
    letter-spacing: -0.06em;
  }

  .hero-text {
    font-size: 14px;
  }

  .status-row {
    margin: 20px 0 24px;
  }

  .hero-points {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .join-card {
    padding: 22px;
    border-radius: 24px;
  }

  .join-card h2 {
    font-size: 23px;
  }

  .landing-footer {
    padding-top: 10px;
  }

  .text-button {
    width: 100%;
    margin: 2px 0 0;
    text-align: left;
  }

  .setup-screen,
  .waiting-screen {
    padding: 18px;
  }

  .setup-card,
  .waiting-card {
    padding: 28px 22px;
    border-radius: 24px;
  }

  .setup-card h1 {
    font-size: 31px;
  }

  .back-button {
    top: 8px;
    left: 8px;
  }

  .chat-shell {
    border: 0;
  }

  .chat-header {
    min-height: 66px;
    padding: 10px 13px;
  }

  .room-heading h2 {
    font-size: 14.5px;
  }

  .header-actions {
    gap: 4px;
  }

  .icon-button {
    width: 37px;
    height: 37px;
  }

  .pending-bar {
    margin: 9px 10px 0;
  }

  .messages {
    padding: 16px 12px 8px;
  }

  .message-stack {
    max-width: 82%;
  }

  .bubble {
    font-size: 13.5px;
  }

  .attachment-file {
    min-width: min(245px, 66vw);
  }

  .composer {
    padding-left: 10px;
    padding-right: 10px;
  }

  .composer-hint {
    font-size: 8.5px;
  }

  .modal-card {
    padding: 26px 21px;
    border-radius: 23px;
  }

  .modal-card h2 {
    font-size: 24px;
  }

  .drawer {
    padding: 18px;
  }

  .scroll-bottom {
    bottom: 100px;
  }
}

@media (max-width: 380px) {
  .nav-pill {
    padding: 7px 9px;
    font-size: 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .hero h1 {
    font-size: 39px;
  }

  .pending-person {
    flex-wrap: wrap;
  }

  .pending-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@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;
  }
}
