@import url("./person-card.css");
@import url("./assistant-ui.css");
:root {
  /* All type uses rem/em so the device preference scales text consistently. */
  font-size: 100%;
  --paper: #f5f6f2;
  --surface: #fff;
  --ink: #22271f;
  --muted: #687062;
  --line: #e4e8df;
  --accent: #d2ed91;
  --rail: #f0f2eb;
  --subsurface: #fafbf8;
  --soft: #f1f4e9;
  --hover: #edf0e7;
  --action: #171717;
  --action-text: #fff;
  --accent-ink: #22271f;
  --error: #a33b3b;
  --link: #526449;
  --focus: #658635;
  --assistant-bubble: #f1f4ec;
  --user-bubble: #e3edcf;
  color-scheme: light;
  --body-size: 1.125rem;
  --body-leading: 1.7;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
/* Keep operating-system/browser display scaling independent of text size. */
:root[data-text-size="80"] { font-size: 80%; }
:root[data-text-size="90"] { font-size: 90%; }
:root[data-text-size="110"] { font-size: 110%; }
:root[data-text-size="125"] { font-size: 125%; }
.text-size-preview {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--subsurface);
}

.agent-settings {
  font-size: var(--body-size);
  line-height: var(--body-leading);
  height: min(660px, calc(100dvh - 190px));
}
.agent-settings form {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.agent-settings .field {
  margin: 0;
}
.agent-media-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.agent-voice-edit {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.agent-voice-edit button {
  text-align: left;
  padding: 4px 0;
}
.agent-settings textarea {
  min-height: 66px;
}
.agent-settings [data-add] {
  align-self: flex-end;
  padding: 4px 12px;
}
.agent-settings .error:empty {
  display: none;
}
@media (max-width: 600px) {
  .agent-media-settings {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .agent-settings {
    height: auto;
    min-height: 550px;
  }
}
.agent-cover-edit {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 0;
}
.agent-cover-edit img {
  width: 120px;
  height: 160px;
  object-fit: contain;
  border-radius: 16px;
}
.agent-cover-choice {
  display: grid;
  place-items: center;
  min-width: 120px;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--soft);
  cursor: pointer;
}
.agent-cover-choice:focus-visible, .photo-choice:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.agent-photo-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px);
  padding: 20px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  font-size: var(--body-size);
  line-height: var(--body-leading);
}
.agent-photo-picker { display: flex; flex-direction: column; max-height: calc(100dvh - 76px); gap: 16px; }
.agent-photo-picker header, .agent-photo-picker footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.agent-photo-picker h2 { margin: 0; font-size: 1.5rem; }
.photo-picker-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.photo-picker-actions button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; min-height: 44px; }
.photo-picker-actions .meta { flex-basis: 100%; }
.photo-history { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 5px; overflow-y: auto; min-height: 120px; }
.photo-history-item { position: relative; min-width: 0; }
.photo-choice { display: flex; flex-direction: column; width: 100%; padding: 0; overflow: hidden; border: 2px solid var(--line); border-radius: 16px; background: var(--soft); }
.photo-choice[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.photo-choice img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: contain; }
.photo-choice span { padding: 6px; font-size: var(--body-size); line-height: 1.6; }
.photo-remove { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; min-height: 36px; border-radius: 50%; background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 2px 8px #0003; }
.agent-photo-picker .error:empty { display: none; }
@media(max-width: 600px) {
  .photo-history { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .agent-photo-picker footer { align-items: stretch; flex-direction: column; }
}
.agent-cover-edit .field {
  flex: 1;
  min-width: 0;
}
.agent-settings input[type="file"] {
  width: 100%;
}
.settings-conversation {
  flex: 1;
  min-height: 96px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
}
.settings-conversation p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.settings-reply,
.settings-request {
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--assistant-bubble);
}
.settings-turn {
  margin: 16px 0 16px 28px;
  text-align: right;
}
.settings-request {
  text-align: left;
  background: var(--user-bubble);
}
.settings-turn button {
  color: var(--muted);
  padding: 6px 8px;
}
.settings-apply {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.settings-apply .meta {
  flex: 1;
  min-width: 180px;
}
.enterprise-options {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}
.enterprise-options label {
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  background: var(--surface);
}
.enterprise-options label:has(:checked) {
  border-color: var(--focus);
  background: var(--soft);
}
.enterprise-options input {
  width: 20px;
  height: 20px;
  accent-color: var(--focus);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  color: inherit;
}
button {
  border: 0;
  background: none;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus);
}
button[aria-busy="true"] {
  cursor: progress;
}
input,
textarea,
select {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 15px;
  background: var(--surface);
  color: var(--ink);
}
textarea {
  resize: vertical;
  line-height: var(--body-leading);
  font-size: var(--body-size);
}
p,
.reading {
  font-size: var(--body-size);
  line-height: var(--body-leading);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -1.5px;
}
h2 {
  font-size: 1.5625rem;
  font-weight: 550;
}
h3 {
  font-size: 1.1875rem;
}
small,
.meta {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--muted);
}
.initial {
  display: grid;
  place-items: center;
  height: 100dvh;
  font-size: 1.125rem;
}
.primary {
  background: var(--action);
  color: var(--action-text);
  border-radius: 12px;
  padding: 12px 20px;
  min-height: 48px;
}
.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 10px 16px;
  min-height: 44px;
}
.danger {
  color: var(--error);
}
.error {
  color: var(--error);
  font-size: 1.125rem;
  line-height: 1.7;
}
.field-error {
  display: block;
  color: var(--error);
  font-size: 1rem;
  line-height: 1.7;
}
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 260px;
  padding: 40px;
  text-align: center;
}
.empty p {
  max-width: 480px;
  color: var(--muted);
}
.conversation-starters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.conversation-starters button {
  font-size: var(--body-size);
  line-height: 1.6;
  white-space: normal;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.4375rem;
  font-weight: 650;
  letter-spacing: -0.8px;
}
.brand img {
  width: 38px;
  height: 38px;
}
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1300px;
  margin: auto;
  padding: 70px;
  align-items: center;
  gap: 100px;
}
.login-story {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.login-story h1 {
  text-wrap: balance;
  font-size: 3.25rem;
  line-height: 1.3;
}
.login-logo {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
.login-story .sub {
  color: var(--muted);
  max-width: 420px;
}
.login-art {
  display: grid;
  grid-template-columns: repeat(3, 70px);
  gap: 12px;
  padding: 20px 0;
}
.login-art span {
  width: 70px;
  height: 70px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}
.login-art span:nth-child(2) {
  background: var(--accent);
  transform: translateY(-15px);
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 36px;
  border-radius: 26px;
  box-shadow: 0 18px 60px #27311a06;
}
.login-card form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 28px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 1.125rem;
  line-height: 1.7;
}
.login-card .primary {
  margin-top: 8px;
}
.login-card :is(input, select):focus {
  outline: none;
  outline-offset: 0;
  border-color: var(--focus);
  box-shadow: 0 0 0 1px var(--focus);
}
.login.login-split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  max-width: none;
  padding: 0;
  gap: 0;
  background: var(--surface);
}
.login-split .login-story {
  position: relative;
  min-width: 0;
  min-height: 100dvh;
  justify-content: center;
  padding: clamp(40px, 6vw, 96px);
  margin: 0;
  background: var(--rail);
  color: var(--rail-ink, var(--ink));
}
.login-split .login-logo {
  align-self: center;
  margin-bottom: clamp(24px, 5vh, 52px);
}
.login-split .login-story h1 {
  font-size: clamp(2rem, 3.5vw, 3.25rem);
}
.login-split .login-story .sub {
  color: inherit;
  opacity: 0.85;
}
.login-split .login-card {
  min-width: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 6vw, 96px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.login-split .login-card > * {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
}
.login-split > .desktop-downloads {
  display: none;
}
@media (max-width: 720px) {
  .login.login-split {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }
  .login-split .login-story {
    min-height: 0;
    padding: 36px 24px;
    gap: 20px;
  }
  .login-split .login-logo {
    margin-bottom: 0;
  }
  .login-split .login-card {
    min-height: 0;
    padding: 36px 24px 48px;
  }
}
.demo {
  border-top: 1px solid var(--line);
  margin-top: 25px;
  padding-top: 20px;
}
.demo summary {
  cursor: pointer;
  line-height: 1.7;
}
.demo-list {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}
.demo-account {
  text-align: left;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.demo-account span {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
}
.shell {
  height: 100dvh;
  display: grid;
  grid-template-columns: 80px 290px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}
.rail {
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 24px 8px;
  gap: 13px;
  background: var(--rail);
  color: var(--rail-ink, var(--muted));
}
.rail img {
  width: 42px;
  height: 42px;
  margin-bottom: 26px;
}
.rail img.rail-brand {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 8px;
  flex: none;
}
.rail button {
  width: 62px;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 14px;
  font-size: 0.75rem;
  color: inherit;
}
.rail button:not(.active):hover {
  background: color-mix(
    in srgb,
    var(--rail-ink, var(--muted)) 10%,
    transparent
  );
}
.rail button:focus-visible {
  outline-color: var(--rail-ink, var(--focus));
}
.rail button span {
  font-size: 1.3125rem;
  line-height: 1.2;
}
.rail button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 8px #00000004;
}
.rail .bottom {
  margin-top: auto;
}
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--subsurface);
}
.enterprise {
  padding: 28px 22px 18px;
}
.enterprise h2 {
  font-size: 1.25rem;
  margin: 10px 0 6px;
}
.enterprise .kicker {
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 2px;
  color: var(--muted);
}
.side-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 18px 18px;
}
.side-action .primary {
  width: 100%;
  background: var(--accent);
  color: var(--accent-ink);
  text-align: left;
}
.side-action b {
  float: right;
  font-size: 1.25rem;
}
.history {
  padding: 0 10px;
  overflow: auto;
  flex: 1;
}
.history-label {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.75rem;
}
.history button {
  display: block;
  width: 100%;
  padding: 13px 12px;
  text-align: left;
  border-radius: 12px;
  line-height: 1.6;
}
.history button.active {
  background: var(--soft);
}
.history button:hover,
.history button:focus-visible {
  background: var(--hover);
}
.history button.active:hover,
.history button.active:focus-visible {
  background: color-mix(in srgb, var(--soft) 65%, var(--hover));
}
.history .history-title {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: var(--body-size);
}
.workspace {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}
.topbar {
  height: 88px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  gap: 20px;
}
.topbar h2 {
  font-size: 1.25rem;
}
.topbar .subtitle {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 5px;
}
.top-actions {
  display: flex;
  gap: 10px;
}
.top-actions button {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.875rem;
}
.top-actions .chat-action {
  position: relative;
  flex: none;
  width: 42px;
  height: 42px;
  padding: 10px;
}
.chat-action:hover,
.chat-action:focus-visible,
.chat-action[aria-expanded="true"] {
  background: var(--hover);
}
.chat-action[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 16px #0002;
  font-size: 0.8125rem;
  line-height: 1.6;
  white-space: nowrap;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}
