@font-face {
  font-family: "Noto Sans SC";
  src: url("fonts/NotoSansSC.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("fonts/SpaceMono-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("fonts/SpaceMono-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
:root {
  --desktop: #d8d5e3;
  --panel: #eceaf2;
  --ink: #2e2a45;
  --muted: #6e6a86;
  --line: #a9a5bc;
  --accent: #55508a;
  --paper: #f6f3ea;
  --white: #fff;
  --success: #3e7a4e;
  --danger: #c84955;
  --warning: #fff5d5;
  --raised: inset -2px -2px 0 var(--line), inset 2px 2px 0 white;
  --inset: inset 2px 2px 0 var(--line);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--desktop) url("assets/home-img.svg") center top/1422px 942px;
  min-height: 100vh;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--panel);
  box-shadow: var(--raised);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
}
button:hover:not(:disabled) {
  background: #f6f4fb;
}
button:active:not(:disabled) {
  box-shadow: var(--inset);
  transform: translate(1px, 1px);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
button.primary {
  background: var(--accent);
  color: white;
}
button.primary:hover:not(:disabled) {
  background: #655fa0;
}
button.link {
  min-height: 24px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: none;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a {
  color: var(--accent);
}
button:focus-visible,
a:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}
input,
textarea,
select {
  border: 1.5px solid var(--ink);
  font-weight: 400;
  border-radius: 0;
  background: white;
  box-shadow: var(--inset);
  padding: 9px 12px;
  min-width: 0;
  outline: none;
  width: 100%;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  outline: 2px solid #8a84bc;
  outline-offset: 1px;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  box-shadow: none;
  margin: 0;
  flex-shrink: 0;
}
textarea {
  resize: vertical;
  line-height: 1.65;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 34px;
  line-height: 48px;
}
h2 {
  font-size: 22px;
  line-height: 32px;
}
h3 {
  font-size: 17px;
  line-height: 26px;
}
label {
  font-weight: 500;
  font-size: 13px;
}
small,
.caption {
  font-size: 12px;
  line-height: 18px;
}
.muted {
  color: var(--muted);
}
.accent {
  color: var(--accent);
}
.success {
  color: var(--success);
}
.danger {
  color: var(--danger);
}
.warning {
  color: #99722c;
}
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.icon img {
  display: block;
  max-width: none;
}
.window {
  border: 2px solid var(--ink);
  background: var(--panel);
  box-shadow: var(--raised);
  padding: 2px;
  min-width: 0;
}
.titlebar {
  height: 28px;
  background: linear-gradient(90deg, #4a4580, #8a84bc);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 7px;
  color: white;
}
.titlebar > img {
  width: 20px;
  height: 16px;
  image-rendering: pixelated;
}
.window-title {
  flex: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: 13px;
  line-height: 20px;
  text-shadow: 1px 1px #2e2a4580;
  font-weight: 500;
}
.window-control {
  min-height: 20px;
  height: 20px;
  width: 22px;
  padding: 0;
}
.window-control .icon {
  width: 12px;
  height: 12px;
}
.window-control img {
  display: block;
}
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  height: 40px;
  background: var(--panel);
  box-shadow: var(--raised);
  display: flex;
  align-items: center;
  padding: 5px 6px;
  gap: 10px;
  font-size: 12px;
}
.start-button {
  min-width: 150px;
  height: 30px;
  min-height: 30px;
  font-family: "Space Mono", monospace;
  font-weight: bold;
  justify-content: flex-start;
}
.start-button img {
  image-rendering: pixelated;
}
.task-button {
  min-width: 200px;
  max-width: 320px;
  height: 28px;
  min-height: 28px;
  overflow: hidden;
  text-overflow: ellipsis;
  justify-content: flex-start;
  background: white;
}
.taskbar-space {
  flex: 1;
}
#clock {
  font-family: "Space Mono", monospace;
  font-weight: bold;
  min-width: 132px;
  height: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--inset);
  text-align: center;
  padding: 3px 10px;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 100;
  padding: 8px;
  background: white;
}
.skip-link:focus {
  top: 12px;
}
#desktop {
  display: flow-root;
  min-height: 100vh;
  padding-bottom: 40px;
  outline: 0;
}
.boot {
  margin: 20vh auto;
  text-align: center;
}
.login-layout {
  max-width: 1360px;
  width: calc(100% - 80px);
  margin: clamp(24px, calc((100vh - 760px) / 2), 100px) auto 24px;
  display: grid;
  grid-template-columns: 820fr 520fr;
  gap: 20px;
}
.intro-body {
  padding: 32px 36px 0;
}
.intro-body > p {
  font-size: 16px;
  line-height: 26px;
  margin-top: 4px;
  color: var(--muted);
  max-width: 700px;
}
.hero-art {
  display: block;
  width: 100%;
  aspect-ratio: 740/260;
  margin-top: 18px;
  image-rendering: pixelated;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.feature {
  background: white;
  min-height: 134px;
  border: 1.5px solid var(--ink);
  box-shadow: var(--inset);
  padding: 14px;
}
.feature h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 24px;
  margin-bottom: 12px;
}
.feature p {
  font-size: 13px;
  line-height: 21px;
  color: var(--muted);
}
.providers-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  margin: 24px 0 14px;
  line-height: 20px;
}
.provider {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
}
.provider img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.notice {
  background: var(--warning);
  border: 1.5px solid var(--ink);
  padding: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}
