:root {
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;
  --cream: #fff0cd;
  --violet: #8f6bb8;
  --line: rgba(255, 232, 190, 0.24);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: #120f1d;
  color: #fff;
}
button,
input,
textarea {
  font: inherit;
}
.threshold {
  background: radial-gradient(circle at 50% 30%, #3c261c, #100a08 68%);
}
.threshold__scene {
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.back-link {
  position: absolute;
  top: 1.4rem;
  left: 1.5rem;
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}
.bookcase {
  position: absolute;
  inset: 0;
  opacity: 0.46;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 8%,
      rgba(0, 0, 0, 0.32) 8% 8.3%
    ),
    repeating-linear-gradient(0deg, #2e190f 0 8%, #55301c 8% 8.8%);
}
.bookcase__door {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(72vw, 25rem);
  height: min(76vh, 38rem);
  border: 1.4rem solid #32190d;
  background: repeating-linear-gradient(
    90deg,
    #59341d 0 3.8rem,
    #452512 3.8rem 4rem
  );
  box-shadow: 0 2rem 5rem #000;
}
.bookcase__door span {
  display: block;
  height: 28%;
  margin: 4% 8%;
  border: 1px solid rgba(255, 220, 160, 0.16);
  background: rgba(20, 8, 3, 0.16);
}
.bookcase__door i {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: #a17a43;
}
.access-card {
  position: relative;
  z-index: 1;
  width: min(88vw, 22rem);
  padding: 2rem;
  background: rgba(13, 8, 5, 0.86);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  text-align: center;
}
.access-card > p,
.meeting-room__welcome > p {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.62rem;
  color: #dcbf8a;
}
.access-card h1,
.meeting-room__welcome h1 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  margin: 0.3rem 0 1.4rem;
}
.access-card h1 {
  font-size: 3rem;
}
.access-card form {
  display: grid;
  gap: 0.7rem;
  text-align: left;
}
.access-card label {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.68);
}
.access-card input {
  width: 100%;
  padding: 0.8rem;
  background: #0d0907;
  border: 1px solid var(--line);
  color: #fff;
}
.access-card button,
.meeting-room__welcome button,
.team-console form button {
  border: 1px solid #d7b66e;
  background: #c9a55e;
  color: #1c1207;
  font-weight: 600;
  padding: 0.75rem;
  cursor: pointer;
}
.access-card button:disabled {
  opacity: 0.55;
}
.access-card #access-message {
  min-height: 1.2rem;
  margin: 0;
  color: #f0c9c1;
  font-size: 0.7rem;
  text-align: center;
}
.meeting-room {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}
.meeting-room__art,
.meeting-room__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}
.meeting-room__art {
  object-fit: cover;
}
.meeting-room__shade {
  z-index: -1;
  background:
    linear-gradient(
      180deg,
      rgba(14, 9, 22, 0.6),
      transparent 24%,
      transparent 64%,
      rgba(10, 7, 18, 0.62)
    ),
    radial-gradient(
      circle at 45% 50%,
      transparent 0 28%,
      rgba(15, 8, 25, 0.3) 80%
    );
}
.meeting-room__header {
  height: 4.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(180deg, rgba(12, 7, 20, 0.45), transparent);
}
.meeting-room__header a {
  color: #fff;
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}
.meeting-room__header p {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.6rem;
  color: var(--cream);
}
.meeting-room__welcome {
  position: absolute;
  left: clamp(1rem, 5vw, 5rem);
  bottom: clamp(2rem, 7vh, 5rem);
  max-width: 30rem;
  text-shadow: 0 2px 20px #160c24;
}
.meeting-room__welcome h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.85;
}
.meeting-room__welcome button {
  background: rgba(24, 14, 40, 0.7);
  color: var(--cream);
  backdrop-filter: blur(10px);
  padding: 0.8rem 1.1rem;
}
.team-console {
  position: fixed;
  right: 0;
  top: 0;
  z-index: 4;
  width: min(100%, 66rem);
  height: 100svh;
  display: flex;
  flex-direction: column;
  color: #e9feff;
  background:
    linear-gradient(rgba(4, 21, 31, 0.96), rgba(9, 12, 29, 0.98)),
    repeating-linear-gradient(
      0deg,
      transparent 0 3px,
      rgba(94, 228, 255, 0.03) 3px 4px
    );
  border-left: 1px solid rgba(104, 231, 255, 0.45);
  transform: translateX(105%);
  visibility: hidden;
  transition: 0.32s ease;
  box-shadow:
    -2rem 0 6rem rgba(0, 0, 0, 0.58),
    inset 1px 0 rgba(255, 255, 255, 0.12);
}
.team-console::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(75, 225, 255, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(75, 225, 255, 0.04) 1px, transparent 1px);
  background-size: 3.4rem 3.4rem;
  mask-image: linear-gradient(90deg, #000, transparent 70%);
}
.team-console.is-open {
  transform: none;
  visibility: visible;
}
.team-console__head {
  position: relative;
  z-index: 1;
  min-height: 5.5rem;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(104, 231, 255, 0.25);
  background: rgba(10, 33, 44, 0.44);
}
.team-console__head > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 0.45rem;
}
.team-console__head span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #77f5e6;
  box-shadow: 0 0 0.7rem #58eaff;
}
.team-console h2,
.team-console h3 {
  font-family: "Cormorant Garamond", serif;
  margin: 0;
  font-weight: 600;
}
.team-console__head h2 {
  font-size: 1.55rem;
  letter-spacing: 0.02em;
}
.team-console__head p {
  grid-column: 2;
  margin: 0.1rem 0 0;
  color: rgba(201, 248, 255, 0.58);
  font-size: 0.65rem;
}
.team-console__head > button {
  background: none;
  border: 0;
  color: #d7fbff;
  font-size: 2rem;
  cursor: pointer;
}
.team-console__body {
  position: relative;
  z-index: 1;
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(20rem, 0.9fr) minmax(24rem, 1.1fr);
}
.system-view,
.message-view {
  min-width: 0;
  min-height: 0;
}
.system-view {
  border-right: 1px solid rgba(104, 231, 255, 0.22);
  overflow: auto;
}
.console-tabs {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0.75rem;
  gap: 0.35rem;
  background: rgba(3, 18, 28, 0.9);
  border-bottom: 1px solid rgba(104, 231, 255, 0.18);
}
.console-tabs button {
  padding: 0.68rem 0.5rem;
  border: 1px solid rgba(104, 231, 255, 0.18);
  background: rgba(104, 231, 255, 0.03);
  color: rgba(218, 250, 255, 0.62);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.6rem;
  cursor: pointer;
}
.console-tabs button[aria-selected="true"] {
  color: #edfeff;
  border-color: rgba(114, 239, 255, 0.6);
  background: rgba(90, 223, 255, 0.12);
  box-shadow: inset 0 -2px #73efff;
}
.console-view {
  padding: 1rem;
}
.view-note {
  margin: 0 0 0.8rem;
  color: rgba(215, 249, 255, 0.56);
  font-size: 0.72rem;
}
.presence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.person-card {
  position: relative;
  min-width: 0;
  min-height: 5.2rem;
  padding: 0.7rem;
  display: grid;
  grid-template-columns: 2.8rem 1fr auto;
  align-items: center;
  gap: 0.65rem;
  text-align: left;
  color: #e9feff;
  border: 1px solid rgba(104, 231, 255, 0.2);
  background: rgba(21, 72, 82, 0.13);
  cursor: pointer;
}
.person-card:hover,
.person-card:focus-visible,
.person-card[aria-pressed="true"] {
  border-color: rgba(120, 239, 255, 0.72);
  background: rgba(78, 211, 230, 0.13);
  box-shadow: 0 0 1.4rem rgba(55, 210, 243, 0.1);
}
.person-card__avatar {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(124, 238, 255, 0.65);
  border-radius: 50%;
  color: #aef7ff;
  background: radial-gradient(
    circle,
    rgba(102, 225, 255, 0.18),
    rgba(120, 74, 171, 0.12)
  );
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
}
.person-card__copy {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}
.person-card__copy strong {
  font-size: 0.78rem;
}
.person-card__copy small {
  overflow: hidden;
  color: rgba(211, 245, 250, 0.5);
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.presence-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #61717a;
  box-shadow: 0 0 0 3px rgba(97, 113, 122, 0.12);
}
.presence-dot.is-present {
  background: #78f2a2;
  box-shadow: 0 0 0.65rem #64ed95;
}
.status-list {
  display: grid;
  gap: 0.65rem;
}
.status-row {
  padding: 0.9rem;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  border-left: 2px solid rgba(108, 235, 255, 0.62);
  background: rgba(43, 109, 123, 0.09);
}
.status-row strong {
  display: block;
  font-size: 0.78rem;
}
.status-row p {
  margin: 0.22rem 0 0;
  color: rgba(214, 246, 250, 0.54);
  font-size: 0.64rem;
}
.status-row > span {
  flex: none;
  color: #a8efff;
  font-size: 0.58rem;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.message-view {
  display: flex;
  flex-direction: column;
  background: rgba(8, 12, 28, 0.42);
}
.message-view__head {
  min-height: 4.7rem;
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(104, 231, 255, 0.18);
}
.message-view__head > div > span {
  color: rgba(210, 244, 250, 0.47);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.message-view__head h3 {
  margin-top: 0.12rem;
  font-size: 1.5rem;
}
.channel-state {
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(135, 112, 195, 0.45);
  color: #d8c8ff;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.message-log {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.table-message {
  padding: 0.8rem;
  border: 1px solid rgba(104, 231, 255, 0.18);
  font-size: 0.8rem;
  line-height: 1.5;
  max-width: 88%;
  white-space: pre-wrap;
}
.table-message p {
  margin: 0;
}
.table-message small {
  display: block;
  margin-top: 0.35rem;
  color: rgba(214, 246, 250, 0.46);
  font-size: 0.56rem;
}
.table-message--nova {
  align-self: flex-start;
  background: rgba(143, 107, 184, 0.11);
}
.table-message--user {
  align-self: flex-end;
  background: rgba(66, 190, 214, 0.1);
}
.table-message--system {
  align-self: center;
  max-width: 100%;
  color: rgba(218, 249, 255, 0.6);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.68rem;
}
.table-message--error {
  color: #ffd2d2;
  border-color: rgba(255, 139, 139, 0.42);
}
.team-console form {
  padding: 0.95rem 1rem 1.1rem;
  border-top: 1px solid rgba(104, 231, 255, 0.18);
  display: grid;
  gap: 0.45rem;
}
.team-console form label {
  font-size: 0.6rem;
  color: rgba(214, 246, 250, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.team-console textarea {
  resize: none;
  min-height: 4.8rem;
  background: rgba(1, 9, 18, 0.72);
  border: 1px solid rgba(104, 231, 255, 0.27);
  color: #fff;
  padding: 0.75rem;
  outline: none;
}
.team-console textarea:focus {
  border-color: rgba(114, 239, 255, 0.75);
  box-shadow: 0 0 0 2px rgba(114, 239, 255, 0.08);
}
.composer-actions {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
}
.composer-actions p {
  margin: 0;
  color: rgba(215, 249, 255, 0.5);
  font-size: 0.58rem;
}
.team-console form .mic-button,
.team-console form .send-button {
  padding: 0.62rem 0.85rem;
}
.team-console form .mic-button {
  border-color: rgba(109, 237, 255, 0.38);
  background: rgba(58, 179, 202, 0.1);
  color: #b8f7ff;
}
.team-console form .mic-button.is-listening {
  color: #fff;
  background: rgba(207, 64, 123, 0.28);
  border-color: #ff76ac;
  box-shadow: 0 0 1rem rgba(255, 76, 146, 0.24);
}
.team-console form .mic-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.team-console form .send-button {
  justify-self: end;
}
@media (max-width: 650px) {
  .meeting-room__art {
    object-position: 64% center;
  }
  .meeting-room__welcome {
    bottom: 2rem;
  }
  .meeting-room__welcome h1 {
    font-size: 3.6rem;
  }
  .meeting-room__header p {
    display: none;
  }
  .team-console__head {
    min-height: 4.8rem;
    padding: 0.9rem 1rem;
  }
  .team-console__body {
    display: flex;
    flex-direction: column;
    overflow: auto;
  }
  .system-view {
    flex: none;
    max-height: 42svh;
    border-right: 0;
    border-bottom: 1px solid rgba(104, 231, 255, 0.22);
  }
  .message-view {
    flex: 1;
    min-height: 50svh;
  }
  .presence-grid {
    grid-template-columns: 1fr 1fr;
  }
  .person-card {
    grid-template-columns: 2.35rem 1fr auto;
    min-height: 4.4rem;
    padding: 0.55rem;
    gap: 0.48rem;
  }
  .person-card__avatar {
    width: 2.35rem;
    height: 2.35rem;
  }
  .person-card__copy small {
    display: none;
  }
  .composer-actions {
    grid-template-columns: auto 1fr auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }
}