.chat-action[data-tooltip]:focus-visible::after {
  visibility: visible;
  opacity: 1;
}
@media (hover: hover) {
  .chat-action[data-tooltip]:hover::after {
    visibility: visible;
    opacity: 1;
  }
}
.conversation-menu {
  position: fixed;
  inset: auto;
  margin: 0;
  width: 208px;
  max-width: calc(100vw - 16px);
  padding: 7px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 28px #0002;
  -webkit-app-region: no-drag;
}
.conversation-menu::backdrop {
  background: transparent;
}
.conversation-menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: left;
  font-size: 1.125rem;
  line-height: 1.6;
}
.conversation-menu button:hover,
.conversation-menu button:focus-visible {
  background: var(--hover);
}
.panel {
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.welcome {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 810px;
  min-height: 100%;
  margin: auto;
  padding: 55px 48px;
  gap: 24px;
}
.eyebrow {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}
.welcome h1 {
  font-size: 2.375rem;
  line-height: 1.4;
}
.welcome > p {
  color: var(--muted);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 185px), 1fr));
  gap: 20px;
  align-items: start;
}
.welcome-cards {
  width: min(100%, 468px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.mobile-history {
  display: none;
}
.top-title {
  display: flex;
  align-items: center;
}
.topbar .mobile-back {
  display: none;
}
.welcome {
  max-width: 920px;
}
.browse-people {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  padding: 0;
  min-height: 32px;
  color: var(--link);
}
.people-page {
  max-width: 1480px;
  padding: 42px 44px;
}
.people-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: 30px;
}
.people-heading h1 {
  font:
    500 2.25rem/1.6 "Songti SC",
    "STSong",
    serif;
  margin-top: 8px;
}
.people-heading p {
  color: var(--muted);
  margin-top: 8px;
}
.people-search {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--subsurface);
  border-radius: 14px;
  padding: 0 14px;
  min-width: 250px;
  max-width: 320px;
  width: 100%;
  color: var(--muted);
}
.people-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 13px 0;
  border-radius: 0;
  font-size: 1rem;
}
.people-index {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
}
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.category-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 17px;
  font-size: 1rem;
  line-height: 1.6;
  white-space: nowrap;
}
.category-tabs button[aria-pressed="true"] {
  background: var(--action);
  border-color: var(--action);
  color: var(--action-text);
}
.category-tabs button span {
  font-size: 0.75rem;
  opacity: 0.65;
}
.people-index > .meta {
  flex: none;
}
.people-empty {
  grid-column: 1 / -1;
}
.page {
  max-width: 1100px;
  margin: auto;
  padding: 35px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}