.intro-body .notice {
  margin-bottom: -2px;
  min-height: 60px;
  height: 60px;
}
.auth-body {
  padding: 40px 36px 20px;
}
.auth-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  line-height: 20px;
}
.auth-form {
  margin-top: 32px;
  display: grid;
  gap: 16px;
}
.field {
  display: grid;
  gap: 8px;
}
.auth-form input {
  height: 44px;
  font-size: 15px;
  font-weight: 400;
}
.auth-form .primary,
.google-button {
  height: 44px;
  width: 100%;
}
.divider {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
  margin: 24px 0 14px;
  line-height: 20px;
}
.divider:before,
.divider:after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.google-button {
  background: white;
  gap: 10px;
}
.google-button img {
  width: 20px;
  height: 20px;
}
.privacy-note {
  font-size: 12px;
  line-height: 20px;
  color: var(--muted);
  margin: 24px 0 30px;
  min-height: 40px;
}
.welcome-art {
  width: 100%;
  aspect-ratio: 440/212;
  display: block;
  image-rendering: pixelated;
}
.form-error {
  color: #a22b40;
  white-space: normal;
  font-size: 13px;
}
.verify-window {
  width: 520px;
  max-width: calc(100% - 32px);
  margin: clamp(28px, 18vh, 170px) auto;
}
.verify-body {
  padding: 32px 36px 28px;
}
.verify-body > p {
  margin-top: 4px;
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.verify-form {
  margin-top: 20px;
}
.otp {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.otp input {
  width: 100%;
  height: 60px;
  font-size: 28px;
  font-family: "Space Mono", monospace;
  text-align: center;
  padding: 5px;
  font-weight: 700;
}
.resend-row {
  display: flex;
  justify-content: space-between;
  margin: 16px 0 22px;
  font-size: 12px;
  height: 24px;
}
.nickname-block {
  border-top: 1px solid var(--line);
  padding-top: 25px;
}
.nickname-block .field {
  gap: 0;
  font-size: 15px;
  line-height: 24px;
  font-weight: 700;
}
.nickname-block input {
  margin-top: 10px;
  height: 44px;
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
}
.person-preview {
  margin: 16px 0 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  gap: 12px;
  padding: 10px 15px;
  align-items: center;
  height: 60px;
}
.person-avatar {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: white;
  border: 2px solid #6e5aa8;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 13.5px;
  font-weight: 500;
}
.wide {
  width: 100%;
}
.home-window {
  width: 820px;
  max-width: calc(100% - 40px);
  margin: clamp(24px, 8.125vh, 78px) auto 30px;
}
.home-body {
  padding: 24px 28px;
}
.home-greeting {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  min-height: 32px;
}
.home-actions {
  display: flex;
  gap: 6px;
}
.home-entries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.home-entry {
  min-height: 170px;
  border: 2px solid var(--ink);
  box-shadow: var(--raised);
  padding: 22px 18px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  height: 170px;
}
.home-entry > img {
  width: 120px;
  height: 90px;
  image-rendering: pixelated;
}
.home-entry h3 {
  font-size: 20px;
  line-height: 28px;
  margin: 8px 0 6px;
}
.home-entry p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.home-notice {
  margin: 22px 0 24px;
  min-height: 50px;
  padding: 10px 14px;
  font-size: 13px;
  height: 52px;
}
.section-label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 8px;
  line-height: 20px;
}
.room-list {
  max-height: min(336px, 40vh);
  overflow-y: auto;
  scrollbar-gutter: stable;
  border: 0;
  background: white;
  outline: 1.5px solid var(--ink);
  outline-offset: -1.5px;
}
.room-list:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.room-list::-webkit-scrollbar {
  width: 14px;
}
.room-list::-webkit-scrollbar-track {
  background: var(--panel);
  border-left: 1px solid var(--line);
}
.room-list::-webkit-scrollbar-thumb {
  background: var(--line);
  border: 1px solid var(--ink);
  box-shadow: var(--raised);
}
.room-list::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}
.room-row {
  display: grid;
  grid-template-columns: 14px 1fr 180px 114px;
  align-items: center;
  gap: 10px;
  min-height: 84px;
  padding: 14px 18px;
  border-bottom: 1px solid #eceaf2;
}
.room-row:last-child {
  border-bottom: 0;
}
.room-title {
  font-size: 16px;
  line-height: 24px;
  overflow-wrap: anywhere;
}
.room-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.room-thumbnails {
  display: flex;
  gap: 4px;
  align-items: center;
  min-height: 24px;
}
.room-people small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}
.mascot {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 32px;
  flex-shrink: 0;
}
.mascot > img {
  display: block;
  image-rendering: pixelated;
}
.mascot.small {
  width: 26px;
  height: 21px;
}
.mascot.small > img {
  transform: scale(0.65);
  transform-origin: 0 0;
}
.empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
}
.empty .mascot {
  margin-bottom: 12px;
}
.empty p {
  margin: 6px 0 16px;
}
.home-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}
.pagination {
  text-align: center;
  margin-top: 16px;
}
.toast {
  position: fixed;
  left: 50%;
  top: 24px;
  right: auto;
  bottom: auto;
  margin: 0;
  transform: translateX(-50%);
  z-index: 30;
  max-width: calc(100vw - 32px);
  padding: 10px 20px;
  border: 1.5px solid var(--ink);
  box-shadow: 3px 3px #2e2a4533;
  background: var(--paper);
  font-size: 13px;
}
.toast.error {
  background: #fff0ee;
  color: #9c3040;
}
.window:modal {
  padding: 2px;
  color: var(--ink);
  width: 560px;
  max-width: calc(100% - 24px);
  max-height: calc(100vh - 72px);
  overflow: auto;
  box-shadow: var(--raised);
  margin: auto;
  bottom: 40px;
}
.window::backdrop {
  background: #2e2a4533;
}
.dialog-body {
  padding: 20px;
}
.dialog-body > p {
  margin: 6px 0 14px;
}
.dialog-body form {
  display: grid;
  gap: 16px;
}
.dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
}
.agent-picker {
  background: white;
  border: 1.5px solid var(--ink);
  margin: 12px 0;
}
.agent-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  cursor: pointer;
  height: 56px;
}
.agent-option:last-child {
  border-bottom: 0;
}
.agent-option .agent-info {
  flex: 1;
  min-width: 0;
}
.agent-option strong {
  display: block;
  font-size: 15px;
  line-height: 22px;
}
.agent-option small {
  display: block;
  color: var(--muted);
  line-height: 18px;
}
.agent-option .active-label {
  max-width: 140px;
  text-align: right;
}
.agent-picker > button {
  padding: 12px 16px;
  width: 100%;
  min-height: 44px;
  justify-content: flex-start;
  box-shadow: none;
  border: 0;
  color: var(--accent);
  background: white;
  height: 55px;
  font-size: 14px;
}
.check-line {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  font-weight: 400;
}
.profile-manager {
  width: 680px !important;
}
.profile-item {
  border: 1px solid var(--line);
  background: white;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-top: 10px;
}
.profile-item .grow {
  flex: 1;
  min-width: 0;
}
.profile-item p {
  font-size: 12px;
  color: var(--muted);
}
.profile-item button {
  padding: 4px 8px;
}
.provider-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.provider-tabs button[aria-pressed="true"] {
  background: var(--accent);
  color: white;
}
.color-options {
  display: flex;
  gap: 10px;
}
.color-choice {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  padding: 7px 12px;
  background: white;
  cursor: pointer;
}
.color-choice input {
  width: 15px;
  height: 15px;
  box-shadow: none;
  accent-color: var(--accent);
}
.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.copy-field {
  min-height: 94px;
  resize: vertical;
  font-size: 13px;
}
.connection-window {
  width: 720px !important;
  min-height: 600px;
}
.connection-window:modal {
  top: 16px;
  bottom: 56px;
  min-height: min(600px, calc(100dvh - 72px));
  max-height: calc(100dvh - 72px);
}
.connection-window .titlebar {
  position: sticky;
  top: 0;
  z-index: 2;
}
.connection-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 16px;
}
.connection-sidebar {
  background: white;
  border: 1.5px solid var(--ink);
  padding: 4px;
  min-height: 440px;
  align-self: stretch;
}
.connection-sidebar button {
  width: 100%;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  text-align: left;
}
.connection-sidebar button:hover {
  background: var(--panel);
}
.connection-sidebar .provider {
  padding: 10px 6px;
  display: flex;
  min-height: 52px;
  font-size: 14px;
  gap: 10px;
}
.connection-sidebar .provider img,
.connection-sidebar .provider > span {
  width: 32px;
  height: 32px;
}
.connection-sidebar .provider > span {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
}
.connection-sidebar button[aria-pressed="true"] {
  background: var(--accent);
  color: white;
}
.connection-steps h3 {
  margin: 0 0 4px;
}
.step {
  margin-top: 16px;
}
.step h4 {
  font-size: 14px;
  margin: 0 0 8px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.mcp-step summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  list-style: none;
}
.mcp-step summary::-webkit-details-marker {
  display: none;
}
.mcp-step summary:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}
.step-toggle {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 400;
}
.mcp-step .when-open,
.mcp-step[open] .when-closed {
  display: none;
}
.mcp-step[open] .when-open {
  display: inline;
}
.when-closed::after { content: " ▾"; }
.when-open::after { content: " ▴"; }
.setup-content {
  margin-top: 8px;
}
.setup-content > p {
  margin-bottom: 8px;
}
.setup-prompt {
  height: 128px;
  background: var(--paper);
}
.step-number {
  font-family: "Space Mono", monospace;
  background: var(--accent);
  color: white;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-weight: 700;
  flex-shrink: 0;
}
.copy-line {
  border: 1.5px solid var(--ink);
  background: var(--paper);
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.copy-line code {
  overflow-wrap: anywhere;
  flex: 1;
  font-size: 12px;
}
.connection-state {
  border: 1.5px solid var(--ink);
  padding: 5.5px 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  background: white;
  min-height: 52px;
}
.connection-state small {
  display: block;
  line-height: 18px;
}
.connection-state strong {
  display: block;
  font-weight: 500;
  line-height: 20px;
}
.room-layout {
  display: grid;
  grid-template-columns: minmax(0, 900fr) minmax(320px, 476fr);
  gap: 16px;
  height: calc(100vh - 80px);
  margin: 20px 24px 0;
}
.chat-window,
.ai-window {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.chat-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.room-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin-bottom: 8px;
}
.room-toolbar .presence {
  flex: 1;
  font-size: 12px;
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
}
.room-toolbar button {
  padding: 4px 8px;
}
.chat-feed {
  border: 1.5px solid var(--ink);
  background: white;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 20px;
  scrollbar-color: var(--line) var(--panel);
}
.message {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  scroll-margin-top: 12px;
}
.message:last-child {
  margin-bottom: 0;
}
.message-avatar {
  width: 32px;
  flex-shrink: 0;
  padding-top: 2px;
  display: flex;
  justify-content: center;
}
.message-content {
  flex: 1;
  min-width: 0;
}
.message-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  margin-bottom: 6px;
  flex-wrap: wrap;
  line-height: 20px;
}
.message-meta time {
  font-family: "Space Mono", monospace;
  font-size: 11px;
  color: #6b665c;
}
.message-text {
  font-size: 15px;
  line-height: 24px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message-text.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.message-expand {
  border: 0;
  box-shadow: none;
  background: none;
  font-size: 12px;
  color: var(--accent);
  padding: 0;
  min-height: 22px;
  margin-top: 4px;
}
.system-message {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin: 18px 0;
  white-space: pre-wrap;
}
.color-lilac {
  color: #6e5aa8;
}
.color-peach {
  color: #a8673c;
}
.color-blue {
  color: #3f72a6;
}
.composer {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 16px;
}
.composer textarea {
  height: 84px;
  min-height: 84px;
  resize: vertical;
}
.composer-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-end;
}
.composer select {
  font-size: 12px;
  padding: 3px 6px;
  background: var(--panel);
  box-shadow: none;
  min-height: 28px;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
}
.composer button {
  min-height: 36px;
}
.ended-panel {
  margin-top: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ai-body {
  padding: 12px 8px;
  overflow: auto;
}
.ai-card {
  min-height: 124px;
  background: white;
  box-shadow: var(--inset);
  border: 1.5px solid var(--ink);
  padding: 8.5px;
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
  align-items: flex-start;
}
.seat-art {
  position: relative;
  width: 104px;
  height: 104px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
}
.seat-art:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22px;
  background: #e4dccb;
}
.seat-art > .chair {
  position: absolute;
  left: 29px;
  top: 56px;
  z-index: 1;
}
.seat-art > .mascot {
  position: absolute;
  left: 32px;
  top: 24px;
  z-index: 2;
}
.seat-art .bubble {
  position: absolute;
  top: -1px;
  left: 57px;
  z-index: 3;
  width: 40px;
  height: 28px;
}
.seat-art .bubble > img {
  display: block;
}
.seat-art .typing-dots {
  position: absolute;
  top: 8px;
  left: 11px;
  display: flex;
  gap: 4px;
  width: 17px;
  height: 3px;
}
.seat-art .typing-dots i {
  width: 3px;
  height: 3px;
  flex-shrink: 0;
  background: var(--ink);
}
.ai-status.danger {
  color: #c8504a;
  font-weight: 700;
}
.discussion-rules {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 16px;
}
.discussion-rules textarea {
  min-height: 110px;
  resize: vertical;
  font-size: 13px;
}
.discussion-rules .dialog-actions {
  margin-top: 10px;
}
.seat-art.offline > .mascot {
  opacity: 0.45;
}
.seat-art .offline-symbol {
  position: absolute;
  top: 4px;
  left: 44px;
  z-index: 3;
}
.ai-info {
  flex: 1;
  min-width: 0;
  padding: 4px 0 0;
}
.ai-info h3 {
  margin-bottom: 0;
  overflow-wrap: anywhere;
  line-height: 26px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-status {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 0;
  font-size: 13px;
  min-height: 32px;
  font-weight: 500;
  white-space: nowrap;
}
.seat-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  margin-top: 0;
  margin-left: auto;
}
.seat-actions button {
  min-height: 28px;
  font-size: 12px;
  padding: 3px 8px;
}
.add-agent {
  width: 100%;
  justify-content: flex-start;
  min-height: 56px;
  border: 1.5px dashed var(--accent);
  box-shadow: none;
  background: transparent;
  color: var(--accent);
  white-space: normal;
  font-size: 14px;
}
.add-agent small {
  color: var(--muted);
  margin-left: 8px;
}
.moderator-settings {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 12px;
}
.moderator-settings label {
  color: var(--ink);
  margin-bottom: 6px;
}
.older {
  text-align: center;
  margin-bottom: 18px;
}
.error-panel {
  max-width: 520px;
  margin: 15vh auto;
  padding: 24px;
}
.guest-callout {
  margin-top: 18px;
  padding: 14px;
  background: var(--warning);
  border: 1px solid var(--line);
}
[hidden] {
  display: none !important;
}
/* Keep empty status placeholders out of the visual rhythm. */
.form-error:empty,
.pagination:empty,
.older:empty {
  display: none;
}
.form-error:not(:empty) {
  margin: 10px 0;
}
.auth-form .field {
  gap: 4px;
  line-height: 20px;
  font-weight: 700;
}
.login-layout > .window {
  min-height: 720px;
}
.login-layout:has(.intro-window[hidden]) {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
}
.login-layout:has(.auth-window[hidden]) {
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
}
.intro-body .notice > span:not(.icon) {
  flex: 1;
}
.intro-body .notice .link {
  font-size: 12px;
}
.nickname-block .field > small {
  font-weight: 400;
  margin-top: 2px;
}
.person-preview strong,
.person-preview small {
  display: block;
  line-height: 20px;
}
.person-preview > .person-avatar {
  border: 1.35px solid var(--line);
  width: 28.8px;
  height: 28.8px;
}
.verify-form > .primary {
  height: 44px;
}
.room-thumbnails .mascot.small {
  width: 28px;
  height: 22.4px;
}
.room-thumbnails .mascot.small > img {
  transform: scale(0.7);
}
.create-window .dialog-body {
  padding: 16px 20px 20px;
}
.create-window h3 {
  font-size: 18px;
  line-height: 26px;
}
.create-window .create-subtitle {
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--muted);
}
.create-window form {
  display: block;
}
.create-window .agent-picker {
  margin: 12px 0 16px;
  max-height: 280px;
  overflow: auto;
}
.create-window .agent-picker > button {
  height: 53px;
}
.create-window .agent-info small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.create-window .field {
  gap: 4px;
  line-height: 20px;
}
.create-window [name="question"] {
  height: 36px;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 21px;
}
.create-settings {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 20px;
  gap: 12px;
  margin-top: 10px;
}
.create-settings .link {
  min-height: 20px;
  font-size: 12px;
}
.create-settings .check-line {
  line-height: 20px;
}
.create-window .create-options {
  margin: 12px 0;
}
.create-window .dialog-actions {
  margin: 0;
}
.create-window .form-error:not(:empty) {
  margin: 10px 0;
}
.ai-info > .provider {
  height: 24px;
  color: var(--muted);
}
.ai-info > .provider img {
  width: 18px;
  height: 18px;
}
.ai-card-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 10px;
}
.ai-card .seat-actions button:not([data-cancel]) {
  padding: 3px 6px;
}
.message-meta strong {
  font-weight: 500;
}
.room-layout.sidebar-hidden {
  grid-template-columns: minmax(0, 1fr);
}
.connection-steps .dialog-actions {
  margin-top: 12px;
}
.connection-steps > .dialog-actions {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
}