.page-heading input {
  max-width: 280px;
  width: 100%;
}
#flomo-updates { max-width: 900px; margin: 0 auto; padding: 0 24px 24px; }
.flomo-update { margin-top: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); font-size: var(--body-size); line-height: var(--body-leading); overflow-wrap: anywhere; }
.flomo-update h3 { margin: 0 0 12px; font-size: var(--body-size); }
.flomo-update p { margin: 10px 0; }
.flomo-field { margin: 14px 0; }
.flomo-field pre { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.flomo-update summary { cursor: pointer; min-height: 44px; }
.flomo-update .connection-actions { margin-top: 16px; }
.messages {
  max-width: 860px;
  margin: auto;
  padding: 30px 40px 50px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.message {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}
.message .avatar {
  height: 34px;
  width: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--soft);
  font-size: 1rem;
  margin-top: 4px;
  overflow: hidden;
}
.message .avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.message.user {
  flex-direction: row-reverse;
}
.message.user .avatar {
  background: var(--hover);
}
.message-body {
  min-width: 0;
  max-width: calc(100% - 49px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.message .who {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.bubble {
  min-width: 0;
  max-width: 100%;
  padding: 16px 20px;
  background: var(--assistant-bubble);
  border: 1px solid var(--line);
  border-radius: 5px 20px 20px 20px;
}
.message.user .message-body {
  align-items: flex-end;
  max-width: min(85%, calc(100% - 49px));
}
.message.user .bubble {
  background: var(--user-bubble);
  border-radius: 20px 5px 20px 20px;
}
.message.user .who {
  display: none;
}
.bubble .text {
  font-size: var(--body-size);
  line-height: var(--body-leading);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble .markdown {
  white-space: normal;
}
.markdown > :first-child {
  margin-top: 0;
}
.markdown > :last-child {
  margin-bottom: 0;
}
.markdown p,
.markdown ul,
.markdown ol,
.markdown blockquote,
.markdown pre,
.markdown table {
  margin: 0 0 0.75em;
}
.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
  margin: 1em 0 0.4em;
  font-size: 1.12em;
  line-height: 1.6;
  font-weight: 650;
}
.markdown h1 {
  font-size: 1.3em;
}
.markdown h2 {
  font-size: 1.2em;
}
.markdown strong {
  font-weight: 650;
}
.markdown ul,
.markdown ol {
  padding-left: 1.5em;
}
.markdown li + li {
  margin-top: 0.25em;
}
.markdown li > p {
  margin-bottom: 0.3em;
}
.markdown blockquote {
  padding-left: 0.8em;
  border-left: 3px solid var(--muted);
}
.markdown a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.markdown code {
  font-family: ui-monospace, monospace;
  background: var(--hover);
  border-radius: 4px;
  padding: 0.1em 0.25em;
  overflow-wrap: anywhere;
}
.markdown pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 0.6em;
  background: var(--hover);
  border-radius: 8px;
}
.markdown pre code {
  background: none;
  padding: 0;
}
.markdown table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}
.markdown th,
.markdown td {
  padding: 0.35em 0.6em;
  border: 1px solid var(--line);
  text-align: left;
  min-width: 4em;
}
.markdown hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0.8em 0;
}
.message .tools {
  margin-top: 6px;
  display: flex;
  gap: 8px;
}
.message .tools button {
  font-size: 0.8125rem;
  color: var(--muted);
  padding: 7px 6px;
  min-height: 36px;
  border-radius: 8px;
}
.message .tools button:hover {
  background: var(--hover);
}
.typing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 72px;
  min-height: 46px;
  color: var(--link);
}
.typing > span {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: reply-dot 910ms ease-in-out infinite;
}
.typing > span:nth-child(2) { animation-delay: 130ms; }
.typing > span:nth-child(3) { animation-delay: 260ms; }
@keyframes reply-dot {
  0%, 57%, 100% { opacity: .28; transform: scale(.82); }
  28.5% { opacity: 1; transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .typing > span { animation: none; opacity: .65; }
}
.team-progress {
  color: var(--muted);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  padding: 6px 0;
  overflow-wrap: anywhere;
}
.team-progress-summary::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 10px;
  animation: pulse 1.4s infinite;
}
.team-progress ul {
  list-style: none;
  padding: 0 0 0 17px;
  margin: 8px 0 0;
}
.team-progress li {
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
}
@media (prefers-reduced-motion: reduce) {
  .team-progress-summary::before {
    animation: none;
  }
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
.composer-area {
  flex-shrink: 0;
  padding: 10px 32px 20px;
  background: var(--surface);
}
.composer-wrap {
  max-width: 780px;
  margin: auto;
}
.composer {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--subsurface);
  box-shadow: 0 6px 25px #00000004;
  padding: 14px;
}
.composer textarea {
  border: 0;
  background: none;
  display: block;
  resize: none;
  width: 100%;
  min-height: 62px;
  max-height: 200px;
  padding: 3px 6px;
}
.composer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 4px 0;
}
.composer-bottom .hint {
  font-size: 0.75rem;
  color: var(--muted);
}
.send {
  height: 38px;
  min-width: 64px;
  border-radius: 12px;
  background: var(--action);
  color: var(--action-text);
  font-size: 0.875rem;
  padding: 0 15px;
}
.privacy {
  font-size: 0.75rem;
  line-height: 1.7;
  text-align: center;
  color: var(--muted);
  padding-top: 10px;
}
.composer-error {
  margin-bottom: 10px;
}
.list-row {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.list-row > button {
  text-align: left;
}
.list-row p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.review-answer {
  padding: 20px;
  background: var(--subsurface);
  border-radius: 16px;
  margin: 15px 0;
}
.review-answer pre {
  font-family: inherit;
  white-space: pre-wrap;
  font-size: 1.125rem;
  line-height: 1.7;
}
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-stack textarea {
  min-height: 130px;
}
.form-stack label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.badge {
  background: var(--soft);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 0.75rem;
  color: var(--link);
}
.mobile-back {
  display: none;
}
.notice {
  font-size: 1.125rem;
  line-height: 1.7;
  background: var(--soft);
  padding: 18px 22px;
  border-radius: 15px;
  margin-bottom: 20px;
}
.account-line {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
.member-form {
  margin-bottom: 25px;
}
.member-form input {
  width: 100%;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  max-width: min(760px, calc(100vw - 32px));
  max-height: 85dvh;
  width: 650px;
  color: var(--ink);
  background: var(--surface);
}
dialog::backdrop {
  background: #20251e55;
  backdrop-filter: blur(4px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.modal-head button {
  font-size: 1.5625rem;
}
.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-body pre {
  font: inherit;
  font-size: 1.125rem;
  line-height: 1.7;
  white-space: pre-wrap;
}
.modal-body input,
.modal-body textarea {
  width: 100%;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #22271f;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 1rem;
  line-height: 1.7;
  z-index: 20;
  display: none;
  max-width: 90vw;
}
#toast.visible {
  display: block;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 70px 235px minmax(0, 1fr);
  }
  .welcome {
    padding: 35px;
  }
  .welcome h1 {
    font-size: 1.9375rem;
  }
  .topbar {
    padding: 0 22px;
  }
  .login {
    padding: 40px;
    gap: 45px;
  }
  .login-story h1 {
    font-size: 2.625rem;
  }
  .messages {
    padding: 25px;
  }
}
@media (max-width: 720px) {
  .mobile-history {
    display: block;
  }
  .topbar .mobile-back {
    display: inline-flex;
  }
  .login {
    display: block;
    padding: 30px 20px;
  }
  .login-story {
    gap: 16px;
    margin-bottom: 30px;
  }
  .login-story h1 {
    font-size: 2rem;
  }
  .login-art {
    display: none;
  }
  .login-card {
    padding: 25px;
  }
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 68px;
  }
  .rail {
    grid-row: 2;
    flex-direction: row;
    padding: 0 8px;
    border-right: 0;
    border-top: 1px solid var(--line);
    justify-content: space-around;
    gap: 0;
  }
  .rail img {
    display: none;
  }
  .rail button {
    width: 58px;
    min-height: 54px;
  }
  .rail .bottom {
    margin-top: 0;
  }
  .sidebar {
    display: none;
  }
  .workspace {
    grid-row: 1;
  }
  .topbar {
    height: 76px;
    padding: 0 18px;
  }
  .top-actions {
    gap: 5px;
  }
  .top-actions button {
    padding: 8px;
  }
  .welcome {
    padding: 28px 22px;
    gap: 20px;
  }
  .welcome h1 {
    font-size: 1.875rem;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .messages {
    padding: 22px 17px 35px;
    gap: 23px;
  }
  .message {
    gap: 10px;
  }
  .message .avatar {
    height: 30px;
    width: 30px;
    flex-basis: 30px;
    font-size: 0.875rem;
  }
  .composer-area {
    padding: 8px 12px 12px;
  }
  .composer-bottom .hint {
    display: none;
  }
  .composer-bottom {
    justify-content: flex-end;
  }
  .privacy {
    font-size: 0.75rem;
  }
  .page {
    padding: 24px 18px;
  }
  .page-heading {
    flex-wrap: wrap;
  }
  .top-actions .hide-mobile {
    display: none;
  }
  .shell.in-chat .rail {
    display: none;
  }
  .shell.in-chat {
    grid-template-rows: 1fr;
  }
  .mobile-back {
    display: inline-flex;
    margin-right: 10px;
  }
  .top-title {
    display: flex;
    align-items: center;
  }
  .composer {
    padding: 11px;
  }
  .message-body,
  .message.user .message-body {
    max-width: calc(100% - 40px);
  }
  .message .tools button {
    min-height: 44px;
  }
  .panel {
    overscroll-behavior: contain;
  }
  .composer textarea {
    font-size: var(--body-size);
    line-height: var(--body-leading);
  }
}

/* Shared desktop and web shell: Lucide controls and portrait-first navigation. */
.icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: none;
  vertical-align: middle;
}
.rail button > .icon {
  width: 23px;
  height: 23px;
}
.rail button > span {
  font-size: 0.75rem;
  line-height: 1.4;
}
button.icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px;
}
button.icon-only > span {
  display: none;
}
.top-actions button,
.send,
.message .tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.top-actions button .icon {
  width: 17px;
  height: 17px;
}
.shell.no-sidebar {
  grid-template-columns: 80px minmax(0, 1fr);
}
.sidebar {
  padding: 0;
}
.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 18px 16px;
  min-height: 74px;
}
.side-heading > span {
  font-size: 0.8125rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.view-switch {
  display: flex;
  flex: none;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
}
.view-switch button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  color: var(--muted);
}
.view-switch button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 5px #0000000a;
}
.view-switch .icon {
  width: 17px;
  height: 17px;
}
.active-person {
  position: relative;
  flex: 1;
  min-height: 180px;
  margin: 0 12px;
  border-radius: 18px;
  overflow: hidden;
  background: #d9e2d1;
  isolation: isolate;
}
.hero-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 45px 22px 24px;
  color: white;
  max-height: 70%;
  overflow: auto;
}
.hero-caption > span {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: #ffffffb8;
}
.hero-caption h2 {
  font:
    500 1.8125rem/1.6 "Songti SC",
    "STSong",
    serif;
  margin: 4px 0 10px;
}
.hero-caption p {
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: #ffffffdf;
}
.side-controls {
  display: flex;
  flex: none;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  min-height: 72px;
}
.side-controls > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px;
  padding: 12px 9px;
  font-size: 0.875rem;
}
.side-controls button:hover {
  background: var(--hover);
}
.side-controls .icon {
  width: 18px;
  height: 18px;
}
.side-action .primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
}
.agent-history-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 20px 20px;
}
.agent-history-head > .portrait-art {
  width: 44px;
  height: 54px;
  border-radius: 9px;
  flex: none;
}
.agent-history-head h2 {
  font-size: 1.125rem;
}
.history button.history-person {
  display: block;
}
.history-person + .history-person {
  position: relative;
}
.history-person + .history-person::before {
  content: "";
  position: absolute;
  inset: 0 12px auto;
  height: 1px;
  background: var(--line);
  opacity: 0.65;
  pointer-events: none;
}
.history-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
  white-space: nowrap;
}
.history-rounds {
  flex: none;
  font-variant-numeric: tabular-nums;
}
.history-empty {
  padding: 12px;
}
.agent-history-head .portrait-fallback {
  font-size: 1.375rem;
  min-height: 0;
}
.account-menu {
  position: fixed;
  inset: auto auto 88px 12px;
  margin: 0;
  width: 304px;
  max-width: calc(100vw - 24px);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow:
    0 18px 70px #18251025,
    0 3px 12px #1825100a;
}
.account-menu {
  overflow-y: auto;
  overscroll-behavior: contain;
}
.account-menu::backdrop {
  background: transparent;
}
.menu-identity {
  display: flex;
  gap: 13px;
  padding: 14px 12px 18px;
  align-items: center;
}
.account-avatar {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border-radius: 15px;
  background: var(--soft);
  font-size: 1.375rem;
  flex: none;
}
.menu-identity strong {
  display: block;
  font-size: 1.125rem;
  line-height: 1.6;
}
.menu-identity div > span {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--muted);
}
.menu-items {
  border-top: 1px solid var(--line);
  padding: 7px 0;
}
.menu-items button {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  text-align: left;
  font-size: 1rem;
}
.menu-items button:hover,
.menu-items button:focus-visible {
  background: var(--hover);
}
.menu-items button > span {
  flex: 1;
}
.menu-items button > .icon:last-child:not(:first-child) {
  width: 15px;
  height: 15px;
  color: var(--muted);
}
.menu-exit {
  padding-bottom: 0;
}
.menu-version {
  padding: 8px 12px 4px;
  font-size: 0.75rem;
  color: var(--muted);
}
.profile-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 16px;
}
.profile-summary .account-avatar {
  width: 72px;
  height: 72px;
  font-size: 2rem;
  border-radius: 22px;
}
.about-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.about-brand img {
  width: 48px;
  height: 48px;
}
@media (max-width: 1050px) {
  .shell.no-sidebar {
    grid-template-columns: 70px minmax(0, 1fr);
  }
  .people-page {
    padding: 30px;
  }
  .people-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }
  .people-search {
    max-width: 380px;
  }
  .hero-caption {
    padding: 30px 17px 20px;
  }
  .side-controls {
    flex-wrap: wrap;
  }
}
@media (max-width: 720px) {
  .shell.no-sidebar {
    grid-template-columns: 1fr;
  }
  .rail button {
    flex: 1;
    min-width: 0;
    width: auto;
  }
  .rail .bottom {
    margin: 0;
  }
  .people-page {
    padding: 26px 18px;
  }
  .people-heading {
    gap: 18px;
    margin-bottom: 22px;
  }
  .people-heading h1 {
    font-size: 1.875rem;
  }
  .people-search {
    max-width: none;
  }
  .people-index {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 20px;
  }
  .category-tabs {
    gap: 7px;
  }
  .category-tabs button {
    padding: 7px 13px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
  }
  .welcome-cards {
    width: 100%;
  }
  .welcome {
    padding: 28px 20px;
  }
  .mobile-history h3 {
    margin-bottom: 18px;
  }
  .mobile-history .cards {
    margin-bottom: 24px;
  }
  .hero-caption p {
    font-size: var(--body-size);
    line-height: var(--body-leading);
  }
}


/* Semantic appearance tokens also cover menus, form controls and native dialogs. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #171b18;
  --surface: #1c211e;
  --ink: #edf1e9;
  --muted: #b0b9ac;
  --line: #3e493e;
  --rail: #151a16;
  --subsurface: #202721;
  --soft: #2b3829;
  --hover: #303a31;
  --action: #171717;
  --action-text: #fff;
  --error: #ffaaa5;
  --link: #c6dfa7;
  --focus: #d2ed91;
  --assistant-bubble: #28312a;
  --user-bubble: #35452c;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
}
.login-art span:nth-child(2) {
  color: var(--accent-ink);
}
.auto-read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  line-height: 1.7;
  white-space: nowrap;
  color: var(--muted);
  cursor: pointer;
}
.auto-read input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--focus);
}
.auto-read.preference {
  font-size: 1.125rem;
  color: var(--ink);
}
.composer-bottom .hint {
  margin-left: auto;
}
.sync-trigger[aria-busy="true"] .icon {
  animation: sync-spin 1.2s linear infinite;
}
@keyframes sync-spin {
  to {
    transform: rotate(360deg);
  }
}
#update-bubble {
  position: fixed;
  z-index: 15;
  right: 24px;
  bottom: 24px;
  width: min(360px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 14px 60px #0004;
}
#update-bubble strong {
  font-size: 1.25rem;
}
#update-bubble p {
  margin: 10px 0 20px;
}
#update-bubble button {
  width: 100%;
}
.desktop-app .desktop-titlebar {
  position: fixed;
  inset: 0 0 auto;
  height: 32px;
  z-index: 10;
  -webkit-app-region: drag;
  user-select: none;
}
.desktop-app .rail {
  padding-top: 58px;
  -webkit-app-region: drag;
}
.desktop-app .rail img {
  margin-bottom: 12px;
}
.desktop-app .topbar,
.desktop-app .side-heading,
.desktop-app .enterprise,
.desktop-app .social-room-header,
.desktop-app .work-heading,
.desktop-app .login-story,
.desktop-app .login-card {
  -webkit-app-region: drag;
  user-select: none;
}
.desktop-app .topbar,
.desktop-app .side-heading,
.desktop-app .social-room-header,
.desktop-app .work-heading {
  position: relative;
  z-index: 11;
}
.desktop-app button,
.desktop-app a,
.desktop-app input,
.desktop-app select,
.desktop-app textarea,
.desktop-app label,
.desktop-app summary,
.desktop-app [contenteditable="true"],
.desktop-app .login-card form,
.desktop-app .demo,
.desktop-app .account-menu {
  -webkit-app-region: no-drag;
}
.desktop-app :is(input, textarea, [contenteditable="true"]) {
  user-select: text;
}
.window-controls {
  position: fixed;
  right: 0;
  top: 0;
  display: flex;
  z-index: 30;
}
.window-controls button {
  width: 44px;
  height: 28px;
}
.window-controls button:hover {
  background: var(--hover);
}
.desktop-windows .topbar {
  padding-right: 140px;
}
@media (max-width: 720px) {
  .rail {
    overflow-x: auto;
    justify-content: flex-start;
  }
  .rail button {
    flex-shrink: 0;
  }
  .auto-read {
    margin-right: auto;
  }
  #update-bubble {
    bottom: 82px;
    right: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (min-width: 721px) and (max-height: 760px) {
  .desktop-app .rail {
    padding: 44px 8px 12px;
    gap: 4px;
  }
  .desktop-app .rail img {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
  }
  .desktop-app .rail button {
    min-height: 44px;
    gap: 3px;
  }
  .desktop-app .rail button > .icon {
    width: 20px;
    height: 20px;
  }
}

/* Cloud connections use the same semantic colors in light and dark mode. */
#connections {
  min-width: 0;
}
#connections h3 {
  margin: 24px 0 12px;
}
#connections h4 {
  font-size: var(--body-size);
  margin: 0;
}
#connections p,
#connections label,
#connections summary {
  font-size: var(--body-size);
  line-height: var(--body-leading);
  overflow-wrap: anywhere;
}
#connections a {
  color: var(--link);
  font-size: var(--body-size);
  line-height: var(--body-leading);
}
.connection-providers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.connection-provider {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--subsurface);
  border-radius: 16px;
  padding: 18px 14px;
  font-size: var(--body-size);
  line-height: var(--body-leading);
}
.connection-provider .icon:last-child {
  margin-left: auto;
  flex-shrink: 0;
}
.connection-provider:hover {
  background: var(--hover);
}
.connection-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.connection-card,
.connection-empty {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--subsurface);
  overflow-wrap: anywhere;
}
.connection-card p {
  margin: 10px 0;
}
.connection-card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.connection-actions,
.connection-submit {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 16px;
}
.connection-tools {
  padding-left: 24px;
}
.connection-tools strong {
  overflow-wrap: anywhere;
}
#connection-form [data-mode]:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#connection-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#connection-form input,
#connection-form select {
  min-width: 0;
  width: 100%;
  font-size: var(--body-size);
  line-height: var(--body-leading);
}
.connection-message:empty {
  display: none;
}
.connection-progress {
  color: var(--muted);
  font-size: var(--body-size);
  line-height: var(--body-leading);
}
.connection-submit {
  position: sticky;
  bottom: -28px;
  background: var(--surface);
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.disconnect-confirm {
  border-top: 1px solid var(--line);
  margin-top: 12px;
}
.connection-help {
  margin-top: 24px;
}
#connections .connection-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--action-text);
  text-decoration: none;
}
@media (max-width: 520px) {
  .connection-providers {
    grid-template-columns: 1fr;
  }
  .connection-card,
  .connection-empty {
    padding: 14px;
  }
  .top-actions [data-action="connections"] {
    font-size: 0.875rem;
  }
}
#modal:has(#connections) .modal-head {
  position: sticky;
  top: -28px;
  z-index: 3;
  background: var(--surface);
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
#connections .field-error {
  font-size: var(--body-size);
  line-height: var(--body-leading);
}