@media (max-width: 1150px) {
  .login-layout {
    width: calc(100% - 40px);
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
  }
  .intro-body,
  .auth-body {
    padding-left: 24px;
    padding-right: 24px;
  }
  .intro-body h1 {
    font-size: 28px;
    line-height: 40px;
  }
  .intro-body > p {
    font-size: 14px;
    line-height: 24px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .feature {
    min-height: 0;
    padding: 12px;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
  }
  .feature h3 {
    font-size: 14px;
    margin: 0;
  }
  .providers-line {
    gap: 6px;
  }
  .intro-body .notice {
    margin-bottom: 24px;
  }
  .room-layout {
    margin: 12px 12px 0;
    height: calc(100vh - 64px);
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) 330px;
  }
  .ai-card {
    gap: 10px;
  }
  .seat-art {
    transform: scale(0.8);
    transform-origin: 0 0;
    margin-right: -20px;
    margin-bottom: -20px;
  }
  .room-toolbar .presence {
    font-size: 11px;
  }
  .room-toolbar button {
    font-size: 12px;
  }
  .chat-feed {
    padding: 16px;
  }
}
@media (max-width: 760px) {
  .login-layout {
    display: flex;
    flex-direction: column;
    width: calc(100% - 24px);
    margin: 20px auto;
  }
  .intro-body h1 {
    font-size: 26px;
  }
  .intro-body {
    padding: 22px;
  }
  .intro-body .notice {
    margin-bottom: 0;
  }
  .auth-body {
    padding: 24px;
  }
  .hero-art {
    margin-top: 16px;
  }
  .feature-grid {
    display: none;
  }
  .providers-line {
    margin-top: 16px;
  }
  .intro-body .notice {
    font-size: 12px;
    padding: 12px;
    min-height: 44px;
  }
  .auth-form {
    margin-top: 24px;
  }
  .welcome-art {
    max-width: 440px;
    margin: auto;
  }
  .home-window {
    max-width: calc(100% - 24px);
    margin: 20px auto;
  }
  .home-body {
    padding: 18px 14px;
  }
  .home-greeting {
    align-items: flex-start;
  }
  .home-greeting h2 {
    font-size: 18px;
  }
  .home-actions {
    flex-direction: column;
  }
  .home-entries {
    gap: 10px;
  }
  .home-entry {
    padding: 14px;
    display: block;
    min-height: 0;
  }
  .home-entry > img {
    width: 96px;
    height: 72px;
  }
  .home-entry h3 {
    font-size: 17px;
    margin-top: 12px;
  }
  .home-entry p {
    margin-bottom: 12px;
  }
  .room-row {
    grid-template-columns: 10px 1fr 94px;
    padding: 12px;
    gap: 8px;
  }
  .room-people {
    display: none;
  }
  .room-title {
    font-size: 14px;
  }
  .room-row button {
    font-size: 12px;
    padding: 4px 8px;
  }
  .room-layout {
    display: flex;
    flex-direction: column;
    height: auto;
    margin: 10px 10px 0;
    gap: 12px;
  }
  .chat-window {
    height: calc(100dvh - 72px);
    min-height: 520px;
  }
  .ai-window {
    margin-bottom: 18px;
  }
  .room-toolbar {
    flex-wrap: wrap;
  }
  .room-toolbar .presence {
    min-width: 100px;
  }
  .composer {
    gap: 8px;
    grid-template-columns: 1fr 94px;
  }
  .message-text {
    font-size: 14px;
  }
  .message {
    gap: 7px;
  }
  .chat-feed {
    padding: 14px 10px;
  }
  .task-button {
    min-width: 0;
    max-width: 160px;
    flex: 1;
  }
  .start-button {
    min-width: 124px;
  }
  .taskbar {
    gap: 6px;
  }
  #clock {
    margin-left: auto;
    min-width: 76px;
    font-size: 11px;
  }
  #account-label {
    display: none;
  }
  .taskbar-space {
    display: none;
  }
  .connection-layout {
    grid-template-columns: 1fr;
  }
  .connection-sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 0;
  }
  .connection-sidebar button {
    width: auto;
    flex: 1 0 auto;
  }
  .connection-sidebar .provider {
    font-size: 12px;
    min-height: 36px;
    padding: 6px;
    gap: 6px;
  }
  .connection-sidebar .provider img,
  .connection-sidebar .provider > span {
    width: 20px;
    height: 20px;
  }
  .otp {
    gap: 8px;
  }
  .otp input {
    height: 48px;
    font-size: 24px;
  }
  .verify-body {
    padding: 24px 20px;
  }
  .verify-window {
    margin: 40px auto;
  }
  .two-fields {
    grid-template-columns: 1fr;
  }
  .profile-item {
    flex-wrap: wrap;
  }
  .profile-item .grow {
    min-width: 130px;
  }
  .home-footer {
    align-items: flex-start;
  }
  .color-choice {
    padding: 6px;
  }
  .dialog-body {
    padding: 16px;
  }
}