/* Generic management: the same readable content on desktop and phones. */
.admin-page {
  max-width: 1280px;
}
.admin-heading {
  margin-bottom: 26px;
}
.admin-heading p {
  margin-top: 12px;
}
.admin-tabs,
.admin-shortcuts,
.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.admin-tabs {
  margin: 24px 0;
}
.admin-tabs [aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}
.admin-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  background: var(--surface);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.admin-filters label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  font-size: var(--body-size);
  line-height: var(--body-leading);
}
.admin-filters input,
.admin-filters select {
  width: 100%;
  min-width: 0;
}
.admin-filters > .primary {
  align-self: end;
}
.admin-shortcuts {
  grid-column: 1 / -1;
}
.admin-note {
  color: var(--muted);
  margin: 18px 0;
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.admin-stats article {
  display: flex;
  flex-direction: column;
  padding: 18px;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.admin-stats span {
  font-size: var(--body-size);
  line-height: var(--body-leading);
}
.admin-stats strong {
  font-size: 1.875rem;
}
.admin-usage {
  padding: 22px;
  background: var(--soft);
  border-radius: 18px;
}
.admin-usage p {
  margin-top: 10px;
}
.admin-result-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 28px 0 16px;
}
.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.admin-row p {
  margin: 6px 0;
}
.admin-row button {
  margin-top: 10px;
}
.admin-pagination {
  margin: 24px 0;
}
.admin-prices {
  max-width: 760px;
}
.admin-prices > p,
.admin-prices form {
  margin: 18px 0 28px;
}
.admin-prices select,
.admin-prices input {
  min-width: 0;
  width: 100%;
}
.admin-price-history {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.admin-turn {
  margin: 26px 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.admin-message {
  margin: 16px 0;
  padding: 16px;
  background: var(--subsurface);
  border-radius: 12px;
}
.admin-message pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: var(--body-size);
  line-height: var(--body-leading);
  margin: 10px 0 0;
}
.admin-detail {
  overflow-wrap: anywhere;
}
.admin-detail > p {
  margin-top: 12px;
}
.admin-call {
  padding: 14px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.admin-call summary {
  cursor: pointer;
  font-size: var(--body-size);
  line-height: var(--body-leading);
}
.admin-call p {
  margin-top: 10px;
}
.admin-error {
  padding: 24px 0;
}
.admin-error button {
  margin-top: 16px;
}
.rail {
  overflow-y: auto;
  flex-shrink: 0;
}
.rail > button {
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .admin-page {
    padding: 22px 16px;
  }
  .admin-filters {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }
  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-stats article {
    padding: 14px;
  }
  .admin-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .admin-usage {
    padding: 16px;
  }
  .admin-tabs button {
    flex: 1 0 auto;
  }
  .rail {
    overflow-y: hidden;
  }
}
#modal:has(.admin-detail) .modal-head {
  position: sticky;
  top: -28px;
  z-index: 2;
  padding: 16px 0;
  background: var(--surface);
}
@media (max-width: 720px) {
  .admin-filters > .primary {
    position: sticky;
    bottom: 12px;
    z-index: 1;
    box-shadow: 0 4px 18px #0002;
  }
}

/* Shared brand editor and employee results: all colors inherit semantic tokens. */
.welcome-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 24px;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.6;
}
.welcome-examples span {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.brand-page {
  max-width: 1440px;
  width: 100%;
}
.brand-toolbar,
.brand-actions,
.work-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.brand-toolbar {
  justify-content: space-between;
  margin-bottom: 24px;
}
.brand-toolbar .field {
  min-width: 220px;
}
.brand-actions {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 16px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.brand-actions p {
  width: 100%;
  color: var(--muted);
}
.brand-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 44px;
}
.brand-editor-grid h3 {
  margin-top: 20px;
}
.brand-editor-grid input,
.brand-editor-grid textarea {
  width: 100%;
  min-width: 0;
}
.brand-editor-grid fieldset {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  min-width: 0;
}
.brand-colors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.brand-previews {
  position: sticky;
  top: 130px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.brand-preview {
  background: #fff;
  color: #22271f;
  border: 1px solid #d9dfd6;
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-wrap: anywhere;
}
.brand-preview p {
  color: inherit;
}
.dark-preview {
  background: #171b18;
  color: #edf1e9;
  border-color: #3e493e;
}
.preview-bubble {
  font-size: 1.125rem;
  line-height: 1.7;
  border-radius: 16px;
  padding: 14px;
}
.preview-accent {
  align-self: flex-start;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 1.125rem;
  line-height: 1.6;
}
.brand-builds,
.extension-settings {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.brand-builds .field {
  width: 100%;
}
.brand-builds input {
  width: 100%;
}
.work-products {
  background: var(--paper);
  color: var(--ink);
  border: 0;
  border-left: 1px solid var(--line);
  width: 320px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.work-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 18px;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.work-person {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.work-person img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}
.work-person div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.work-person strong {
  font-size: 1.125rem;
  overflow-wrap: anywhere;
}
.work-person span {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}
.work-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--line);
  overflow-y: auto;
  max-height: 50%;
  flex-shrink: 0;
}
.work-controls h2 {
  font-size: 1.375rem;
  overflow-wrap: anywhere;
}
.work-controls select {
  width: 100%;
}
.work-controls .primary {
  font-size: 1rem;
}
.work-status {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
}
.work-link {
  padding: 0;
  align-self: flex-start;
  color: var(--link);
  font-size: 1.125rem;
  line-height: 1.6;
}
.work-list {
  flex: 1;
  overflow: auto;
  padding: 18px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.work-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-wrap: anywhere;
}
.work-card h3 {
  font-size: 1.1875rem;
  line-height: 1.6;
}
.work-card p {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.work-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}
.work-card .secondary {
  align-self: flex-start;
}
.work-empty {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--muted);
  padding: 20px 0;
}
.work-empty p {
  font-size: 1.125rem;
  line-height: 1.6;
}
.work-drawer {
  margin: auto;
  width: min(420px, calc(100vw - 24px));
  height: min(850px, 90dvh);
  max-height: 90dvh;
  border: 1px solid var(--line);
  border-radius: 22px;
}
.work-drawer[open] {
  display: flex;
}
.work-drawer::backdrop {
  background: #0006;
}
.work-edit-form {
  margin-top: 24px;
}
.work-edit-form textarea {
  min-height: 240px;
}
.work-document {
  margin: 20px 0;
  overflow-wrap: anywhere;
}
.work-version {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.work-version summary {
  cursor: pointer;
  font-size: 1.125rem;
  line-height: 1.6;
}
@media (min-width: 1280px) {
  .shell.has-work-products.in-chat {
    grid-template-columns: 80px 260px minmax(0, 1fr) 320px;
  }
  .shell.has-work-products #work-products {
    display: flex;
  }
  .shell.has-work-products .topbar {
    padding: 0 20px;
    gap: 12px;
  }
  .shell.has-work-products .top-actions {
    gap: 8px;
  }
  .shell.has-work-products .messages {
    padding-left: 24px;
    padding-right: 24px;
  }
}
@media (max-width: 1000px) {
  .brand-editor-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .brand-previews {
    position: static;
  }
}
@media (max-width: 720px) {
  .brand-page {
    padding: 22px 16px;
  }
  .brand-colors {
    grid-template-columns: 1fr;
  }
  .brand-actions {
    gap: 8px;
  }
  .brand-actions button {
    padding: 10px 12px;
  }
  .top-actions button[data-action="work-products"] span {
    display: none;
  }
  .work-drawer {
    height: 90dvh;
  }
}
/* Enterprise chat: shared visual language, independent membership and drafts. */
@media (max-width: 720px) {
  .in-chat .topbar {
    gap: 8px;
    padding-inline: 12px;
  }
  .in-chat .top-title {
    flex: 1;
    min-width: 0;
  }
  .in-chat .top-title > div {
    min-width: 0;
  }
  .in-chat .top-title h2,
  .in-chat .top-title .subtitle {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .in-chat .mobile-back {
    flex: none;
    margin-right: 4px;
  }
  .in-chat .top-actions {
    flex: none;
  }
  .in-chat .top-actions .chat-action {
    width: 38px;
    height: 40px;
  }
}
.agent-tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 450;
  line-height: 1.7;
}
.top-title h2 {
  line-height: 1.6;
}
.social-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.social-list {
  border-right: 1px solid var(--line);
  background: var(--subsurface);
  padding: 20px 12px;
  overflow-y: auto;
}
.social-list input {
  width: 100%;
}
.social-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 10px;
  text-align: left;
  border-radius: 12px;
}
.social-item:hover,
.social-item:focus-visible {
  background: var(--hover);
}
.social-item.selected {
  background: var(--soft);
}
.social-item > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.social-item strong,
.social-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.social-item strong {
  font-size: 1.125rem;
  line-height: 1.6;
}
.social-item small {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--muted);
}
.colleague-avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font-size: 1rem;
}
.unread-count {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 12px;
  padding: 2px 7px;
  font-size: 0.75rem;
}
.rail button {
  position: relative;
}
.rail .nav-unread {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #b42332;
  color: #fff;
  font: 600 0.75rem/1 system-ui;
}
.rail .nav-unread[hidden] {
  display: none;
}
.account-avatar img,
.colleague-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.profile-avatar {
  cursor: pointer;
  overflow: hidden;
  padding: 0;
}
.profile-avatar[aria-busy="true"] {
  opacity: 0.6;
}
.social-conversation {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.social-room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
}
.social-room-header h2 {
  line-height: 1.6;
}
.social-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 28px;
}
.social-messages {
  width: 100%;
  max-width: none;
  margin: 0;
  gap: 24px;
}
.social-messages .message {
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
}
.social-messages .who,
.social-messages .user .who {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--muted);
}
.social-messages .who time {
  font-size: 0.75rem;
}
.social-messages .bubble {
  font-size: var(--body-size);
  line-height: var(--body-leading);
}
.plain-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.shared-record {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: normal;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-top: 10px;
  max-width: 100%;
}
.shared-record strong,
.shared-record small {
  display: block;
}
.shared-record small {
  color: var(--muted);
  font-size: 0.8125rem;
}
.group-mentions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  border: 0;
  padding: 8px 0;
  font-size: 0.9375rem;
  line-height: 1.7;
}
.group-mentions legend {
  color: var(--muted);
  font-size: 0.8125rem;
}
.member-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  font-size: 1.125rem;
  line-height: 1.7;
}
.member-picker label {
  padding: 6px;
}
#modal:has(#group-form) {
  width: 680px;
  height: min(780px, 90dvh);
  max-height: 90dvh;
  padding: 0;
  overflow: hidden;
}
#modal:has(#group-form)[open] {
  display: flex;
  flex-direction: column;
}
#modal:has(#group-form) .modal-head {
  flex: none;
  gap: 16px;
  margin: 0;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
#modal:has(#group-form) .modal-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
#group-form {
  flex: 1;
  min-height: 0;
  gap: 0;
}
.group-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  scrollbar-gutter: stable;
}
.group-scroll > * {
  flex: none;
}
.group-scroll .member-picker {
  display: block;
  min-inline-size: 0;
  margin: 0;
}
.group-footer {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.group-footer .primary {
  width: 100%;
  font-size: 1.125rem;
  line-height: 1.6;
}
.group-footer .error:empty {
  display: none;
}
.group-scroll .agent-picker {
  display: block;
}
.group-avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 14px;
}
.group-avatar-grid .member-choice {
  position: relative;
  display: block;
  justify-self: center;
  width: 76px;
  height: 76px;
  padding: 6px;
  cursor: pointer;
}
.member-choice-avatar {
  display: block;
  width: 64px;
  height: 64px;
  border: 2px solid transparent;
  border-radius: 16px;
  object-fit: cover;
  background: var(--soft);
}
.member-choice-fallback {
  display: grid;
  place-items: center;
  color: var(--ink);
}
.member-choice-fallback .icon {
  width: 32px;
  height: 32px;
}
.member-choice > input {
  appearance: none;
  position: absolute;
  z-index: 1;
  top: 1px;
  right: 1px;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: 2px solid var(--muted);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
}
.member-choice > input:checked {
  border-color: var(--action);
  background: var(--action);
}
.member-choice > input:checked ~ .member-choice-avatar {
  border-color: var(--action);
}
.member-choice-check {
  position: absolute;
  z-index: 2;
  top: 1px;
  right: 1px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--action-text);
  opacity: 0;
  pointer-events: none;
}
.member-choice-check .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}
.member-choice > input:checked ~ .member-choice-check {
  opacity: 1;
}
.group-member-tooltip {
  position: fixed;
  z-index: 5;
  max-width: min(320px, calc(100vw - 64px));
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 16px #0002;
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
  pointer-events: none;
}
@media (max-width: 520px) {
  #modal:has(#group-form) .modal-head {
    padding: 16px;
  }
  .group-scroll {
    padding: 16px;
  }
  .group-scroll .member-picker {
    padding: 12px;
  }
  .group-footer {
    padding: 12px 16px;
  }
}
.share-preview {
  max-height: 38vh;
  overflow-y: auto;
  background: var(--subsurface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.transcript-records {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.transcript-turn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  font-size: var(--body-size, 1.125rem);
  line-height: 1.7;
}
.transcript-user {
  align-items: flex-end;
}
.transcript-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 6px;
}
.transcript-user .transcript-meta {
  justify-content: flex-end;
}
.transcript-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 4px;
  background: var(--assistant-bubble, var(--surface));
  color: var(--ink);
  overflow-wrap: anywhere;
  min-width: 0;
}
.transcript-user .transcript-bubble {
  background: var(--user-bubble, var(--subsurface));
  border-radius: 16px 16px 4px 16px;
}
.transcript-bubble > :first-child {
  margin-top: 0;
}
.transcript-bubble > :last-child {
  margin-bottom: 0;
}
.transcript-bubble pre {
  overflow-x: auto;
}
@media (max-width: 480px) {
  .transcript-bubble {
    max-width: 95%;
  }
  .share-preview {
    padding: 12px;
  }
}
.social-empty {
  padding: 20px 10px;
}
.social-back {
  display: none;
}
.social-conversation > .empty {
  flex: 1;
}
@media (max-width: 760px) {
  .social-layout {
    grid-template-columns: 1fr;
  }
  .social-conversation {
    display: none;
  }
  .social-layout.room-open .social-list {
    display: none;
  }
  .social-layout.room-open .social-conversation {
    display: flex;
  }
  .social-back {
    display: inline-flex;
  }
  .social-room-header {
    padding: 16px;
  }
  .social-messages {
    padding: 18px 12px;
  }
  .social-messages .bubble {
    max-width: 96%;
  }
  .social-room-header h2 {
    font-size: 1.25rem;
  }
  .agent-tag {
    font-size: 0.75rem;
    margin-left: 6px;
  }
  .social-room-header .secondary {
    font-size: 0.875rem;
    padding: 8px;
  }
  .social-room-header > div {
    flex: 1;
  }
  .top-title h2 .agent-tag {
    margin-top: 3px;
  }
}
.brand img[data-brand-logo],
.about-brand img[data-brand-logo] {
  width: 100px;
  height: 50px;
  object-fit: contain;
  border-radius: 8px;
}
.brand-logo-preview {
  width: 160px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
}
.brand-preview .preview-bubble {
  color: inherit;
}
.social-room-header .social-back {
  display: none;
}
.social-room-header > div {
  margin-right: auto;
}
@media (max-width: 760px) {
  .social-room-header .social-back {
    display: inline-flex;
  }
}