@media (max-width: 1150px) {
  .login-layout > .window { min-height: 0; }
  .intro-body .notice { height: auto; margin-bottom: 0; flex-wrap: wrap; }
  .auth-body { padding-bottom: 24px; }
  .ai-card-footer { margin-top: 4px; }
  .ai-status { font-size: 12px; }
}
@media (max-width: 760px) {
  .home-entry { height: auto; }
  .home-greeting h2 { overflow-wrap: anywhere; }
  .create-window .dialog-body { padding: 16px; }
  .create-window .agent-picker { max-height: 224px; }
  .create-settings { flex-wrap: wrap; }
  .connection-window { min-height: 0; }
  .connection-window:modal { bottom: 40px; }
  .connection-steps > .dialog-actions { flex-wrap: wrap; }
  .resend-row { margin-bottom: 18px; }
  .nickname-block { padding-top: 18px; }
  .person-preview { padding-left: 10px; gap: 10px; }
}

/* Social rooms: paired seats and the invitation/wizard windows (Figma S1c–S4). */
.visit-window { width: min(560px, calc(100vw - 24px)); }
.invitation-window { width: min(600px, calc(100vw - 24px)); margin: auto; }
.invitation-hero { background: var(--cream, #f6f3ea); text-align: center; padding: 28px 24px 0; }
.invitation-hero img { margin: 14px auto 0; width: 180px; image-rendering: pixelated; }
.invitation-preview { border: 1px solid #a9a5bc; background: #f6f3ea; padding: 16px; }
.invitation-preview img { width: 120px; }
.invitation-window blockquote { margin: 0 0 24px; border-left: 3px solid #55508a; padding-left: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.companion-option { display:flex; gap:14px; align-items:center; padding:16px; border:1.5px solid #a9a5bc; background:white; margin-bottom:12px; }
.companion-option small { display:block; color:#6e6a86; margin-top:4px; }
.companion-option:has(input:checked) { outline: 2px solid #55508a; }
.member-groups { display:flex; flex:0 0 auto; align-items:end; gap:22px; overflow-x:auto; background:linear-gradient(#f6f3ea 0 78%, #e4dccb 78%); border:1px solid #a9a5bc; padding:16px 18px 8px; margin-bottom:12px; }
.member-group { text-align:center; flex:0 0 auto; min-width:112px; }
.member-group small { color:#2e2a45; display:block; font-size:11px; margin-top:4px; }
.pair-art { display:flex; justify-content:center; align-items:end; gap:4px; height:68px; }
.human-seat, .paired-ai { width:40px; height:68px; position:relative; display:flex; flex-direction:column; align-items:center; justify-content:end; }
.human-seat .person-avatar { width:28px; height:28px; font-size:13px; border-color:currentColor; }
.human-seat .shoulders { width:24px; height:12px; }
.pair-chair { width:36px; height:20px; flex-shrink:0; }
.paired-ai .mascot { width:40px; height:32px; }
.empty-seat { width:32px; height:32px; border:1px dashed #a9a5bc; opacity:.7; }
@media(max-width:640px) { .member-groups { gap:12px; } .social-room .room-toolbar { flex-wrap:wrap; } }

.private-head {display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:10px;}
.private-head small {font-size:11px;color:#6e6a86;}
.private-head select {margin-left:auto; max-width:160px;}
.private-mode {display:flex;align-items:center;gap:0;border:1.5px solid #2e2a45;background:white;padding:10px;}
.private-mode span {margin-right:auto;font-size:12px;font-weight:600;}
#private-instructions {border:1px solid #a9a5bc;background:#fffbdd;margin-bottom:12px;padding:10px;}
#private-instructions summary {cursor:pointer;font-size:12px;}
#instruction-form {display:grid;gap:10px;padding-top:12px;}
#instruction-form .field {gap:4px;font-size:12px;}
#instruction-form textarea {min-height:34px;resize:vertical;}
.private-history {max-height:260px;overflow:auto;border:1.5px solid #2e2a45;background:white;padding:12px;}
.private-history:empty {display:none;}
.private-message {margin-bottom:14px;}
.private-message p, .draft-content {white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;}
.private-message small {color:#6e6a86;font-size:11px;}
.private-message p {font-size:13px;margin:4px 0;}
#private-composer {display:flex;align-items:end;gap:8px;margin:10px 0;flex-wrap:wrap;}
#private-composer textarea {flex:1;min-width:140px;resize:vertical;}
#private-chat-notice {flex-basis:100%;margin:0;}
.draft-card {background:#f6f3ea;border:1px solid #a9a5bc;margin-bottom:12px;padding:10px;}
.draft-card.pending {border:1.5px dashed #55508a;background:#fffbdd;}
.draft-label {font-size:12px;font-weight:600;color:#55508a;}
.draft-content {font-size:13px;max-height:none;}
.draft-card textarea {width:100%;resize:vertical;min-height:150px;margin:8px 0;}
.draft-actions {display:flex;gap:8px;flex-wrap:wrap;}
.instruction-proposal {border-left:2px solid #55508a;padding:8px;background:#f6f3ea;}
.instruction-proposal small {display:block;white-space:pre-wrap;}
.room-controls {border-top:1px solid #a9a5bc;padding-top:12px;margin-top:16px;}
.room-controls summary {cursor:pointer;margin-bottom:12px;font-size:12px;}
@media(min-width:1000px) {.social-room:not(.sidebar-hidden) {grid-template-columns:minmax(0,1fr) 410px;}}
.preparation-dialog {width:min(840px,calc(100vw - 24px));padding:8px;max-height:calc(100dvh - 40px);overflow:auto;}
.preparation-layout {display:grid;grid-template-columns:210px minmax(0,1fr);gap:16px;margin-top:14px;}
.preparation-steps {background:linear-gradient(#4a4580,#8a84bc);color:white;padding:20px;position:relative;min-height:460px;border-bottom:70px solid #e4dccb;}
.preparation-steps .mascot {position:absolute;bottom:12px;left:70px;transform:scale(1.5);transform-origin:bottom center;}
.preparation-content {min-width:0;}
.preparation-content h2 {font-size:20px;}
.preparation-content [data-prep-connect] {margin:0 0 12px;}
.preparation-channel .private-mode, .preparation-channel .private-head, .preparation-channel [name=name], .preparation-channel label:has([name=name]) {display:none;}
.preparation-channel #private-instructions {background:white;}
.preparation-channel #instruction-form .field {display:grid;grid-template-columns:64px 1fr;align-items:center;}
.preparation-channel .private-history {max-height:180px;}
.preparation-actions {border-top:1px solid #a9a5bc;padding-top:12px;margin-top:12px;}
@media(max-width:640px){.preparation-layout{grid-template-columns:1fr}.preparation-steps{display:flex;gap:12px;min-height:0;border:0;padding:10px;font-size:11px}.preparation-steps p{margin:0}.preparation-steps .mascot{display:none}}
.color-green {color:#4f7d4c;}.color-pink {color:#a4566e;}.color-sand {color:#8a7428;}
.paired-ai .pair-bubble {position:absolute;top:-8px;left:4px;width:32px;height:23px;z-index:2;}
.pair-bubble > img {width:100%;height:100%;display:block;}
.pair-bubble .typing-dots {position:absolute;top:7px;left:9px;display:flex;gap:3px;}
.pair-bubble .typing-dots i {width:2px;height:2px;background:#2e2a45;}
.pair-offline {position:absolute;top:0;left:13px;}
.paired-ai.offline .mascot {opacity:.45;}
#private-task-state button {font-size:11px;min-height:22px;}

/* Keep human identity colors consistent in the conversation and seat groups. */
.message-avatar .person-avatar { border-color: currentColor; }
.connection-reminder { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px; background:#fff8df; border:1px solid #d5bd7e; margin-top:8px; }
#reply-status { color:var(--muted); font-size:13px; padding:8px 0; }
#reply-status:empty, #connection-nudge:empty { display:none; }
.send-status { display:block; color:var(--muted); margin-top:4px; }