/* Quiet login and public desktop downloads. */
.login > .desktop-downloads {
  grid-column: 1 / -1;
}
.desktop-downloads {
  min-width: 0;
}
.download-heading {
  display: flex;
  gap: 16px;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.download-heading h2 {
  font-size: 1.5rem;
  line-height: 1.6;
}
.download-heading p,
.download-note {
  color: var(--muted);
  font-size: var(--body-size);
  line-height: 1.6;
}
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.download-platform {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 18px;
  padding: 22px;
  min-width: 0;
}
.download-platform h3 {
  margin: 0 0 5px;
  font-size: 1.3125rem;
}
.download-platform p {
  margin-bottom: 14px;
  color: var(--muted);
}
.download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.download-link {
  display: inline-flex;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--action);
  color: var(--action-text);
  text-decoration: none;
  font-size: var(--body-size);
  line-height: 1.6;
}
.download-link:hover {
  filter: brightness(0.92);
}
.download-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.download-note {
  margin-top: 15px;
}
.download-page {
  max-width: 1180px;
  margin: auto;
  padding: 64px 32px;
}
.download-page > a {
  color: var(--muted);
}
.download-page > h1 {
  font-size: clamp(1.875rem, 5vw, 2.75rem);
  line-height: 1.4;
  margin: 44px 0 12px;
}
.download-page > p {
  color: var(--muted);
  margin-bottom: 32px;
}
.download-error {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.download-error button {
  margin-top: 12px;
  text-decoration: underline;
}
@media (max-width: 760px) {
  .download-grid {
    grid-template-columns: 1fr;
  }
  .login {
    padding: 28px 22px;
    gap: 28px;
  }
  .download-platform {
    padding: 20px;
  }
  .download-page {
    padding: 30px 22px;
  }
}

#modal:has([data-dialog-downloads]) {
  width: 1100px;
  max-width: calc(100vw - 32px);
}

/* App chrome is not a document. Only message bodies and explicit reading/editing areas select. */
body {
  -webkit-user-select: none;
  user-select: none;
}
input,
textarea,
[contenteditable="true"],
.selectable,
.selectable *,
.message .text,
.message .text * {
  -webkit-user-select: text;
  user-select: text;
}
img {
  -webkit-user-drag: none;
}
.excerpt-toolbar {
  position: fixed;
  z-index: 45;
  display: flex;
  gap: 2px;
  max-width: calc(100vw - 16px);
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 28px #0003;
}
.excerpt-toolbar[hidden] {
  display: none;
}
.excerpt-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  font-size: 0.875rem;
  line-height: 1.6;
  border-radius: 7px;
}
.excerpt-toolbar .icon {
  width: 16px;
  height: 16px;
}
.excerpt-toolbar button[aria-pressed="true"],
.excerpt-attitude button[aria-pressed="true"] {
  background: var(--action);
  color: var(--action-text);
}
.excerpt-toolbar[aria-busy="true"] {
  cursor: progress;
}
::highlight(excerpt-agree) {
  background: #70b48735;
  text-decoration: underline #528f65;
}
::highlight(excerpt-disagree) {
  background: #e2887f35;
  text-decoration: underline #bf625b;
}
::highlight(excerpt-note) {
  background: #879ede35;
  text-decoration: underline #718cc8;
}
::highlight(excerpt-favorite) {
  background: #d7b65240;
  text-decoration: underline #b99936;
}
.annotation-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 10px;
}
.annotation-notes[hidden] {
  display: none;
}
.annotation-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 8px;
  color: var(--muted);
  background: var(--soft);
  font-size: 0.8125rem;
  line-height: 1.6;
}
.annotation-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.annotation-chip .icon {
  width: 14px;
  height: 14px;
  flex: none;
}
.excerpt-quote {
  margin: 0;
  padding: 14px 18px;
  border-left: 3px solid var(--focus);
  border-radius: 0 10px 10px 0;
  background: var(--soft);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: var(--body-size);
  line-height: var(--body-leading);
  max-height: 35vh;
  overflow-y: auto;
}
.excerpt-attitude,
.excerpt-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.excerpt-library-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.excerpt-library-tools label:first-child {
  flex: 1;
  min-width: min(100%, 240px);
}
.excerpt-library-tools select {
  max-width: 100%;
}
.excerpt-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.excerpt-meta strong {
  color: var(--ink);
  font-size: 1.125rem;
}
.excerpt-comment {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: var(--body-size);
  line-height: var(--body-leading);
}
.excerpt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}
.excerpt-tags span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.excerpt-tags .icon {
  width: 16px;
  height: 16px;
}
.excerpt-source-focus .bubble {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
@media (max-width: 520px) {
  .excerpt-toolbar {
    gap: 0;
    padding: 4px;
  }
  .excerpt-toolbar button {
    gap: 3px;
    padding: 7px 6px;
    font-size: 0.75rem;
  }
  .excerpt-toolbar .icon {
    width: 14px;
    height: 14px;
  }
  .excerpt-library-tools > label {
    width: 100%;
  }
}

/* Personal library: global rail, category sidebar, responsive card grid. */
.shell.library-shell {
  grid-template-columns: 80px 250px minmax(0, 1fr);
}
.library-sidebar .side-heading {
  min-height: 88px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.library-sidebar h2 {
  font-size: 1.25rem;
}
.library-categories {
  padding: 20px 14px;
  overflow-y: auto;
  min-height: 0;
}
.library-categories section + section {
  margin-top: 24px;
}
.library-categories h3 {
  margin: 0 0 6px;
}
.library-categories h3 button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 9px;
  text-align: left;
  font-size: var(--body-size);
  line-height: var(--body-leading);
}
.library-category {
  display: block;
  width: 100%;
  padding: 9px 12px 9px 40px;
  border-radius: 9px;
  text-align: left;
  color: var(--muted);
  font-size: var(--body-size);
  line-height: var(--body-leading);
}
.library-category:hover,
.library-categories h3 button:hover {
  background: var(--hover);
}
.library-category[aria-pressed="true"] {
  color: var(--ink);
  background: var(--soft);
  font-weight: 600;
}
button.library-close,
#library-toggle {
  display: none;
}
.library-page {
  max-width: none;
  padding: 28px 32px 40px;
}
.library-count {
  margin: 0 0 18px;
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  align-items: stretch;
  gap: 20px;
}
.library-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  transition:
    border-color 120ms,
    box-shadow 120ms;
}
.library-card:hover,
.library-card:focus-within {
  border-color: var(--focus);
  box-shadow: 0 4px 18px #00000008;
}
.library-card h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.library-card-type {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}
.library-card-type .icon {
  flex: none;
  width: 19px;
  height: 19px;
}
.library-card-type span {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.library-card-open {
  text-align: left;
  color: inherit;
  font: inherit;
}
.library-card-open::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
}
.library-card-open:focus-visible {
  outline: none;
}
.library-card-open:focus-visible::after {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.library-card-summary,
.library-card-comment {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: var(--body-size);
  line-height: var(--body-leading);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 3;
}
.library-card-summary {
  color: var(--muted);
  min-height: calc(var(--body-size) * var(--body-leading) * 3);
}
.library-card-comment {
  -webkit-line-clamp: 2;
}
.library-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}
.library-card-footer button {
  color: var(--ink);
}
.library-card .excerpt-tags {
  font-size: 0.875rem;
  line-height: 1.6;
  gap: 6px 12px;
}
.library-card .excerpt-card-actions {
  gap: 8px;
}
.excerpt-card-actions button {
  position: relative;
  z-index: 1;
  font-size: 0.875rem;
  padding: 6px 10px;
}
.library-empty {
  grid-column: 1 / -1;
}
@media (max-width: 1050px) and (min-width: 721px) {
  .shell.library-shell {
    grid-template-columns: 70px 220px minmax(0, 1fr);
  }
  .library-page {
    padding: 24px;
  }
}
@media (max-width: 720px) {
  .shell.library-shell {
    grid-template-columns: minmax(0, 1fr);
    position: relative;
  }
  .library-sidebar {
    display: none;
  }
  .library-nav-open .library-sidebar {
    display: flex;
    position: absolute;
    inset: 0 0 68px;
    z-index: 25;
    background: var(--subsurface);
  }
  button.library-close,
  #library-toggle {
    display: inline-flex;
  }
  .library-page {
    padding: 22px 18px;
  }
  .library-shell .topbar {
    height: auto;
    min-height: 92px;
    padding: 16px 18px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .library-shell .top-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .library-grid {
    gap: 16px;
  }
}

/* Document reading uses the user's requested 15px Song type, independently of chat. */
#modal:has(.document-detail) {
  padding: 0;
  width: min(820px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  height: min(780px, 85dvh);
  overflow: hidden;
}
#modal[open]:has(.document-detail) {
  display: flex;
  flex-direction: column;
}
#modal:has(.document-detail) .modal-head {
  flex: none;
  padding: 18px 24px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
#modal:has(.document-detail) .modal-head h2 {
  font-size: 1.25rem;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
#modal:has(.document-detail) .modal-body,
.document-detail {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  gap: 0;
}
.document-detail-scroll {
  overflow: auto;
  min-height: 0;
  flex: 1;
  padding: 24px 28px;
  overscroll-behavior: contain;
}
.document-preview {
  --body-size: 0.9375rem;
  --body-leading: 1.8;
  font-family: "Songti SC", "SimSun", "STSong", serif;
  font-size: 0.9375rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
#modal
  .document-preview
  :is(p, li, blockquote, td, th, h1, h2, h3, h4, h5, h6, pre, code) {
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.8;
}
.document-preview h1,
.document-preview h2 {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35em;
}
.document-detail-actions {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.document-detail-actions button {
  flex: none;
  width: auto;
  min-height: 36px;
  padding: 7px 12px;
  font-size: 0.875rem;
  line-height: 1.6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.document-detail-actions .document-download {
  background: var(--accent);
  color: var(--accent-ink);
}
.document-download .icon {
  width: 16px;
  height: 16px;
}
@media (max-width: 520px) {
  #modal:has(.document-detail) .modal-head {
    padding: 14px 16px;
  }
  .document-detail-scroll {
    padding: 20px 18px;
  }
  .document-detail-actions {
    padding: 10px 14px;
  }
  .document-detail-actions button {
    min-height: 44px;
  }
}

/* One login structure for every enterprise; brand color stays on the story panel. */
.login-generic .login-story,
.login-liezui .login-story {
  background: #111;
  color: #fff;
}
.login-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.login-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: var(--body-size);
}
.login-download:hover {
  background: var(--hover);
}
.login-download .icon {
  width: 20px;
  height: 20px;
}
.login-card .primary {
  border: 1px solid #fff3;
}
@media (max-width: 720px) {
  .login.login-split {
    display: grid;
  }
}

.login-methods {
  display: flex;
  gap: 8px;
  margin: 20px 0;
  padding: 5px;
  background: var(--soft);
  border-radius: 14px;
}
.login-methods button {
  flex: 1;
  min-height: 48px;
  border: 0;
  background: transparent;
  border-radius: 10px;
}
.login-methods button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 5px #0001;
}
@font-face {
  font-family: "Manrope Digits";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("./assets/fonts/manrope-digits-variable.woff2") format("woff2");
  unicode-range: U+0030-0039;
}
.sms-phone { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--subsurface); min-width: 0; }
.sms-phone > span { flex-shrink: 0; padding: 0 14px; border-right: 1px solid var(--line); font-size: 1.125rem; font-weight: 500; }
.sms-phone input { flex: 1; width: 0; min-width: 0; border: 0; outline: none; background: transparent; box-shadow: none; font-size: 1.25rem; font-weight: 600; padding: 14px; }
.sms-phone input:focus { outline: none; box-shadow: none; }
.sms-phone:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.sms-phone:has([aria-invalid="true"]) { border-color: var(--error); }
.sms-phone, .sms-code-boxes input { font-family: "Manrope Digits", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-variant-numeric: tabular-nums; }
#sms-login-form [data-send] { width: 100%; min-height: 48px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.sms-code-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; width: min(352px, 100%); }
.sms-code-boxes input { width: 100%; min-width: 0; aspect-ratio: 1; padding: 0; border: 1.5px solid var(--line); border-radius: 12px; background: var(--subsurface); text-align: center; font-size: 1.625rem; font-weight: 600; }
.sms-code-boxes input[aria-invalid="true"] { border-color: var(--error); }
#sms-login-form [hidden] { display: none; }
#sms-login-form[hidden],
#login-form[hidden] {
  display: none;
}
/* Shared file drafts use the same semantic colors as the conversation. */
.chat-files-draft { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-file-draft { display: flex; align-items: center; min-width: 0; max-width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 6px; }
.chat-file-draft > button:first-child { display: flex; align-items: center; gap: 8px; min-width: 0; text-align: left; }
.chat-file-draft span { overflow-wrap: anywhere; }
.chat-file-draft small { display: block; font-size: 1.125rem; line-height: 1.6; }
.chat-file-message { display: flex; align-items: center; gap: 8px; padding: 12px; margin-block: 6px; border: 1px solid var(--line); border-radius: 14px; overflow-wrap: anywhere; color: inherit; font-size: 1.125rem; line-height: 1.6; }
.chat-file-message img { max-width: min(220px, 45vw); max-height: 220px; object-fit: contain; border-radius: 10px; }
.chat-file-message small { display: block; font-size: 1.125rem; line-height: 1.6; }

/* Persistent Agent library, shared by browser and desktop. */

/* Official local provider marks retain their source colors in both themes. */
.provider-icon { width:32px; height:32px; object-fit:contain; flex:0 0 32px; border-radius:6px; background:#fff; padding:3px; }
.provider-title, .connection-card-heading h4 { display:flex; align-items:center; gap:12px; }

/* Personal information: readable hierarchy and one clear save action. */
#modal:has(.profile-summary) { width: min(560px, calc(100vw - 24px)); }
.profile-summary { display: block; padding: 4px 2px 12px; }
.profile-identity { display: flex; align-items: center; gap: 24px; padding: 14px 0 20px; }
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-summary .profile-avatar { width: 96px; height: 96px; border: 1px solid var(--line); border-radius: 26px; background: var(--soft); color: var(--ink); font-size: 2.5rem; overflow: hidden; }
.profile-avatar-hint { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid var(--surface); border-radius: 10px; background: var(--accent); color: var(--accent-ink); pointer-events: none; }
.profile-avatar-hint svg { width: 17px; height: 17px; }
.profile-identity-copy { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; min-width: 0; }
.profile-identity-copy h3 { flex-basis: 100%; margin: 0; font-size: 1.5rem; overflow-wrap: anywhere; }
.profile-identity-copy .secondary { min-height: 40px; }
.profile-summary > .meta { margin: 0; }
.profile-summary > [role=status]:empty { display: none; }
.profile-details { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 24px; }
#profile-name-form { display: grid; gap: 10px; width: 100%; }
#profile-name-form label { font-weight: 600; }
#profile-name { width: 100%; min-height: 52px; border: 1px solid var(--line); border-radius: 12px; background: var(--subsurface); color: var(--ink); padding: 12px 16px; font: inherit; }
#profile-name[aria-invalid=true] { border-color: var(--danger, #bc4545); }
#profile-name-status { margin: 0; font-size: var(--body-size); line-height: 1.6; }
#profile-name-status:empty { display: none; }
.profile-save-row { display: flex; justify-content: flex-end; margin-top: 8px; }
.profile-save-row .primary { min-height: 48px; padding: 10px 22px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; }
.profile-enterprise { margin-top: 26px; display: grid; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--subsurface); }
.profile-enterprise strong { font-weight: 500; overflow-wrap: anywhere; }
.composer { position: relative; }
.composer.file-drag-over { outline: 2px solid var(--accent); outline-offset: 3px; background: var(--soft); }
.composer.file-drag-over::after { content: "松开以添加附件"; position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; background: var(--surface); color: var(--ink); opacity: .95; pointer-events: none; z-index: 5; font-size: var(--body-size); }

/* Connection sharing uses the same contact role cards and device font scale. */
.connection-sharing fieldset{border:1px solid var(--line);border-radius:14px;padding:18px;min-width:0}
.connection-sharing legend{font-weight:650;padding:0 6px}
.connection-sharing select{width:100%;min-height:48px;border:1px solid var(--line);border-radius:12px;padding:10px 14px;background:var(--surface);color:var(--ink);font:inherit}
.connection-sharing .pw-check{display:flex;align-items:flex-start;gap:12px;margin:12px 0}
.connection-sharing .pw-check input{flex:0 0 auto;width:20px;height:20px;margin-top:5px}
.connection-sharing .authorization-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.connection-sharing .authorization-cards .person{width:100%;min-width:0}
.connection-sharing .field-error{color:var(--danger,#c43c3c);margin:4px 0;min-height:0}
.connection-sharing [aria-invalid=true]{outline:2px solid var(--danger,#c43c3c);outline-offset:2px}
.sharing-submit{position:sticky;bottom:0;display:flex;flex-wrap:wrap;gap:12px;align-items:center;background:var(--surface);padding:14px 0;z-index:2}
.sharing-grants [data-share-detail]{overflow-wrap:anywhere}
@media(max-width:600px){.connection-sharing .authorization-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.connection-sharing fieldset{padding:12px}}
#modal:has(.connection-sharing){width:1000px;max-width:calc(100vw - 32px)}
.connection-sharing .pw-check{flex-direction:row;min-height:44px;margin:0;padding:8px 0}
.connection-sharing .sharing-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 20px}
.connection-sharing .sharing-tools>[data-share-all],.connection-sharing .sharing-tools>.field-error{grid-column:1/-1;justify-self:start}
@media(max-width:600px){.connection-sharing .sharing-tools{grid-template-columns:minmax(0,1fr)}}

.friend-relation {display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 0;border-bottom:1px solid var(--line)}
.friend-relation p {white-space:pre-wrap;overflow-wrap:anywhere;margin:0}
