:root {
  color-scheme: light;
  --figma-bg-base: #f6f7fb;
  --figma-container: #ffffff;
  --figma-font-1: #111216;
  --figma-font-2: #65666a;
  --figma-font-3: #8e8f93;
  --figma-font-4: #c7c8cc;
  --figma-primary: #226df5;
  --figma-button-primary: #303847;
  --figma-error: #ff4d4f;
  --figma-warning: #faad14;
  --figma-border-1: #c9cdd4;
  --figma-border-2: #e5e6eb;
  --figma-border-3: #f2f3f5;
  --figma-fill-bg: rgba(12, 24, 49, 0.1);
  --figma-fill-focus: rgba(34, 109, 245, 0.08);
  --figma-radius-xs: 3px;
  --figma-radius-s: 6px;
  --figma-radius-m: 8px;
  --figma-radius-l: 12px;
  --figma-radius-circle: 100px;
  --figma-shadow-3: 0 6px 30px rgba(39, 46, 59, 0.16);
  --figma-window-width: 880px;
  --figma-window-height: 560px;
  --figma-sidebar-width: 280px;
  --figma-content-width: 600px;
  --figma-shell-scale: 1;
  --figma-control-height: 36px;
  --figma-control-height-compact: 32px;
  --figma-text-body: 14px;
  --figma-text-label: 13px;
  --figma-text-meta: 12px;
  --figma-radius-control: var(--figma-radius-m);
  --figma-radius-surface: var(--figma-radius-l);
  --figma-shadow-control: 0 1px 3px rgba(39, 46, 59, 0.12);
  --figma-shadow-float: var(--figma-shadow-3);
  --figma-resource-surface: var(--figma-container);
  --figma-resource-border: var(--figma-border-2);
  --figma-primary-hover: #1d5fd6;
  --figma-button-text: #ffffff;
  --figma-primary-soft: var(--figma-fill-focus);
  --figma-bg: var(--figma-bg-base);
  --figma-surface: var(--figma-container);
  --figma-sidebar: var(--figma-container);
  --figma-surface-elevated: var(--figma-container);
  --figma-surface-hover: var(--figma-bg-base);
  --figma-selected-surface: var(--figma-fill-focus);
  --figma-message-incoming: var(--figma-bg-base);
  --figma-message-outgoing: #e8f4ff;
  --figma-composer-surface: var(--figma-container);
  --figma-control-surface: var(--figma-container);
  --figma-disabled-surface: var(--figma-border-3);
  --figma-text-muted: var(--figma-font-4);
  --figma-fill-2: rgba(12, 24, 49, 0.02);
  --figma-fill-3: rgba(12, 24, 49, 0.04);
  --figma-fill-4: rgba(12, 24, 49, 0.08);
  --figma-text-1: var(--figma-font-1);
  --figma-text-2: var(--figma-font-2);
  --figma-text-3: var(--figma-font-3);
  --figma-text-elevated-muted: var(--figma-font-2);
  --figma-text-4: var(--figma-font-4);
  --figma-success: #20c77a;
  --figma-info-bg: #e8f4ff;
  --figma-info-border: rgba(34, 109, 245, 0.2);
  --figma-warning-bg: rgba(250, 173, 20, 0.08);
  --figma-warning-border: rgba(250, 173, 20, 0.24);
  --figma-danger-bg: rgba(255, 77, 79, 0.08);
  --figma-danger-border: rgba(255, 77, 79, 0.24);
  --figma-danger-text: var(--figma-error);
  --figma-border: var(--figma-border-2);
  --canvas: #f6f7fb;
  --bg: var(--figma-bg);
  --surface-1: var(--figma-surface);
  --surface-2: var(--figma-surface);
  --surface-3: var(--figma-surface-elevated);
  --surface-4: var(--figma-surface-hover);
  --hover: var(--figma-fill-3);
  --selected: var(--figma-selected-surface);
  --border: var(--figma-border-2);
  --border-soft: var(--figma-border-3);
  --text: var(--figma-text-1);
  --text-soft: var(--figma-text-2);
  --muted: var(--figma-text-3);
  --muted-2: var(--figma-text-3);
  --blue: var(--figma-primary);
  --blue-hover: var(--figma-primary-hover);
  --blue-soft: var(--figma-primary-soft);
  --accent: var(--figma-primary-hover);
  --accent-bright: var(--figma-primary-hover);
  --accent-soft: var(--figma-primary-soft);
  --success: var(--figma-success);
  --success-soft: rgba(32, 199, 122, 0.08);
  --warning: var(--figma-warning);
  --warning-soft: var(--figma-warning-bg);
  --danger: var(--figma-error);
  --danger-soft: var(--figma-danger-bg);
  --focus: var(--figma-primary);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: var(--figma-text-label);
}

/* Floating surfaces keep metadata legible at the 12px Figma type step. */
.scenario-console,
.app-dialog,
.drawer,
.invite-method-menu,
.member-action-menu,
.message-context-menu,
.resource-record,
.desktop-notification,
.tray-recent-messages,
.toast {
  --figma-text-3: var(--figma-text-elevated-muted);
  --figma-text-4: var(--figma-text-elevated-muted);
  --muted: var(--figma-text-elevated-muted);
  --muted-2: var(--figma-text-elevated-muted);
}

html,
body {
  min-width: 0;
  min-height: 0;
  background: var(--figma-bg);
  color: var(--figma-text-1);
}

body {
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
  font-size: var(--figma-text-body);
}

button,
input,
textarea,
select {
  color: var(--figma-text-1);
  font-family: inherit;
  letter-spacing: 0;
}

.ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

button:focus-visible,
a[href]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="menuitem"]:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 2px solid var(--figma-primary) !important;
  outline-offset: 2px;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  border: 0;
  border-radius: 100px;
  background: var(--figma-surface-hover);
}

::selection {
  background: var(--figma-fill-focus);
  color: var(--figma-text-1);
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: 280px 600px;
  grid-template-rows: 560px;
  width: 880px;
  height: 560px;
  overflow: visible;
  border: 1px solid var(--figma-border-2);
  border-radius: var(--figma-radius-surface);
  background: var(--figma-surface);
  box-shadow: var(--figma-shadow-float);
  transform: translateX(var(--figma-shell-shift, 0px)) scale(var(--figma-shell-scale));
  transform-origin: center;
}

.app-shell:has(.scenario-console.is-open) {
  --figma-shell-shift: -164px;
}

.conversation-pane {
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
  width: 280px;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--figma-border-2);
  border-radius: 12px 0 0 12px;
  background: var(--figma-sidebar);
}

.entry-tabs {
  display: flex;
  align-items: stretch;
  gap: 20px;
  min-height: 48px;
  padding: 0 18px;
  border-bottom: 1px solid var(--figma-border-2);
  background: var(--figma-sidebar);
}

.entry-tab {
  position: relative;
  min-height: var(--figma-control-height);
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--figma-text-2);
  font-size: var(--figma-text-label);
  line-height: 20px;
}

.entry-tab:hover,
.entry-tab.is-active,
.entry-tab[aria-selected="true"] {
  color: var(--figma-primary-hover);
  font-weight: 600;
}

.entry-tab.is-active::after,
.entry-tab[aria-selected="true"]::after {
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--figma-primary);
}

.entry-badge {
  min-width: 22px;
  height: 14px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--figma-error);
  font-size: var(--figma-text-meta);
  line-height: 14px;
}

.entry-add {
  width: var(--figma-control-height-compact);
  height: var(--figma-control-height-compact);
  align-self: center;
  margin: 0 -6px 0 auto;
  color: var(--figma-text-1);
  font-size: 22px;
}

.icon-button:hover:not(:disabled) {
  background: var(--figma-fill-3);
  color: var(--figma-text-1);
}

.sidebar-section {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}

.sidebar-content {
  min-height: 0;
  padding: 8px 8px 16px;
  overflow-y: auto;
}

.sidebar-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid var(--figma-border-2);
  background: var(--figma-sidebar);
}

.sidebar-footer > .icon-button {
  display: none;
}

.sidebar-footer .sidebar-search,
.sidebar-footer .sidebar-search input {
  width: 100%;
}

.contact-category-tabs {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  height: 48px;
  padding: 0 10px;
  border-bottom: 1px solid var(--figma-border-2);
  background: var(--figma-sidebar);
}

.contact-category-tabs button {
  position: relative;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--figma-text-3);
  font-size: 12px;
}

.contact-category-tabs button.is-active,
.contact-category-tabs button[aria-selected="true"] {
  background: transparent;
  color: var(--figma-primary-hover);
}

.contact-category-tabs button.is-active::after,
.contact-category-tabs button[aria-selected="true"]::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--figma-primary);
  content: "";
}

.contact-list {
  padding: 8px 0 16px;
}

.contact-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.contact-row:hover,
.contact-row.is-active {
  background: var(--figma-fill-3);
}

.contact-row strong {
  display: block;
  color: var(--figma-text-1);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.contact-row small {
  display: block;
  margin-top: 4px;
  color: var(--figma-text-3);
  font-size: 12px;
  line-height: 16px;
}

.contact-row em {
  margin-left: 6px;
  color: var(--figma-warning);
  font-size: var(--figma-text-meta);
  font-style: normal;
}

.conversation-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.conversation-row:hover,
.conversation-row:focus-visible {
  background: var(--figma-fill-3);
}

.conversation-row.is-active,
.conversation-row[aria-current="true"] {
  background: var(--figma-selected-surface);
}

.conversation-row.is-active .conversation-copy strong,
.conversation-row[aria-current="true"] .conversation-copy strong {
  font-weight: 600;
}

.conversation-row:active:not(.is-active) {
  background: var(--figma-fill-4);
}

.group-avatar,
.conversation-row .group-avatar,
.conversation-row .avatar {
  width: 36px;
  height: 36px;
  border: 1px solid var(--figma-border-2);
  color: #fff;
}

.conversation-copy {
  min-width: 0;
}

.conversation-copy strong {
  display: block;
  overflow: hidden;
  color: var(--figma-text-1);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-copy small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--figma-text-2);
  font-size: 12px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-meta {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  color: var(--figma-text-3);
  font-size: var(--figma-text-meta);
  line-height: 16px;
}

.conversation-meta b {
  display: grid;
  min-width: 16px;
  height: 16px;
  place-items: center;
  padding: 0 4px;
  border-radius: 10px;
  background: var(--figma-error);
  color: white;
  font-size: var(--figma-text-meta);
  font-weight: 400;
}

.mention-mark {
  color: var(--figma-error);
}

.workspace {
  position: relative;
  width: 600px;
  min-width: 0;
  height: 560px;
  overflow: hidden;
  border-radius: 0 12px 12px 0;
  background: var(--figma-composer-surface);
}

.group-chat {
  display: grid;
  grid-template-areas:
    "header"
    "announcement"
    "notices"
    "messages"
    "typing"
    "composer";
  grid-template-rows: 88px auto auto minmax(0, 1fr) auto 136px;
  width: 600px;
  height: 560px;
  background: var(--figma-composer-surface);
}

.group-chat:has(.composer.has-reply) {
  grid-template-rows: 88px auto auto minmax(0, 1fr) auto 176px;
}

.chat-header {
  position: relative;
  grid-area: header;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  min-height: 88px;
  padding: 0 12px 12px 20px;
  border-bottom: 1px solid var(--figma-border-3);
  background: var(--figma-surface);
}

.chat-header::before {
  position: absolute;
  top: 12px;
  right: 14px;
  color: var(--figma-text-1);
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 12px;
  content: "";
}

.group-heading {
  min-width: 0;
  margin-right: auto;
}

.heading-line h1 {
  max-width: 300px;
  margin: 0;
  overflow: hidden;
  color: var(--figma-text-1);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-heading p,
.role-chip {
  display: none;
}

.chat-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-action,
.header-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 50px;
  height: var(--figma-control-height);
  padding: 0 8px;
  border: 0;
  border-radius: var(--figma-radius-control);
  background: transparent;
  color: var(--figma-text-1);
  font-size: 13px;
  line-height: 20px;
}

.header-more {
  min-width: var(--figma-control-height);
  width: var(--figma-control-height);
  padding: 0;
}

.invite-method-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 36px;
  z-index: 60;
  display: grid;
  width: 204px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid var(--figma-border-2);
  border-radius: 12px;
  background: var(--figma-surface-elevated);
  box-shadow: var(--figma-shadow-3);
}

.invite-method-menu > button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--figma-text-1);
  font-size: 14px;
  line-height: 20px;
  text-align: left;
}

.invite-method-menu > button:hover,
.invite-method-menu > button:focus-visible {
  background: var(--figma-primary-soft);
}

.invite-method-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
}

.invite-method-icon.is-qr {
  background: #f2b941;
}

.invite-method-icon.is-code {
  background: #7d6df2;
}

.invite-method-icon.is-link {
  background: #35bec6;
}

.invite-method-icon.is-contacts {
  background: #3f80ec;
}

.announcement-strip {
  grid-area: announcement;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px 6px 16px;
  border: 0;
  background: var(--figma-info-bg);
  color: var(--figma-text-1);
}

.announcement-icon {
  width: 20px;
  height: 20px;
  margin-right: 4px;
  overflow: hidden;
  color: var(--figma-warning);
  font-size: 0;
}

.announcement-icon::before {
  font-size: 16px;
  content: "◆";
}

.announcement-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  gap: 4px;
  font-size: 13px;
  line-height: 20px;
}

.announcement-copy strong {
  font-weight: 400;
}

.announcement-copy > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-state,
.announcement-strip .chevron {
  display: none;
}

.chat-notice-region {
  grid-area: notices;
  position: relative;
  z-index: 3;
}

.locator-bar,
.inline-notice {
  margin: 8px 20px 0;
  border-radius: 6px;
  font-size: 12px;
}

.message-list {
  grid-area: messages;
  min-height: 0;
  margin: 0;
  padding: 20px;
  overflow-y: auto;
  background: var(--figma-composer-surface);
}

.message-list .message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 80px 20px 0;
}

.message-list .message.is-self {
  flex-direction: row-reverse;
  margin: 0 0 20px 80px;
}

.message-list .message.is-resource {
  margin: 0 28px 24px 0;
}

.message:not(.is-resource) .message-body > p {
  color: var(--figma-text-2);
}

.message.is-self:not(.is-resource) .message-body > p {
  color: var(--figma-text-1);
}

.message .avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid var(--figma-border-2);
  border-radius: 50%;
}

.message-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.message.is-self .message-body {
  align-items: flex-end;
}

.message-body header {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--figma-text-3);
  font-size: 13px;
  line-height: 20px;
}

.message-body header strong {
  font-weight: 400;
}

.message-body header time {
  display: inline;
  color: var(--figma-text-3);
  font-size: 12px;
  line-height: 20px;
}

.message.is-self .message-body header {
  justify-content: flex-end;
}

.message-body > p,
.message-body > .file-message {
  max-width: 400px;
  margin: 0;
  padding: 12px;
  border-radius: var(--figma-radius-control);
  background: var(--figma-message-incoming);
  color: var(--figma-text-1);
  font-size: 14px;
  line-height: 20px;
}

.message-body > .resource-record {
  margin: 0;
}

.resource-record {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 6px 12px;
  width: min(452px, 100%);
  padding: 14px;
  border: 1px solid var(--figma-border-2);
  border-radius: var(--figma-radius-control);
  background: var(--figma-surface-elevated);
}

.resource-record__type {
  grid-row: 1 / span 2;
  display: grid;
  width: 40px;
  height: 48px;
  place-items: center;
  border-radius: 6px;
  background: var(--figma-primary-soft);
  color: var(--figma-primary-hover);
  font-size: var(--figma-text-meta);
  font-weight: 600;
}

.resource-record__copy,
.resource-record__actions {
  min-width: 0;
}

.resource-record__copy strong {
  color: var(--figma-text-1);
  font-size: 14px;
  line-height: 20px;
}

.resource-record__meta,
.resource-record__state {
  color: var(--figma-text-3);
  font-size: var(--figma-text-meta);
}

.resource-record__state {
  width: fit-content;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--figma-primary-soft);
  color: var(--figma-primary-hover);
  font-weight: 600;
}

.resource-record__actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.resource-record__actions button {
  height: var(--figma-control-height-compact);
}

.resource-record__actions .resource-primary-action {
  border-color: var(--figma-button-primary);
  background: var(--figma-button-primary);
  color: var(--figma-button-text);
}

.resource-record__actions .resource-primary-action:hover {
  background: var(--figma-button-primary);
  filter: brightness(0.94);
}

.resource-record__actions .icon-button {
  width: var(--figma-control-height-compact);
  border-color: var(--figma-resource-border);
  background: var(--figma-surface);
  color: var(--figma-text-2);
}

.resource-record.is-unavailable {
  background: var(--figma-fill-3);
}

.resource-record.is-unavailable .resource-record__state {
  color: var(--figma-danger-text);
}

.message-body > .file-message {
  border: 1px solid var(--figma-resource-border);
  background: var(--figma-resource-surface);
}

.message.is-self .message-body > p,
.message.is-self .message-body > .file-message,
.message.is-self .message-body > .resource-record {
  background: var(--figma-message-outgoing);
  color: var(--figma-text-1);
}

.message-body mark {
  background: transparent;
  color: var(--figma-primary);
}

.system-message {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 0 20px;
  color: var(--figma-text-3);
  font-size: var(--figma-text-meta);
  line-height: 16px;
}

.figma-message--system > span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--figma-radius-circle);
  background: var(--figma-fill-3);
}

.figma-message--system-membership > span::before {
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--figma-primary);
  content: "";
}

.figma-message--system-danger > span {
  color: var(--figma-error);
  background: var(--figma-danger-bg);
}

.receipt,
.reply-link,
.message-secondary-action {
  color: var(--figma-text-3);
  font-size: var(--figma-text-meta);
}

.typing-indicator {
  grid-area: typing;
}

.composer {
  position: relative;
  grid-area: composer;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 136px;
  margin: 0;
  padding: 20px;
  border-top: 0;
  background: var(--figma-composer-surface);
}

.composer::before {
  position: absolute;
  inset: 20px;
  z-index: 0;
  border: 1px solid var(--figma-border-3);
  border-radius: 4px;
  pointer-events: none;
  content: "";
}

.composer textarea {
  position: relative;
  z-index: 1;
  grid-row: 1;
  width: 100%;
  min-height: 42px;
  padding: 12px 16px 0;
  resize: none;
  border: 0;
  background: transparent;
  color: var(--figma-text-1);
  font-size: 14px;
  line-height: 20px;
}

.composer-tools {
  position: relative;
  z-index: 1;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding-left: 8px;
}

.composer-tools .icon-button {
  width: 32px;
  height: 32px;
  color: var(--figma-text-1);
}

.composer-footer {
  position: absolute;
  right: 32px;
  bottom: 32px;
  z-index: 2;
}

.composer.has-reply {
  grid-template-rows: 34px minmax(0, 1fr) 32px;
  min-height: 176px;
}

.composer.has-reply .reply-preview {
  position: relative;
  z-index: 1;
  grid-row: 1;
  display: flex;
  min-width: 0;
  min-height: 34px;
  margin: 0;
  padding: 0 10px;
  overflow: hidden;
  border: 0;
  background: var(--figma-fill-3);
}

.composer.has-reply .reply-preview > span {
  display: flex;
  min-width: 0;
  align-items: center;
}

.composer.has-reply .reply-preview strong {
  flex: 0 0 auto;
  font-size: 12px;
}

.composer.has-reply .reply-preview small {
  min-width: 0;
  overflow: hidden;
  color: var(--figma-text-3);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer.has-reply textarea {
  grid-row: 2;
  min-height: 0;
  padding: 8px 16px 0;
}

.composer.has-reply .composer-tools {
  grid-row: 3;
}

.composer.has-reply .composer-footer {
  bottom: 20px;
}

.composer.has-reply .send-button {
  min-height: 32px;
}

#composer-hint {
  display: none;
}

.primary-button,
.send-button {
  min-width: 68px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--figma-button-primary);
  color: var(--figma-button-text);
  font-size: 13px;
  font-weight: 500;
}

.send-button,
.private-composer > .primary-button {
  background: var(--figma-primary);
}

.send-button:hover:not(:disabled),
.private-composer > .primary-button:hover:not(:disabled) {
  background: var(--figma-primary-hover);
  filter: none;
}

.primary-button:hover:not(:disabled),
.send-button:hover:not(:disabled) {
  background: var(--figma-button-primary);
  filter: brightness(0.94);
}

.muted-composer {
  grid-area: composer;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  border-top: 0;
  color: var(--figma-text-2);
  font-size: 12px;
}

.muted-composer .mute-icon,
.muted-composer strong {
  display: none;
}

.muted-composer span:last-child::before {
  content: "—— ";
}

.muted-composer span:last-child::after {
  content: " ——";
}

.muted-composer:not([hidden]) {
  display: flex;
  height: 72px;
  min-height: 72px;
  border-top: 1px solid var(--figma-border-3);
  background: var(--figma-surface);
}

.muted-composer > div {
  display: block;
}

.muted-composer > div > span {
  color: var(--figma-font-4);
  line-height: 20px;
}

.announcement-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: url("./assets/figma-announcement.png") center / 18px 18px no-repeat;
}

.figma-notice-bar__close {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: url("./assets/figma-close.png") center / 24px 24px no-repeat;
}

.scenario-console {
  position: absolute;
  top: 0;
  left: calc(100% + 16px);
  z-index: 50;
  width: 312px;
  height: 560px;
  border: 1px solid var(--figma-border-2);
  border-radius: 8px;
  background: var(--figma-surface-elevated);
  color: var(--figma-text-1);
  box-shadow: var(--figma-shadow-3);
}

.scenario-console.is-open {
  width: 312px;
}

.scenario-console:not(.is-open) {
  width: 44px;
  height: 152px;
  top: 204px;
  border-radius: 8px;
}

.scenario-handle {
  display: grid;
  width: 44px;
  height: 100%;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--figma-surface);
  color: var(--figma-text-2);
  font-size: var(--figma-text-meta);
  letter-spacing: 2px;
  writing-mode: vertical-rl;
}

.scenario-panel {
  width: 312px;
  height: 560px;
  overflow-y: auto;
  border: 0;
  border-radius: 8px;
  background: var(--figma-surface);
  color: var(--figma-text-1);
}

.scenario-header {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 54px;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--figma-border-3);
  background: var(--figma-surface);
}

.scenario-header strong {
  color: var(--figma-text-1);
  font-size: 15px;
  font-weight: 600;
}

.scenario-header span {
  color: var(--figma-text-3);
  font-size: var(--figma-text-meta);
}

.scenario-header .icon-button {
  width: var(--figma-control-height-compact);
  height: var(--figma-control-height-compact);
  border: 0;
  background: transparent;
  color: var(--figma-text-2);
  font-size: 18px;
  font-weight: 300;
}

.scenario-panel > .scenario-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 64px;
  margin: 12px 12px 0;
  padding: 10px 0;
  border: 1px solid var(--figma-border-3);
  border-radius: 6px;
  background: var(--figma-fill-2);
}

.scenario-panel > .scenario-summary > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 0 10px;
}

.scenario-panel > .scenario-summary > div + div {
  border-left: 1px solid var(--figma-border-2);
}

.scenario-summary span {
  color: var(--figma-text-3);
  font-size: var(--figma-text-meta);
}

.scenario-summary strong {
  color: var(--figma-text-1);
  font-size: 12px;
  font-weight: 600;
}

.scenario-role {
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 44px;
  margin: 8px 12px 0;
  color: var(--figma-text-3);
  font-size: var(--figma-text-meta);
}

.scenario-role select {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--figma-border-2);
  border-radius: 5px;
  background: var(--figma-surface);
  color: var(--figma-text-1);
  font-size: var(--figma-text-meta);
}

.scenario-browser {
  gap: 8px;
  padding: 8px 12px 0;
}

.scenario-mode {
  gap: 2px;
  padding: 3px;
  border: 0;
  border-radius: 6px;
  background: var(--figma-fill-3);
}

.scenario-mode button {
  min-height: var(--figma-control-height-compact);
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--figma-text-3);
  font-size: var(--figma-text-meta);
}

.scenario-mode button.is-active {
  background: var(--figma-surface);
  color: var(--figma-primary);
  box-shadow: var(--figma-shadow-control);
}

.scenario-search input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--figma-border-2);
  border-radius: 5px;
  outline: 0;
  background: var(--figma-surface);
  color: var(--figma-text-1);
  font-size: var(--figma-text-meta);
}

.scenario-search input:focus {
  border-color: var(--figma-primary);
  background: var(--figma-surface);
}

.workflow-progress,
.scenario-groups,
.scenario-log {
  margin: 12px 12px 0;
}

.workflow-progress h3,
.scenario-log h3 {
  margin: 0 0 8px;
  color: var(--figma-text-2);
  font-size: var(--figma-text-meta);
  font-weight: 600;
}

.workflow-progress > header span {
  color: var(--figma-text-3);
  font-size: var(--figma-text-meta);
}

.workflow-progress ol {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.workflow-progress li {
  min-height: 34px;
  border: 1px solid var(--figma-border-3);
  border-radius: 5px;
  background: var(--figma-surface);
  color: var(--figma-text-2);
  font-size: var(--figma-text-meta);
}

.workflow-progress li > button {
  min-height: 32px;
  gap: 5px;
  padding: 4px 6px;
}

.workflow-progress li > button:hover {
  background: var(--figma-fill-3);
  color: var(--figma-text-1);
}

.workflow-progress li > button > span {
  width: 17px;
  height: 17px;
  background: var(--figma-fill-4);
  color: var(--figma-text-2);
  font-size: var(--figma-text-meta);
}

.workflow-progress li.is-done {
  border-color: rgba(32, 199, 122, 0.22);
  background: rgba(32, 199, 122, 0.08);
  color: #168f59;
}

.workflow-progress li.is-done > button > span {
  background: var(--figma-success);
  color: white;
}

.workflow-progress > button {
  min-height: var(--figma-control-height-compact);
  margin-top: 6px;
  border: 0;
  background: transparent;
  color: var(--figma-text-3);
  font-size: var(--figma-text-meta);
}

.workflow-progress > button:hover {
  background: var(--figma-fill-3);
  color: var(--figma-primary);
}

.scenario-groups {
  display: block;
  border-top: 1px solid var(--figma-border-3);
}

.scenario-groups > section {
  display: block;
  border-bottom: 1px solid var(--figma-border-3);
}

.scenario-category-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--figma-text-2);
  font-size: var(--figma-text-meta);
  text-align: left;
}

.scenario-category-toggle:hover {
  background: var(--figma-fill-2);
  color: var(--figma-text-1);
}

.scenario-category-toggle b,
.scenario-category-toggle i {
  color: var(--figma-text-3);
  font-size: var(--figma-text-meta);
}

.scenario-category-items {
  display: grid;
  gap: 5px;
  padding: 0 0 10px;
}

.scenario-category-items > button {
  display: grid;
  width: 100%;
  min-height: 50px;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--figma-border-3);
  border-radius: 6px;
  background: var(--figma-surface);
  color: var(--figma-text-2);
  text-align: left;
}

.scenario-category-items > button:hover {
  border-color: var(--figma-border-2);
  background: var(--figma-fill-2);
}

.scenario-category-items > button.is-active {
  border-color: var(--figma-primary);
  background: var(--figma-primary-soft);
}

.scenario-category-items strong,
.scenario-category-items span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scenario-category-items strong {
  color: var(--figma-text-1);
  font-size: var(--figma-text-meta);
  font-weight: 600;
}

.scenario-category-items span {
  color: var(--figma-text-3);
  font-size: var(--figma-text-meta);
}

.scenario-run {
  width: calc(100% - 24px);
  min-height: 34px;
  margin: 12px 12px 0;
  border: 0;
  border-radius: 5px;
  background: var(--figma-button-primary);
  color: var(--figma-button-text);
  font-size: var(--figma-text-meta);
}

.scenario-log ol,
.scenario-log > p {
  border: 0;
  background: var(--figma-fill-2);
}

.scenario-log ol {
  max-height: 84px;
}

.scenario-log li,
.scenario-log time,
.scenario-log > p {
  color: var(--figma-text-3);
}

.scenario-panel > footer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  min-height: 58px;
  margin-top: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--figma-border-3);
  background: var(--figma-surface);
}

.scenario-panel > footer button {
  min-height: 34px;
  border: 1px solid var(--figma-border-2);
  border-radius: 5px;
  background: var(--figma-surface);
  color: var(--figma-text-2);
  font-size: var(--figma-text-meta);
}

.scenario-panel > footer button:last-child {
  border-color: var(--figma-button-primary);
  background: var(--figma-button-primary);
  color: var(--figma-button-text);
}

.drawer-backdrop {
  position: fixed;
  z-index: 180;
  background: rgba(0, 0, 0, 0.64);
}

.drawer {
  position: fixed;
  top: 50%;
  right: 50%;
  z-index: 190;
  width: 480px;
  max-height: 520px;
  border: 1px solid var(--figma-border-2);
  border-radius: 12px;
  background: var(--figma-surface-elevated);
  color: var(--figma-text-1);
  box-shadow: var(--figma-shadow-3);
  transform: translate(50%, -50%);
}

.drawer.drawer-wide {
  width: 720px;
}

.drawer.workspace-surface {
  position: absolute;
  inset: 0;
  z-index: 30;
  width: 600px;
  max-height: none;
  height: 560px;
  overflow: hidden;
  border: 0;
  border-radius: 0 12px 12px 0;
  box-shadow: none;
  transform: none;
}

.workspace-surface .drawer-header {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 8px;
  min-height: 64px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--figma-border-3);
}

.workspace-surface .drawer-header > div p {
  display: none;
}

.workspace-surface .drawer-header .icon-button {
  width: var(--figma-control-height-compact);
  height: var(--figma-control-height-compact);
  color: var(--figma-text-1);
}

.workspace-surface .drawer-scroll,
.workspace-surface .file-list {
  min-height: 0;
  overflow-y: auto;
}

.workspace-surface .settings-section {
  margin: 0;
  padding: 16px 20px;
  border-bottom: 8px solid var(--figma-border-3);
  background: var(--figma-surface);
}

.workspace-surface .settings-section > h3,
.workspace-surface .section-title-row h3 {
  color: var(--figma-text-3);
  font-size: 13px;
  font-weight: 400;
}

.workspace-surface .settings-link,
.workspace-surface .switch-row {
  min-height: 60px;
  padding-block: 8px;
  border-bottom: 1px solid var(--figma-border-3);
  background: var(--figma-surface);
}

.workspace-surface .settings-link > span:first-child,
.workspace-surface .switch-row > span:first-child {
  min-height: 44px;
  align-content: center;
}

.workspace-surface .settings-link > span:last-child {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
}

.workspace-surface .settings-link strong,
.workspace-surface .switch-row strong {
  color: var(--figma-text-1);
  font-size: 14px;
  font-weight: 400;
}

.workspace-surface .settings-link small,
.workspace-surface .switch-row small {
  color: var(--figma-text-3);
  font-size: 12px;
}

.workspace-surface .member-grid {
  display: block;
}

.workspace-surface .member-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  border-bottom: 1px solid var(--figma-border-3);
}

.workspace-surface .member-row .avatar {
  width: 36px;
  height: 36px;
}

.workspace-surface .member-row strong {
  display: block;
  color: var(--figma-text-1);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.workspace-surface .member-row small {
  display: block;
  color: var(--figma-text-3);
  font-size: 12px;
  line-height: 16px;
}

.workspace-surface .member-actions {
  display: flex;
  gap: 12px;
}

.workspace-surface .member-actions button,
.workspace-surface .settings-section button:not(.primary-button) {
  min-height: var(--figma-control-height-compact);
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--figma-primary);
  font-size: 12px;
}

.workspace-surface .member-actions .danger-text,
.workspace-surface .danger-zone button {
  color: var(--figma-error);
}

.member-management-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px auto;
  align-items: center;
  gap: 8px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--figma-border-3);
}

.member-management-search {
  position: relative;
  min-width: 0;
}

.member-management-search .search-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 10px;
  translate: 0 -50%;
}

.workspace-surface .member-management-search input,
.workspace-surface .member-management-toolbar select {
  width: 100%;
  height: var(--figma-control-height-compact);
  border: 1px solid var(--figma-border-1);
  border-radius: 6px;
  background: var(--figma-surface);
  color: var(--figma-text-1);
  font-size: 12px;
}

.workspace-surface .member-management-search input {
  padding: 0 10px 0 30px;
}

.workspace-surface .member-management-toolbar > button {
  min-height: var(--figma-control-height-compact);
  padding: 0 10px;
  border: 1px solid var(--figma-border-1);
  border-radius: 6px;
  background: var(--figma-surface);
  color: var(--figma-text-2);
  font-size: 12px;
}

.workspace-surface .member-management-toolbar > button:hover,
.workspace-surface .member-management-toolbar > button:focus-visible {
  border-color: var(--figma-primary);
  color: var(--figma-primary);
}

.member-bulk-bar {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--figma-border-3);
  color: var(--figma-text-2);
  font-size: 12px;
}

.workspace-surface .member-bulk-bar button {
  min-height: var(--figma-control-height-compact);
  padding: 0 10px;
  border: 0;
  background: transparent;
  font-size: 12px;
}

.member-list-results {
  display: grid;
}

.workspace-surface .member-row__identity {
  min-width: 0;
}

.member-row__actions {
  display: grid;
  width: var(--figma-control-height-compact);
  min-width: var(--figma-control-height-compact);
  place-items: center;
}

.workspace-surface .member-row__actions > .icon-button,
.workspace-surface .member-select-control {
  display: grid;
  width: var(--figma-control-height-compact);
  height: var(--figma-control-height-compact);
  min-height: var(--figma-control-height-compact);
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--figma-text-3);
}

.workspace-surface .member-row__actions > .icon-button:hover,
.workspace-surface .member-row__actions > .icon-button:focus-visible {
  background: var(--figma-fill-3);
  color: var(--figma-text-1);
}

.member-select-control input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--figma-primary);
}

.member-select-control input:disabled {
  opacity: 0.42;
}

.member-empty {
  display: grid;
  min-height: 112px;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: var(--figma-text-3);
  text-align: center;
}

.member-empty strong {
  color: var(--figma-text-2);
  font-size: 13px;
  font-weight: 500;
}

.member-empty span {
  font-size: 12px;
}

.member-action-menu {
  position: fixed;
  z-index: 145;
  display: grid;
  width: 144px;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--figma-border-2);
  border-radius: 8px;
  background: var(--figma-surface-elevated);
  box-shadow: var(--figma-shadow-3);
}

.member-action-menu[hidden],
.member-action-menu button[hidden] {
  display: none;
}

.member-action-menu button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--figma-text-2);
  font-size: 12px;
  text-align: left;
}

.member-action-menu button:hover,
.member-action-menu button:focus-visible {
  background: var(--figma-fill-3);
  color: var(--figma-text-1);
  outline: 0;
}

.member-action-menu .danger-text:hover,
.member-action-menu .danger-text:focus-visible {
  background: var(--figma-danger-bg);
  color: var(--figma-error);
}

.workspace-surface #group-name-editor,
.workspace-surface input[type="text"] {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--figma-border-2);
  border-radius: 6px;
  background: var(--figma-surface);
  color: var(--figma-text-1);
}

.workspace-surface .drawer-toolbar {
  padding: 12px 20px;
  border-bottom: 1px solid var(--figma-border-3);
  background: var(--figma-surface);
}

.workspace-surface .file-list {
  height: calc(560px - 64px - 57px - 56px);
  padding: 0 20px;
}

.workspace-surface .file-row {
  min-height: 56px;
  border-bottom: 1px solid var(--figma-border-3);
  background: var(--figma-surface);
}

.workspace-surface .file-row button {
  min-height: var(--figma-control-height-compact);
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--figma-primary);
  font-size: 12px;
}

.workspace-surface .file-row button:disabled,
.workspace-surface .file-row button[aria-disabled="true"] {
  color: var(--figma-text-4);
}

.workspace-surface .drawer-footer {
  min-height: 56px;
  padding: 10px 20px;
  border-top: 1px solid var(--figma-border-2);
}

.workspace-surface .announcement-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 12px;
  height: calc(560px - 64px);
  padding: 16px 20px 20px;
  background: var(--figma-surface);
}

.workspace-surface .announcement-form > label,
.workspace-surface .announcement-preview > span {
  color: var(--figma-text-3);
  font-size: 13px;
}

.workspace-surface #announcement-input {
  width: 100%;
  min-height: 190px;
  padding: 12px;
  resize: none;
  border: 1px solid var(--figma-border-2);
  border-radius: 8px;
  background: var(--figma-surface);
  color: var(--figma-text-1);
  font-size: 14px;
  line-height: 20px;
}

.workspace-surface .announcement-preview {
  padding: 12px;
  border-radius: 8px;
  background: var(--figma-fill-3);
}

.workspace-surface .announcement-preview p {
  margin: 8px 0 0;
  color: var(--figma-text-1);
  font-size: 14px;
  line-height: 20px;
}

.workspace-surface .announcement-form > footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--figma-border-2);
}

.workspace-surface .announcement-form .secondary-button {
  min-width: 68px;
  height: 32px;
  border: 1px solid var(--figma-border-2);
  border-radius: 6px;
  background: var(--figma-surface);
  color: var(--figma-text-2);
}

.drawer-header,
.drawer-footer {
  border-color: var(--figma-border-2);
  background: var(--figma-surface);
}

.app-dialog {
  position: fixed;
  inset: auto;
  top: var(--figma-window-center-y, 50vh);
  left: var(--figma-window-center-x, 50vw);
  width: 480px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--figma-border-2);
  border-radius: 12px;
  background: var(--figma-surface-elevated);
  color: var(--figma-text-1);
  box-shadow: var(--figma-shadow-3);
  transform: translate(-50%, -50%);
}

.app-dialog::backdrop {
  background: rgba(0, 0, 0, 0.64);
}

.app-dialog > header,
.app-dialog form > header {
  min-height: 64px;
  border-color: var(--figma-border-2);
  background: var(--figma-surface);
}

.app-dialog h2,
.drawer h2 {
  color: var(--figma-text-1);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

#cloud-save-dialog,
#cloud-file-picker {
  width: 680px;
  height: 476px;
}

#cloud-save-dialog > header,
#cloud-file-picker > header {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--figma-border-2);
}

#cloud-save-dialog > header .icon-button,
#cloud-file-picker > header .icon-button {
  width: var(--figma-control-height-compact);
  height: var(--figma-control-height-compact);
  margin-left: auto;
  border-radius: 6px;
  font-size: 18px;
}

.cloud-picker-list,
.cloud-path-list {
  height: calc(476px - 64px);
  padding: 12px 20px;
  overflow-y: auto;
  background: var(--figma-surface);
}

.cloud-picker-list > button,
.cloud-path-list > button {
  display: flex;
  width: 100%;
  min-height: 56px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid var(--figma-border-3);
  border-radius: 0;
  background: var(--figma-surface);
  color: var(--figma-text-1);
  text-align: left;
}

.cloud-picker-list > button:hover,
.cloud-path-list > button:hover {
  background: var(--figma-fill-3);
}

.cloud-picker-list strong,
.cloud-path-list strong {
  color: var(--figma-text-1);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.cloud-picker-list span,
.cloud-path-list span {
  margin-top: 4px;
  color: var(--figma-text-3);
  font-size: 12px;
  line-height: 16px;
}

.app-dialog p,
.drawer p {
  color: var(--figma-text-elevated-muted);
}

.invite-dialog {
  width: 600px;
  height: 480px;
}

.invite-dialog form {
  display: grid;
  grid-template-rows: 60px minmax(0, 1fr) auto 76px;
  width: 100%;
  height: 100%;
}

.invite-dialog.is-share-mode {
  width: min(420px, calc(100vw - 48px));
  height: min(360px, calc(100vh - 48px));
}

@media (max-width: 467px), (max-height: 407px) {
  .invite-dialog.is-share-mode {
    top: 50vh;
    left: 50vw;
  }
}

.invite-dialog.is-share-mode form {
  grid-template-rows: 64px minmax(0, 1fr);
}

.invite-dialog.is-share-mode .invite-layout {
  grid-template-columns: minmax(0, 1fr);
  overflow-y: auto;
}

.invite-dialog.is-share-mode form > footer {
  display: none;
}

.invite-dialog.is-share-mode .invite-share-method {
  min-height: 0;
}

.invite-dialog.is-share-mode .invite-share-card {
  min-height: 0;
  padding: 20px 24px 24px;
}

.invite-dialog.is-share-mode .invite-qr-image {
  width: 112px;
  height: 112px;
}

.invite-dialog.is-share-mode .invite-share-card p {
  max-width: 340px;
  overflow-wrap: anywhere;
}

.invite-dialog form > header {
  min-height: 60px;
  padding: 12px 20px;
  border-bottom: 0;
}

.invite-dialog form > header p,
.invite-dialog.is-share-mode .dialog-search,
.invite-method-tabs {
  display: none;
}

.invite-dialog form > header .icon-button {
  width: var(--figma-control-height-compact);
  height: var(--figma-control-height-compact);
  border-radius: 6px;
  font-size: 18px;
}

.invite-layout {
  display: grid;
  grid-template-columns: 300px 300px;
  gap: 0;
  height: auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.invite-layout > section:not(#invite-share-method) {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  padding: 0 12px 0 24px;
}

.invite-layout > aside {
  display: grid;
  grid-template-rows: 36px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  padding: 0 24px 0 12px;
  border-left: 1px solid var(--figma-border-2);
}

.invite-layout h3 {
  margin: 0;
  color: var(--figma-text-2);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
}

.invite-eligibility-note {
  margin: 0 0 8px;
  color: var(--figma-text-3);
  font-size: 12px;
  line-height: 18px;
}

.invite-contact-intro {
  min-width: 0;
}

.invite-empty-alternatives {
  padding: 12px 0 16px;
  border-top: 1px solid var(--figma-border-2);
}

.invite-empty-alternatives[hidden] {
  display: none;
}

.invite-empty-alternatives p {
  margin: 0 0 8px;
  color: var(--figma-text-3);
  font-size: 12px;
  line-height: 18px;
}

.invite-empty-alternatives > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.invite-empty-alternatives .secondary-button {
  min-width: 0;
  height: var(--figma-control-height-compact);
  padding: 0 10px;
  border-color: var(--figma-border-1);
  border-radius: 6px;
  background: var(--figma-surface);
  color: var(--figma-text-2);
  font-size: 12px;
}

.invite-empty-alternatives .secondary-button:hover,
.invite-empty-alternatives .secondary-button:focus-visible {
  border-color: var(--figma-primary);
  color: var(--figma-primary);
}

.invite-share-method:not([hidden]) {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
}

.invite-dialog form > footer {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px 20px;
  border-top: 1px solid var(--figma-border-2);
  background: var(--figma-surface);
}

.invite-footer-count {
  margin-right: auto;
  color: var(--figma-text-3);
  font-size: 13px;
  line-height: 20px;
}

.invite-footer-count b {
  font-weight: 400;
}

.invite-dialog form > footer .secondary-button {
  display: none;
}

.invite-dialog form > footer .primary-button {
  min-width: 76px;
  height: 36px;
  border-radius: 8px;
  background: var(--figma-button-primary);
}

.select-member-list,
#invite-selected-list {
  min-height: 0;
  padding: 0;
  overflow-y: auto;
  border: 0;
  border-color: var(--figma-border-2);
  background: var(--figma-surface);
}

.invite-contact-section {
  display: grid;
  gap: 2px;
}

.invite-contact-section + .invite-contact-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--figma-border-2);
}

.invite-contact-section__title {
  margin: 0;
  padding: 4px 12px;
  color: var(--figma-text-3);
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
}

.member-choice,
.selected-member {
  min-height: 56px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--figma-text-1);
}

.member-option {
  min-height: 56px;
}

.contact-row .avatar,
.member-choice .avatar,
.member-option .avatar,
.selected-member .avatar,
.selected-invite-person .avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.member-choice:hover,
.member-choice.is-selected,
.selected-member:hover {
  background: var(--figma-primary-soft);
}

.member-choice:disabled {
  opacity: 0.72;
}

.member-choice:disabled strong {
  color: var(--figma-text-1);
}

.member-choice:disabled small,
.member-choice:disabled .choice-state {
  color: var(--figma-text-2);
}

.member-choice .choice-state {
  color: var(--figma-text-4);
  font-size: 12px;
}

.member-choice:not(:disabled) .choice-state {
  width: 14px;
  height: 14px;
  overflow: hidden;
  border: 1px solid var(--figma-border-1);
  border-radius: 3px;
  color: transparent;
}

.member-choice.is-selected:not(:disabled) .choice-state {
  border-color: var(--figma-primary);
  background: var(--figma-primary);
}

.member-choice.is-selected:not(:disabled) .choice-state::before {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: white;
  font-size: var(--figma-text-meta);
  content: "";
}

.selected-invite-person {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) var(--figma-control-height-compact);
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 8px 12px;
  border-radius: 8px;
}

.selected-invite-person:hover {
  background: var(--figma-fill-3);
}

.selected-invite-person .icon-button {
  width: var(--figma-control-height-compact);
  height: var(--figma-control-height-compact);
  border-radius: 50%;
  background: var(--figma-border-3);
  color: var(--figma-text-2);
}

input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  border-color: var(--figma-border-1);
  background: var(--figma-control-surface);
  color: var(--figma-text-1);
  color-scheme: light;
}

input::placeholder,
textarea::placeholder {
  color: var(--figma-text-3);
  opacity: 1;
}

input:disabled,
textarea:disabled,
select:disabled {
  background: var(--figma-disabled-surface);
  color: var(--figma-text-muted);
  -webkit-text-fill-color: var(--figma-text-muted);
  opacity: 1;
}

.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 10000;
  width: max-content;
  min-width: 142px;
  max-width: 360px;
  height: 40px;
  min-height: 40px;
  padding-block: 5px;
  border: 1px solid var(--figma-border-2);
  border-radius: 8px;
  background: var(--figma-surface-elevated);
  color: var(--figma-text-1);
  box-shadow: var(--figma-shadow-3);
  transform: translateX(-50%);
}

.message-empty-state {
  background: var(--figma-surface);
}

.message-empty-state .empty-icon {
  width: 120px;
  height: 120px;
  border: 0;
  border-radius: 0;
  background: url("./assets/figma-message-empty.png") center / 120px 120px no-repeat;
  color: transparent;
  box-shadow: none;
}

.message-empty-state h2 {
  margin: 12px 0 0;
  color: var(--figma-text-3);
  font-size: 14px;
  font-weight: 400;
}

.message-empty-state p {
  display: none;
}

.announcement-view {
  position: relative;
  min-height: 496px;
  padding: 20px;
  background: var(--figma-surface);
}

.announcement-author {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--figma-border-3);
}

.announcement-author img,
.figma-group-profile img,
.figma-admin-person img {
  border-radius: 50%;
  object-fit: cover;
}

.announcement-author > span {
  display: grid;
  gap: 3px;
  margin-right: auto;
}

.announcement-author time,
.announcement-author footer {
  color: var(--figma-text-3);
  font-size: 12px;
}

.announcement-author button {
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--figma-border-2);
  border-radius: 6px;
  background: var(--figma-surface);
}

#announcement-readonly-text {
  margin: 16px 0 52px;
  white-space: pre-wrap;
  color: var(--figma-text-1);
  font-size: 14px;
  line-height: 20px;
}

.announcement-view > footer {
  position: absolute;
  right: 0;
  bottom: 20px;
  left: 0;
  color: var(--figma-text-4);
  text-align: center;
  font-size: 12px;
}

.figma-group-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
}

.figma-group-profile > span {
  display: grid;
  gap: 3px;
  margin-right: auto;
}

.figma-group-profile input {
  width: 240px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--figma-text-1);
  font-size: 14px;
  font-weight: 500;
}

.figma-group-profile input:focus {
  padding: 0 6px;
  border: 1px solid var(--figma-primary);
  border-radius: 4px;
}

.figma-group-profile small,
.figma-admin-person small,
.figma-admin-add small {
  color: var(--figma-text-3);
  font-size: 12px;
}

.figma-group-profile > button {
  border: 0;
  background: transparent;
  color: var(--figma-text-3);
}

.figma-admin-summary {
  padding-top: 18px;
}

.figma-admin-summary > h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 400;
}

.figma-admin-summary > h3 span {
  margin-left: 4px;
}

.figma-admin-summary > div {
  display: flex;
  gap: 28px;
}

.figma-admin-person,
.figma-admin-add {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 52px;
  border: 0;
  background: transparent;
}

.figma-admin-add > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--figma-fill-3);
  color: var(--figma-text-2);
  font-size: 24px;
  font-weight: 300;
}

.toast-icon {
  color: var(--figma-success);
}

.app-dialog > .toast.is-in-dialog-layer {
  top: var(--toast-dialog-top, -24px);
}

.workspace-state,
.private-chat-page,
.contact-detail-page,
.group-detail-page,
.finder-page {
  width: 600px;
  height: 560px;
  background: var(--figma-surface);
  color: var(--figma-text-1);
}

.private-chat-page {
  display: grid;
  grid-template-areas:
    "header"
    "relationship"
    "messages"
    "composer";
  grid-template-rows: 70px auto minmax(0, 1fr) 136px;
  overflow: hidden;
}

.private-chat-page:has(.private-composer.has-reply) {
  grid-template-rows: 70px auto minmax(0, 1fr) 176px;
}

.private-chat-page > header {
  grid-area: header;
  display: flex;
  align-items: center;
  min-height: 70px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--figma-border-2);
  background: var(--figma-surface);
}

.private-chat-page > header > div,
.private-chat-page > header nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.private-chat-page > header nav {
  margin-left: auto;
}

.private-chat-page h2 {
  margin: 0;
  color: var(--figma-text-1);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.private-chat-page header small {
  color: var(--figma-text-3);
  font-size: 12px;
}

.private-chat-page header button {
  min-width: var(--figma-control-height-compact);
  height: var(--figma-control-height-compact);
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--figma-text-2);
}

.relationship-strip {
  grid-area: relationship;
  min-height: 40px;
  padding: 8px 20px;
  border: 0;
  border-bottom: 1px solid var(--figma-info-border);
  background: var(--figma-info-bg);
  color: var(--figma-primary-hover);
  font-size: 13px;
}

.relationship-strip span,
.relationship-strip button {
  color: inherit;
}

.relationship-strip button {
  min-height: var(--figma-control-height-compact);
  padding: 0 6px;
  border-radius: 4px;
  font-weight: 500;
}

.relationship-strip button:hover {
  background: var(--figma-primary-soft);
}

.relationship-strip.is-warning {
  border-color: var(--figma-danger-border);
  background: var(--figma-danger-bg);
  color: var(--figma-danger-text);
}

.relationship-strip.is-warning button:hover {
  background: var(--figma-danger-bg);
}

.private-message-list {
  grid-area: messages;
  min-height: 0;
  margin: 0;
  padding: 20px;
  overflow-y: auto;
  background: var(--figma-surface);
}

.private-message {
  display: flex;
  justify-content: flex-start;
  margin: 0 80px 20px 0;
}

.private-message.is-self {
  justify-content: flex-end;
  margin: 0 0 20px 80px;
}

.private-message > article,
.private-file-bubble,
.follow-invite-card {
  max-width: 400px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: var(--figma-message-incoming);
  color: var(--figma-text-1);
  box-shadow: none;
}

.private-file-bubble span {
  color: var(--figma-text-elevated-muted);
}

.private-message.is-self > article {
  background: var(--figma-message-outgoing);
  color: var(--figma-text-1);
}

.private-message p {
  margin: 0;
  color: inherit;
  font-size: 14px;
  line-height: 20px;
}

.private-message time {
  display: block;
  margin-top: 4px;
  color: var(--figma-text-3);
  font-size: var(--figma-text-meta);
  line-height: 16px;
}

.message-context-menu {
  border-color: var(--figma-border);
  border-radius: 6px;
  background: var(--figma-surface-elevated);
  box-shadow: var(--figma-shadow-3);
}

.message-context-menu button {
  color: var(--figma-text-1);
  font-size: 13px;
}

.message-context-menu button:hover,
.message-context-menu button:focus-visible {
  background: var(--figma-fill-3);
  color: var(--figma-text-1);
}

.private-composer {
  position: relative;
  grid-area: composer;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: minmax(0, 1fr) 32px;
  gap: 0;
  min-height: 136px;
  margin: 0;
  padding: 20px;
  border: 0;
  background: var(--figma-composer-surface);
}

.private-composer::before {
  position: absolute;
  inset: 20px;
  border: 1px solid var(--figma-border-2);
  border-radius: 8px;
  pointer-events: none;
  content: "";
}

.private-composer textarea {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  padding: 12px 16px;
  overflow-y: auto;
  box-sizing: border-box;
  resize: none;
  border: 0;
  background: transparent;
  color: var(--figma-text-1);
  font-size: 14px;
  line-height: 20px;
}

.private-composer > div:not(.private-reply-preview) {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 2;
  display: flex;
  gap: 4px;
  padding-left: 8px;
}

.private-composer button {
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--figma-text-1);
}

.private-composer > .primary-button {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 2;
  min-width: 68px;
  background: var(--figma-button-primary);
  color: var(--figma-button-text);
}

.private-composer > .primary-button:disabled {
  background: var(--figma-fill-4);
  color: var(--figma-text-4);
}

.app-dialog .primary-button:disabled,
.drawer-footer .primary-button:disabled {
  background: var(--figma-border-2);
  color: var(--figma-text-3);
}

.workspace-surface .file-row button:disabled,
.workspace-surface .file-row button[aria-disabled="true"] {
  color: var(--figma-text-3);
}

.private-composer.has-reply {
  grid-template-rows: 34px minmax(0, 1fr) 32px;
  min-height: 176px;
}

.private-reply-preview {
  position: relative;
  z-index: 4;
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  overflow: hidden;
  border: 0;
  background: var(--figma-fill-3);
}

.private-reply-preview > span {
  display: flex;
  min-width: 0;
  align-items: center;
}

.private-reply-preview strong {
  flex: 0 0 auto;
  font-size: 12px;
}

.private-reply-preview small {
  min-width: 0;
  overflow: hidden;
  color: var(--figma-text-3);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private-composer.has-reply textarea {
  grid-row: 2;
  padding: 8px 16px;
}

.private-composer.has-reply > div:not(.private-reply-preview),
.private-composer.has-reply > .primary-button {
  grid-row: 3;
}

.contact-detail-page,
.group-detail-page {
  width: 600px;
  height: 560px;
  margin: 0;
  padding: 64px 48px 40px;
  overflow-y: auto;
  background: var(--figma-surface);
  color: var(--figma-text-1);
}

.contact-detail-hero {
  border-bottom: 1px solid var(--figma-border-2);
}

.contact-detail-hero h2,
.group-detail-page h2 {
  color: var(--figma-text-1);
  font-size: 20px;
  font-weight: 600;
}

.contact-detail-hero p,
.group-detail-page > p {
  color: var(--figma-text-3);
}

.relation-chip {
  border: 1px solid var(--figma-info-border);
  border-radius: 4px;
  background: var(--figma-primary-soft);
  color: var(--figma-primary);
}

.contact-facts > div,
.group-detail-facts > div {
  border-bottom: 1px solid var(--figma-border-3);
}

.contact-facts dt,
.group-detail-facts dt {
  color: var(--figma-text-3);
}

.contact-facts dd,
.group-detail-facts dd {
  color: var(--figma-text-2);
}

.contact-facts dd button,
.group-detail-facts dd button {
  color: var(--figma-primary);
}

.contact-primary-actions button,
.contact-secondary-actions button,
.group-detail-actions button {
  min-height: 36px;
  border: 1px solid var(--figma-border-2);
  border-radius: 8px;
  background: var(--figma-surface);
  color: var(--figma-text-2);
}

.contact-primary-actions .primary-button,
.group-detail-actions .primary-button {
  border-color: var(--figma-button-primary);
  background: var(--figma-button-primary);
  color: var(--figma-button-text);
}

.group-avatar--detail {
  width: 86px;
  height: 86px;
}

.group-resource-summary {
  border-color: var(--figma-border-3);
}

.group-resource-summary span,
.group-resource-summary p {
  color: var(--figma-text-3);
}

.group-resource-summary strong {
  color: var(--figma-text-1);
}

.group-resource-summary button {
  background: var(--figma-primary-soft);
  color: var(--figma-primary-hover);
}

.group-resource-summary button:hover {
  background: var(--figma-fill-3);
}

/* Readability contract for standalone surfaces that sit outside the group workspace. */
.private-settings {
  color: var(--figma-text-1);
  border: 1px solid var(--figma-border-2);
  background: var(--figma-surface-elevated);
  box-shadow: var(--figma-shadow-float);
}

.private-settings .drawer-header {
  min-height: 64px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--figma-border-2);
  background: var(--figma-surface);
}

.private-settings .drawer-header h2 {
  color: var(--figma-text-1);
  font-size: 16px;
  font-weight: 600;
}

.private-settings .drawer-header p {
  color: var(--figma-text-3);
  font-size: var(--figma-text-meta);
}

.private-settings .drawer-header > button {
  width: var(--figma-control-height-compact);
  height: var(--figma-control-height-compact);
  border: 1px solid var(--figma-border-1);
  border-radius: 4px;
  background: var(--figma-surface);
  color: var(--figma-text-1);
}

.private-settings .drawer-scroll {
  background: var(--figma-surface);
}

.private-settings .private-profile-row {
  padding: 20px;
  border-bottom: 1px solid var(--figma-border-2);
  background: var(--figma-surface);
}

.private-settings .private-profile-row strong {
  color: var(--figma-text-1);
  font-size: 14px;
}

.private-settings .private-profile-row span {
  color: var(--figma-text-3);
  font-size: var(--figma-text-meta);
}

.private-settings .private-profile-row button {
  min-height: var(--figma-control-height-compact);
  padding: 0 10px;
  border: 1px solid var(--figma-border-1);
  border-radius: 4px;
  background: var(--figma-surface);
  color: var(--figma-text-1);
}

.private-settings .settings-section {
  margin: 0;
  padding: 12px 20px 20px;
  border: 0;
  background: var(--figma-surface);
}

.private-settings .settings-link,
.private-settings .switch-row {
  min-height: 56px;
  border-bottom: 1px solid var(--figma-border-2);
  background: var(--figma-surface);
}

.private-settings .settings-link:hover {
  background: var(--figma-fill-2);
}

.private-settings .settings-link strong,
.private-settings .switch-row strong {
  color: var(--figma-text-1);
  font-size: 13px;
  font-weight: 500;
}

.private-settings .settings-link small,
.private-settings .switch-row small,
.private-settings .settings-link > span:last-child {
  color: var(--figma-text-3);
}

.private-settings .switch-row i {
  background: var(--figma-border-1);
}

.private-settings .switch-row i::after {
  background: var(--figma-surface);
  box-shadow: var(--figma-shadow-control);
}

.private-settings .switch-row input:checked + i {
  background: var(--figma-primary);
}

.danger-text,
.danger-zone button,
.workspace-surface .member-actions .danger-text,
.workspace-surface .danger-zone button {
  color: var(--figma-danger-text) !important;
}

.composer-lock {
  border: 1px solid var(--figma-warning-border);
  background: var(--figma-warning-bg);
  color: var(--figma-warning);
}

.announcement-strip > button,
.state-kicker,
.file-message > nav button,
.file-message > footer button {
  color: var(--figma-primary-hover);
}

.announcement-strip > button {
  background: var(--figma-primary-soft);
}

.locator-bar {
  border-color: var(--figma-info-border);
  background: var(--figma-info-bg);
  color: var(--figma-text-1);
}

.locator-bar:hover {
  background: var(--figma-primary-soft);
}

.locator-bar > span:last-child {
  color: var(--figma-primary-hover);
  font-weight: 500;
}

.message blockquote,
.private-message blockquote {
  color: var(--figma-text-2);
}

.relation-chip {
  border-color: var(--figma-info-border);
  background: var(--figma-primary-soft);
  color: var(--figma-primary-hover);
}

.message-cancelled,
.file-message.is-cancelled span {
  color: var(--figma-danger-text);
}

.special-preview,
.contact-row em,
.contact-detail-page em {
  color: var(--figma-warning);
}

.message-secondary-action,
.receipt,
.reply-link,
.conversation-muted,
.scenario-console time {
  color: var(--figma-text-3);
}

.desktop-notification,
.tray-recent-messages {
  border-color: var(--figma-border-2);
  background: var(--figma-surface-elevated);
  color: var(--figma-text-1);
  box-shadow: var(--figma-shadow-float);
}

.desktop-notification > button:first-child,
.tray-recent-messages #tray-message-list > button {
  color: var(--figma-text-1);
}

.desktop-notification small,
.desktop-notification time,
.tray-recent-messages small,
.tray-recent-messages > header span,
.tray-empty {
  color: var(--figma-text-elevated-muted);
}

.tray-recent-messages > header,
.tray-recent-messages > footer,
.tray-recent-messages #tray-message-list > button {
  border-color: var(--figma-border-2);
}

.tray-recent-messages #tray-message-list > button:hover {
  background: var(--figma-fill-3);
}

.tray-recent-messages #tray-message-list b,
.tray-recent-messages > footer button {
  color: var(--figma-primary);
}

#tray-simulator {
  display: none;
}

/* Canonical Figma component anatomy; legacy classes remain valid aliases. */
.figma-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: var(--figma-radius-circle);
}

.figma-contact-row {
  min-height: 56px;
  gap: 12px;
  padding-block: 8px;
}

.figma-contact-row__content strong {
  color: var(--figma-font-1);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.figma-contact-row__content small {
  color: var(--figma-font-3);
  font-size: 12px;
  line-height: 16px;
}

.figma-group-row {
  min-height: 56px;
  gap: 12px;
}

.figma-group-row__content strong {
  color: var(--figma-font-1);
  font-size: 14px;
  line-height: 20px;
}

.figma-group-row__content small,
.figma-group-row__meta {
  color: var(--figma-font-3);
  font-size: 12px;
  line-height: 16px;
}

.figma-message {
  color: var(--figma-font-1);
  font-size: 14px;
  line-height: 20px;
}

.figma-message__meta {
  color: var(--figma-font-3);
  font-size: 12px;
  line-height: 16px;
}

.figma-notice-bar {
  min-height: 40px;
  padding: 6px 12px 6px 16px;
  background: #e8f4ff;
  color: var(--figma-font-1);
  font-size: 13px;
  line-height: 20px;
}

.figma-invite-dialog {
  width: 600px;
  height: 480px;
  border-radius: var(--figma-radius-l);
  background: var(--figma-container);
  box-shadow: var(--figma-shadow-3);
}

.figma-invite-dialog__header {
  min-height: 60px;
}

.figma-invite-dialog__body {
  grid-template-columns: 300px 300px;
}

.figma-invite-dialog__footer {
  min-height: 76px;
}

.figma-settings-row {
  min-height: 60px;
}

.figma-settings-row--link,
.figma-settings-row--switch {
  padding-block: 8px;
}

.figma-settings-row--link > span:first-child,
.figma-settings-row--switch > span:first-child {
  min-height: 44px;
  align-content: center;
}

.figma-settings-row--link > span:last-child {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
}

.figma-settings-row--danger {
  min-height: 36px;
}

.figma-file-row {
  min-height: 56px;
}

.figma-file-row--message {
  min-height: 0;
}

.figma-cloud-picker {
  width: 680px;
  height: 476px;
}

.figma-toast {
  height: 40px;
  min-height: 40px;
  border: 1px solid var(--figma-border-2);
  border-radius: var(--figma-radius-m);
  background: var(--figma-container);
  box-shadow: var(--figma-shadow-3);
}

.compact-back-button {
  display: none;
}

@media (max-width: 959px), (max-height: 639px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    height: 100%;
    overflow: hidden;
  }

  body {
    display: block;
    padding: 0;
  }

  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 100dvh;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }

  .app-shell:has(.scenario-console.is-open) {
    --figma-shell-shift: 0px;
  }

  .conversation-pane,
  .workspace {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  html[data-compact-pane="workspace"] .conversation-pane,
  html[data-compact-pane="sidebar"] .workspace {
    visibility: hidden;
    pointer-events: none;
  }

  .group-chat,
  .private-chat-page,
  .workspace-state,
  .scenario-stage,
  .contact-detail-page,
  .group-detail-page,
  .finder-page {
    width: 100%;
    height: 100dvh;
  }

  .chat-header {
    align-items: flex-end;
    gap: 10px;
    padding-left: 12px;
  }

  .private-chat-page > header {
    gap: 8px;
    padding-inline: 12px;
  }

  .compact-back-button {
    display: inline-grid;
    width: var(--figma-control-height);
    min-width: var(--figma-control-height);
    height: var(--figma-control-height);
    flex: 0 0 var(--figma-control-height);
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: var(--figma-radius-control);
    background: transparent;
    color: var(--figma-text-1);
    font-size: 26px;
    line-height: 1;
  }

  .compact-back-button:hover,
  .compact-back-button:focus-visible {
    background: var(--figma-fill-3);
  }

  .contact-detail-page,
  .group-detail-page {
    position: relative;
    width: 100%;
    padding: 64px max(20px, env(safe-area-inset-right)) 32px
      max(20px, env(safe-area-inset-left));
  }

  .compact-detail-back {
    position: absolute;
    top: max(12px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
  }

  .scenario-console:not(.is-open) {
    position: fixed;
    top: 50%;
    right: 12px;
    left: auto;
    width: 44px;
    height: 152px;
    transform: translateY(-50%);
  }

  .scenario-console.is-open {
    position: fixed;
    inset: 12px;
    width: auto;
    max-width: none;
    height: auto;
    transform: none;
  }

  .scenario-console.is-open .scenario-panel {
    width: 100%;
    height: 100%;
  }

  .invite-dialog:not(.is-share-mode) {
    width: min(600px, calc(100vw - 24px));
    height: min(480px, calc(100dvh - 24px));
  }

  .invite-dialog:not(.is-share-mode) .invite-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .invite-dialog:not(.is-share-mode)
    .invite-layout
    > section:not(#invite-share-method) {
    padding: 0 16px;
  }

  .invite-dialog:not(.is-share-mode) .invite-layout > aside {
    grid-template-rows: 20px minmax(0, 64px);
    padding: 8px 16px 10px;
    border-top: 1px solid var(--figma-border-2);
    border-left: 0;
  }

  .invite-dialog:not(.is-share-mode) #invite-selected-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .invite-dialog:not(.is-share-mode) .selected-invite-person {
    min-width: 188px;
    min-height: 56px;
  }

  .app-dialog {
    top: 50vh;
    left: 50vw;
    width: min(600px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
  }

  .app-dialog > form {
    max-height: calc(100dvh - 24px);
  }

  .app-dialog .dialog-body {
    min-height: 0;
    overflow-y: auto;
  }

  #cloud-save-dialog,
  #cloud-file-picker {
    width: min(680px, calc(100vw - 24px));
    height: min(476px, calc(100dvh - 24px));
  }

  .cloud-picker-list,
  .cloud-path-list {
    height: calc(100% - 64px);
    overflow-y: auto;
  }

  .drawer:not(.workspace-surface) {
    top: 50vh;
    right: auto;
    left: 50vw;
    width: min(480px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    transform: translate(-50%, -50%);
  }

  .drawer.workspace-surface {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }

  .workspace-surface .drawer-header {
    position: sticky;
    top: 0;
    z-index: 2;
    flex: 0 0 auto;
  }

  .workspace-surface .drawer-scroll,
  .workspace-surface .file-list {
    min-height: 0;
    overflow-y: auto;
  }

  .workspace-surface .file-list {
    height: calc(100dvh - 64px - 57px - 56px);
  }

  .workspace-surface .announcement-form {
    height: calc(100dvh - 64px);
    overflow-y: auto;
  }
}

html[data-scenario-console-layout="overlay"]
  .app-shell:has(.scenario-console.is-open) {
  --figma-shell-shift: 0px;
}

html[data-scenario-console-layout="overlay"] .scenario-console.is-open {
  top: 0;
  right: 0;
  left: auto;
}

@media (max-height: 360px) {
  .invite-dialog:not(.is-share-mode) .invite-layout {
    grid-template-rows: minmax(0, 1fr);
  }

  .invite-dialog:not(.is-share-mode)
    .invite-layout
    > section:not(#invite-share-method) {
    grid-template-rows: auto auto minmax(48px, 1fr) auto;
  }

  .invite-dialog:not(.is-share-mode) .invite-layout > aside {
    display: none;
  }
}

@media (min-width: 960px) and (min-height: 640px) {
  .compact-back-button {
    display: none;
  }
}

.invite-method-menu,
.message-context-menu,
.member-action-menu {
  transform-origin: top right;
  animation: workbench-float-in 140ms ease-out;
}

@keyframes workbench-float-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Exact Figma component pass — exported desktop shell, contacts and group profile. */
:root {
  --figma-sidebar: #f6f7fb;
}

::-webkit-scrollbar-thumb {
  background: #e5e6eb;
}

.conversation-pane {
  grid-template-rows: 44px minmax(0, 1fr);
  background: #f6f7fb;
}

.entry-tabs {
  gap: 24px;
  min-height: 44px;
  padding: 0 20px;
  background: #f6f7fb;
}

.entry-tab {
  min-height: 44px;
  padding: 0;
  font-size: 14px;
  font-weight: 400;
}

.entry-tab:hover,
.entry-tab.is-active,
.entry-tab[aria-selected="true"] {
  color: #226df5;
  font-weight: 400;
}

.entry-tab.is-active::after,
.entry-tab[aria-selected="true"]::after {
  right: 50%;
  left: auto;
  width: 28px;
  transform: translateX(50%);
}

.entry-badge {
  min-width: 22px;
  height: 12px;
  padding: 0 3px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 500;
  line-height: 12px;
}

.entry-add {
  width: 24px;
  height: 24px;
  margin: 0 -2px 0 auto;
}

.sidebar-content {
  padding: 8px 12px 16px;
}

html[data-active-entry="contacts"] .sidebar-section,
html[data-active-entry="groups"] .sidebar-section {
  grid-template-rows: minmax(0, 1fr);
}

html[data-active-entry="contacts"] .sidebar-footer,
html[data-active-entry="groups"] .sidebar-footer {
  display: none;
}

.group-list,
.conversation-list,
.contact-mutual-list {
  display: grid;
  gap: 4px;
}

.conversation-row.figma-group-row {
  grid-template-columns: 36px minmax(0, 1fr);
  min-height: 60px;
  padding: 12px 10px;
  border-radius: 8px;
}

.conversation-list .conversation-row {
  height: 64px;
  min-height: 64px;
  padding: 8px 12px;
}

.conversation-list .figma-group-conversation-row {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  height: 64px;
  min-height: 64px;
  padding: 8px 12px;
}

.sidebar-content > .figma-group-conversation-row {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  height: 64px;
  min-height: 64px;
  padding: 8px 12px;
}

.conversation-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.conversation-title-line strong {
  min-width: 0;
  flex: 0 1 auto;
}

.conversation-copy small {
  display: flex;
  min-width: 0;
  white-space: nowrap;
}

.conversation-preview-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.special-preview {
  flex: 0 0 auto;
  margin-right: 3px;
}

.special-preview.is-warning {
  color: var(--figma-warning);
}

.special-preview.is-danger {
  color: var(--figma-error);
}

.conversation-name-badge.is-new-file {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--figma-primary-soft);
  color: var(--figma-primary);
  font-size: 10px;
  font-weight: 400;
  line-height: 16px;
}

.conversation-row.figma-group-row.is-active {
  background: rgba(12, 24, 49, 0.04);
}

.figma-group-row .group-avatar,
.figma-group-row .figma-avatar {
  width: 36px;
  height: 36px;
}

.figma-group-row__content strong {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.contact-category-list {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.contact-category-list button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  height: 60px;
  padding: 12px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111216;
  font-size: 14px;
  text-align: left;
}

.contact-category-list button.is-active,
.contact-category-list button:hover {
  background: rgba(12, 24, 49, 0.04);
}

.contact-category-icon {
  width: 36px;
  height: 36px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 36px 36px;
}

.contact-category-icon.is-following {
  background-image: url("assets/figma-contact-following.png");
}

.contact-category-icon.is-followers {
  background-image: url("assets/figma-contact-followers.png");
}

.contact-category-list b {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ff4d4f;
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  line-height: 18px;
  text-align: center;
}

.contact-mutual-heading {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  color: #8e8f93;
  font-size: 12px;
}

.contact-mutual-heading b {
  display: none;
}

.contact-row.figma-contact-row--contact {
  min-height: 60px;
  padding: 12px 10px;
}

.contact-row.figma-contact-row--contact.is-active {
  background: rgba(12, 24, 49, 0.04);
}

.workspace,
.scenario-stage {
  width: 600px;
  height: 560px;
}

.contact-directory-page::before,
.contact-detail-page::before,
.group-detail-page::before {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 92px;
  height: 28px;
  background: url("assets/figma-window-controls.png") center / 92px 28px no-repeat;
  content: "";
}

.contact-directory-page,
.contact-detail-page,
.group-detail-page {
  position: relative;
  width: 600px;
  height: 560px;
  margin: 0;
  background: #fff;
}

.contact-directory-page {
  padding: 56px 20px 16px;
  overflow-y: auto;
}

.contact-directory-list {
  display: grid;
}

.figma-contact-directory-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto auto auto;
  gap: 12px;
  align-items: center;
  min-height: 80px;
  border: 0;
}

.figma-contact-directory-row > .avatar {
  width: 36px;
  height: 36px;
}

.figma-contact-directory-row__copy {
  min-width: 0;
}

.figma-contact-directory-row__copy strong,
.figma-contact-directory-row__copy small {
  display: block;
}

.figma-contact-directory-row__copy strong {
  color: #111216;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.figma-contact-directory-row__copy em {
  margin-left: 4px;
  color: #fff;
  font-size: 9px;
  font-style: normal;
  background: #73506b;
}

.figma-contact-directory-row__copy small {
  color: #8e8f93;
  font-size: 12px;
  line-height: 20px;
}

.figma-contact-directory-row > span {
  color: #c7c8cc;
  font-size: 12px;
}

.figma-contact-directory-row > button:not(.copy-icon-button) {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  background: #fff;
  color: #111216;
  font-size: 12px;
}

.figma-contact-directory-row > button[data-action="invite-follow"] {
  border-color: rgba(34, 109, 245, 0.12);
  background: rgba(34, 109, 245, 0.1);
  color: #226df5;
}

.figma-contact-directory-row > .figma-icon-button--more {
  width: 28px;
  padding: 0;
  background-image: url("assets/figma-more.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
}

.contact-directory-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 488px;
  color: #111216;
}

.figma-contact-empty-art {
  width: 120px;
  height: 120px;
  background: url("assets/figma-contact-empty.png") center / contain no-repeat;
}

.contact-directory-empty strong {
  margin-top: 18px;
  font-size: 14px;
  font-weight: 400;
}

.contact-directory-empty button {
  min-width: 106px;
  height: 40px;
  margin-top: 16px;
  border: 0;
  border-radius: 8px;
  background: #226df5;
  color: #fff;
}

.figma-detail-toolbar {
  position: absolute;
  top: 44px;
  right: 0;
  left: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  border-bottom: 1px solid #f2f3f5;
}

.figma-detail-toolbar button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #111216;
  font-size: 14px;
}

.contact-detail-page,
.group-detail-page {
  padding: 126px 92px 24px;
  overflow: hidden;
  text-align: center;
}

.contact-detail-hero,
.group-detail-page > .group-avatar--detail {
  border: 0;
}

.contact-detail-hero .avatar--profile,
.avatar--profile.figma-avatar,
.group-detail-page > .group-avatar--detail,
.group-avatar--detail.figma-avatar {
  width: 74px;
  height: 74px;
  margin: 0 auto;
}

.contact-detail-hero h2,
.group-detail-page h2 {
  margin: 12px 0 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

.contact-facts,
.group-detail-facts {
  display: grid;
  gap: 18px;
  margin: 52px auto 0;
  text-align: left;
}

.contact-facts > div,
.group-detail-facts > div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 0;
}

.contact-facts dt,
.group-detail-facts dt {
  color: #8e8f93;
  font-size: 13px;
  text-align: left;
}

.contact-facts dd,
.group-detail-facts dd {
  margin: 0;
  color: #111216;
  font-size: 13px;
  line-height: 20px;
}

.copy-icon-button,
.edit-icon-button {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0;
  border: 0;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  vertical-align: -4px;
}

.copy-icon-button {
  background-image: url("assets/figma-copy.png");
}

.edit-icon-button {
  background-image: url("assets/figma-edit.png");
}

.contact-primary-actions,
.group-detail-actions {
  margin-top: 72px;
}

.contact-primary-actions .primary-button,
.group-detail-actions .primary-button {
  min-width: 76px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: #303847;
  color: #fff;
  font-size: 13px;
}

.chat-header::before {
  top: 8px;
  right: 12px;
  width: 92px;
  height: 28px;
  background: url("assets/figma-window-controls.png") center / 92px 28px no-repeat;
  color: transparent;
  content: "";
}

.figma-message__quote {
  border-color: #c9cdd4;
  background: #f2f3f5;
  color: #8e8f93;
}

.new-message-divider::before,
.new-message-divider::after {
  background: #e5e6eb;
}

#group-settings.workspace-surface {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 88px minmax(0, 1fr);
  width: 600px;
  height: 560px;
  border: 0;
  border-radius: 0 12px 12px 0;
  background: #fff;
  box-shadow: none;
}

#group-settings.workspace-surface[hidden] {
  display: none;
}

#group-settings .drawer-header {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 88px;
  padding: 0 20px 8px;
  border-bottom: 1px solid #f2f3f5;
  background: #fff;
}

#group-settings .drawer-header::before {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 92px;
  height: 28px;
  background: url("assets/figma-window-controls.png") center / 92px 28px no-repeat;
  content: "";
}

#group-settings .drawer-header > div {
  display: block;
}

#group-settings .drawer-header h2 {
  margin: 0;
  color: #111216;
  font-size: 16px;
  font-weight: 600;
  line-height: 28px;
}

#group-settings .drawer-header p {
  display: none;
}

#group-settings .drawer-header > button {
  width: 50px;
  height: 28px;
  padding: 0;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  background: #fff;
  color: #111216;
  font-size: 12px;
}

#group-settings .drawer-scroll {
  min-height: 0;
  padding: 0 20px 20px;
  overflow-y: auto;
  background: #fff;
}

.figma-group-settings-profile {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 80px;
  border-bottom: 1px solid #f2f3f5;
}

.figma-group-settings-profile > img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.figma-group-settings-profile strong,
.figma-group-settings-profile small {
  display: block;
  font-weight: 400;
}

.figma-group-settings-profile strong {
  color: #111216;
  font-size: 14px;
  line-height: 20px;
}

.figma-group-settings-profile small {
  color: #8e8f93;
  font-size: 12px;
  line-height: 20px;
}

.figma-group-member-summary,
.figma-admin-summary--standalone {
  padding: 16px 0 12px;
  border-bottom: 1px solid #f2f3f5;
}

.figma-group-member-summary h3,
.figma-admin-summary--standalone h3 {
  margin: 0 0 12px;
  color: #111216;
  font-size: 14px;
  font-weight: 400;
}

.figma-group-member-summary h3 span,
.figma-admin-summary--standalone h3 span {
  margin-left: 4px;
}

.figma-member-avatar-grid,
.figma-admin-summary--standalone > div {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.figma-member-avatar-grid > button,
.figma-admin-summary--standalone button,
.figma-admin-summary--standalone .figma-admin-person {
  display: flex;
  flex: 0 0 44px;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8e8f93;
}

.figma-member-avatar-grid .avatar,
.figma-member-avatar-grid img,
.figma-admin-summary--standalone img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.figma-member-avatar-grid small,
.figma-admin-summary--standalone small {
  display: block;
  width: 52px;
  overflow: hidden;
  color: #8e8f93;
  font-size: 10px;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.figma-view-members {
  display: block;
  margin: 10px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #226df5;
  font-size: 12px;
}

.figma-group-settings-list {
  display: grid;
}

.figma-group-settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 64px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid #f2f3f5;
  background: transparent;
  color: #111216;
  text-align: left;
}

.figma-group-settings-row span,
.figma-group-settings-row strong,
.figma-group-settings-row small {
  display: block;
}

.figma-group-settings-row strong {
  color: #111216;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.figma-group-settings-row small {
  max-width: 490px;
  margin-top: 2px;
  overflow: hidden;
  color: #8e8f93;
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.figma-chevron {
  width: 18px;
  height: 18px;
  background: url("assets/figma-chevron.png") center / 18px 18px no-repeat;
}

.figma-group-settings-row.is-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.figma-group-settings-row.is-switch > i {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: #e5e6eb;
}

.figma-group-settings-row.is-switch > i::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(39, 46, 59, 0.18);
  content: "";
  transition: transform 120ms ease;
}

.figma-group-settings-row.is-switch input:checked + i {
  background: #226df5;
}

.figma-group-settings-row.is-switch input:checked + i::after {
  transform: translateX(16px);
}

.figma-group-settings-row.is-danger {
  color: #ff4d4f;
  font-size: 14px;
}

.figma-settings-back {
  position: absolute;
  top: 52px;
  left: 20px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0;
  border: 0;
  background: #fff;
  color: #111216;
  font-size: 16px;
  font-weight: 600;
}

#group-settings:has(.figma-settings-back) .drawer-header h2 {
  margin-left: 32px;
}

.figma-join-settings-list {
  padding-top: 0;
}

.figma-join-settings-list .figma-group-settings-row {
  min-height: 80px;
}

#private-settings {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 88px minmax(0, 1fr);
  width: 600px;
  height: 560px;
  border: 0;
  border-radius: 0 12px 12px 0;
  background: #fff;
  box-shadow: none;
}

#private-settings[hidden] {
  display: none;
}

#private-settings .drawer-header {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 88px;
  padding: 0 20px 8px;
  border-bottom: 1px solid #f2f3f5;
  background: #fff;
}

#private-settings .drawer-header::before {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 92px;
  height: 28px;
  background: url("assets/figma-window-controls.png") center / 92px 28px no-repeat;
  content: "";
}

#private-settings .drawer-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 28px;
}

#private-settings .drawer-header p {
  display: none;
}

#private-settings .drawer-header > button {
  width: 50px;
  height: 28px;
  padding: 0;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  background: #fff;
  color: #111216;
  font-size: 12px;
}

#private-settings-content {
  padding: 0 20px;
}

#private-settings .figma-settings-row--profile {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 80px;
  padding: 0;
  border-bottom: 1px solid #f2f3f5;
}

#private-settings .figma-settings-row--profile .avatar {
  width: 36px;
  height: 36px;
}

#private-settings .figma-settings-row--profile strong,
#private-settings .figma-settings-row--profile span {
  display: block;
  font-size: 13px;
  font-weight: 400;
}

#private-settings .figma-settings-row--profile div > span {
  margin-top: 2px;
  color: #8e8f93;
  font-size: 12px;
}

#private-settings .figma-settings-list {
  margin: 0;
  padding: 0;
  border: 0;
}

#private-settings .figma-settings-row--switch {
  min-height: 80px;
  border-bottom: 1px solid #f2f3f5;
}

.chat-header .folder-icon,
.chat-header .person-add-icon,
.figma-header-more,
.figma-composer-upload,
.figma-composer-smile {
  width: 20px;
  height: 20px;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
}

.chat-header .folder-icon {
  background-image: url("assets/figma-header-file.png");
}

.chat-header .person-add-icon {
  background-image: url("assets/figma-header-invite.png");
}

.figma-header-more {
  background-image: url("assets/figma-header-more.png");
}

.figma-composer-upload {
  background-image: url("assets/figma-composer-upload.png");
}

.figma-composer-smile {
  background-image: url("assets/figma-composer-smile.png");
}

.chat-header .folder-icon::before,
.chat-header .folder-icon::after,
.chat-header .person-add-icon::before,
.chat-header .person-add-icon::after {
  display: none;
}

.composer {
  grid-template-columns: minmax(0, 1fr) 68px;
  grid-template-rows: minmax(0, 1fr) 32px;
  width: calc(100% - 40px);
  height: 96px;
  min-height: 96px;
  margin: 20px;
  padding: 10px 14px 12px;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  background: #fff;
}

.composer::before {
  display: none;
}

.composer textarea {
  grid-column: 1 / -1;
  grid-row: 1;
  min-height: 0;
  padding: 0;
  border: 0;
  color: #111216;
  font-size: 14px;
  line-height: 22px;
  resize: none;
}

.composer-tools {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  gap: 16px;
  align-items: center;
  align-self: end;
  padding-left: 0;
}

.composer-tools .icon-button {
  width: 20px;
  height: 20px;
  padding: 0;
}

.composer-footer {
  position: static;
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  justify-self: end;
}

.composer-footer > span {
  display: none;
}

.composer .send-button {
  width: 68px;
  min-width: 68px;
  height: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: #226df5;
  color: #fff;
  font-size: 13px;
}

.composer.has-reply {
  grid-template-rows: 34px minmax(0, 1fr) 32px;
  height: 136px;
  min-height: 136px;
}

.composer.has-reply .reply-preview {
  grid-column: 1 / -1;
}

.composer.has-reply textarea {
  grid-column: 1 / -1;
}

.composer.has-reply .composer-footer {
  position: static;
  align-self: end;
  justify-self: end;
}

.announcement-strip {
  width: 600px;
  min-height: 40px;
  margin: 0;
  padding: 0 12px 0 20px;
  border: 0;
  border-radius: 0;
  background: #e8f4ff;
}

.announcement-copy {
  min-width: 0;
  white-space: nowrap;
}

.announcement-copy strong,
.announcement-copy span {
  display: inline;
  font-size: 13px;
  font-weight: 400;
}

.announcement-state {
  display: none;
}

.announcement-close {
  width: 24px;
  height: 24px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: url("assets/figma-close.png") center / 24px 24px no-repeat;
}

#file-library.workspace-surface {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 88px 40px 36px minmax(0, 1fr);
  width: 600px;
  height: 560px;
  border: 0;
  border-radius: 0 12px 12px 0;
  background: #fff;
  box-shadow: none;
}

#file-library.workspace-surface[hidden] {
  display: none;
}

#file-library .drawer-header {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 88px;
  padding: 0 20px 8px;
  border-bottom: 1px solid #f2f3f5;
  background: #fff;
}

#file-library .drawer-header::before {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 92px;
  height: 28px;
  background: url("assets/figma-window-controls.png") center / 92px 28px no-repeat;
  content: "";
}

#file-library .drawer-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 28px;
}

#file-library .drawer-header > button {
  width: 50px;
  height: 28px;
  padding: 0;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  background: #fff;
  color: #111216;
  font-size: 12px;
}

#file-library .drawer-toolbar {
  position: absolute;
  top: 52px;
  right: 78px;
  z-index: 2;
  width: 260px;
  height: 28px;
  padding: 0;
  border: 0;
}

#file-library .drawer-search,
#file-library .drawer-search input {
  width: 260px;
  height: 28px;
}

#file-library .drawer-search input {
  padding: 0 32px;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  background: #fff;
  color: #111216;
  font-size: 12px;
}

.figma-file-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  color: #8e8f93;
  font-size: 12px;
}

.figma-file-breadcrumb i::after {
  color: #c7c8cc;
  content: ">";
  font-style: normal;
}

.figma-file-breadcrumb strong {
  color: #65666a;
  font-weight: 600;
}

.figma-file-columns {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 82px 82px 112px;
  align-items: center;
  padding: 0 8px 0 12px;
  color: #8e8f93;
  font-size: 12px;
}

#file-library .file-list {
  display: grid;
  align-content: start;
  gap: 4px;
  height: auto;
  padding: 0 8px;
  overflow-y: auto;
}

#file-library .figma-file-row {
  position: relative;
  display: grid;
  grid-template-columns: 28px 44px minmax(0, 1fr) 82px 82px 112px;
  gap: 0;
  align-items: center;
  min-height: 56px;
  padding: 0 4px;
  border: 0;
  border-radius: 8px;
  background: #fff;
}

#file-library .figma-file-row:hover,
#file-library .figma-file-row:has(input:checked) {
  background: rgba(34, 109, 245, 0.08);
}

#file-library .file-select {
  display: flex;
  align-items: center;
}

#file-library .file-select input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #303847;
}

#file-library .file-type {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 40px 40px;
  color: transparent;
}

#file-library .file-type.is-folder,
#file-library .file-type.is-file {
  background-image: url("assets/figma-file-folder.png");
}

#file-library .file-type.is-video {
  background-image: url("assets/figma-file-video.png");
}

#file-library .figma-file-row > strong {
  min-width: 0;
  padding-left: 12px;
  overflow: hidden;
  color: #111216;
  font-size: 13px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#file-library .figma-file-row > small,
#file-library .figma-file-row > time {
  overflow: hidden;
  color: #8e8f93;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#file-library .figma-file-row nav {
  position: absolute;
  top: 50%;
  left: 184px;
  display: none;
  gap: 8px;
  padding: 4px;
  border-radius: 6px;
  background: #fff;
  transform: translateY(-50%);
}

#file-library .figma-file-row:hover nav,
#file-library .figma-file-row:focus-within nav {
  display: flex;
}

#file-library .figma-file-action {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #65666a;
  background: transparent;
}

#file-library .figma-file-action::before {
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 17px 16px;
  mask-size: 17px 16px;
  content: "";
}

#file-library .figma-file-action.is-cloud::before {
  -webkit-mask-image: url("assets/file-action-cloud.svg");
  mask-image: url("assets/file-action-cloud.svg");
}

#file-library .figma-file-action.is-delete::before {
  -webkit-mask-image: url("assets/file-action-delete.svg");
  mask-image: url("assets/file-action-delete.svg");
}

#file-library .figma-file-action:hover,
#file-library .figma-file-action:focus-visible {
  color: #111216;
  background: rgba(12, 24, 49, 0.06);
}

#file-library .drawer-footer {
  display: none;
}

#file-library .file-search-history {
  top: 80px;
  right: 78px;
  width: 260px;
}

#cloud-save-dialog,
#cloud-file-picker {
  padding: 0;
  overflow: hidden;
  border: 1px solid #e5e6eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 30px rgba(39, 46, 59, 0.16);
}

#cloud-save-dialog::backdrop,
#cloud-file-picker::backdrop {
  background: rgba(246, 247, 251, 0.16);
}

#cloud-save-dialog {
  display: grid;
  grid-template-rows: 60px minmax(0, 1fr) 76px;
  width: 680px;
  height: 476px;
}

#cloud-file-picker {
  display: grid;
  grid-template-rows: 60px 40px 36px minmax(0, 1fr) 76px;
  width: 720px;
  height: 480px;
}

#cloud-save-dialog:not([open]),
#cloud-file-picker:not([open]) {
  display: none;
}

#cloud-save-dialog > header,
#cloud-file-picker > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 0 24px;
  border-bottom: 1px solid #f2f3f5;
}

#cloud-save-dialog h2,
#cloud-file-picker h2 {
  margin: 0;
  color: #111216;
  font-size: 16px;
  font-weight: 600;
}

.figma-dialog-close {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: url("assets/figma-close.png") center / 24px 24px no-repeat;
}

#cloud-save-dialog .cloud-path-list {
  height: auto;
  margin: 0 24px;
  padding: 12px;
  overflow-y: auto;
  border: 1px solid #e5e6eb;
  border-radius: 12px;
}

#cloud-save-dialog .cloud-path-list > button {
  display: grid;
  grid-template-columns: 16px 36px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 4px 12px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #111216;
}

#cloud-save-dialog .cloud-path-list > button.is-child {
  padding-left: 36px;
}

#cloud-save-dialog .cloud-path-list > button:hover,
#cloud-save-dialog .cloud-path-list > button.is-selected {
  background: rgba(34, 109, 245, 0.08);
}

#cloud-save-dialog .cloud-path-list i {
  width: 8px;
  height: 8px;
  border-right: 1px solid #8e8f93;
  border-bottom: 1px solid #8e8f93;
  transform: rotate(-45deg);
}

#cloud-save-dialog .cloud-path-list i.is-expanded {
  transform: rotate(45deg) translateY(-2px);
}

.figma-cloud-folder {
  width: 36px;
  height: 36px;
  background: url("assets/figma-file-folder.png") center / 36px 36px no-repeat;
}

#cloud-save-dialog .cloud-path-list strong {
  font-size: 13px;
  font-weight: 400;
}

#cloud-save-dialog > footer,
#cloud-file-picker > footer {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr) 124px 124px;
  gap: 16px;
  align-items: center;
  padding: 0 24px;
  border-top: 1px solid #f2f3f5;
}

#cloud-save-dialog > footer button,
#cloud-file-picker > footer button {
  height: 48px;
  border: 0;
  border-radius: 10px;
  background: #f2f3f5;
  color: #65666a;
  font-size: 14px;
}

#cloud-save-dialog > footer .primary-button,
#cloud-file-picker > footer .primary-button {
  background: #303847;
  color: #fff;
}

.figma-cloud-breadcrumb {
  display: flex;
  align-items: center;
  padding: 0 24px;
  color: #8e8f93;
  font-size: 12px;
}

.figma-cloud-breadcrumb strong {
  color: #65666a;
}

.figma-cloud-breadcrumb {
  gap: 8px;
}

.figma-cloud-breadcrumb i {
  width: 6px;
  height: 6px;
  border-right: 1px solid #c7c8cc;
  border-bottom: 1px solid #c7c8cc;
  transform: rotate(-45deg);
}

.figma-cloud-columns {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 82px 130px;
  align-items: center;
  padding: 0 24px;
  color: #8e8f93;
  font-size: 12px;
}

#cloud-file-picker .cloud-picker-list {
  display: grid;
  align-content: start;
  gap: 4px;
  height: auto;
  padding: 0 12px;
  overflow-y: auto;
}

.figma-cloud-row {
  display: grid;
  grid-template-columns: 28px 44px minmax(0, 1fr) 82px 130px;
  align-items: center;
  min-height: 56px;
  padding: 0 12px;
  border-radius: 8px;
  color: #111216;
}

.figma-cloud-row:hover,
.figma-cloud-row:has(input:checked) {
  background: rgba(34, 109, 245, 0.08);
}

.figma-cloud-row input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #303847;
}

.figma-cloud-row > span {
  width: 40px;
  height: 40px;
  margin: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 40px 40px;
}

.figma-cloud-row > span.is-folder {
  background-image: url("assets/figma-file-folder.png");
}

.figma-cloud-row > span.is-video {
  background-image: url("assets/figma-file-video.png");
}

.figma-cloud-row strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.figma-cloud-row small,
.figma-cloud-row time {
  margin: 0;
  color: #8e8f93;
  font-size: 12px;
}

#cloud-file-picker > footer {
  grid-template-columns: minmax(0, 1fr) 76px;
}

#cloud-file-picker > footer .primary-button {
  grid-column: 2;
  width: 76px;
  height: 36px;
  border-radius: 8px;
}

.figma-sidebar-more,
.figma-share-icon,
.figma-finder-icon {
  display: block;
  width: 20px;
  height: 20px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
}

.figma-sidebar-more {
  background-image: url("assets/figma-header-more.png");
}

.figma-share-icon,
.figma-finder-icon {
  background-image: url("assets/figma-header-invite.png");
}

.toast-icon {
  width: 18px;
  height: 18px;
  background: url("assets/figma-toast-warning.png") center / 18px 18px no-repeat;
}

.sidebar-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--figma-border-3);
  background: var(--figma-container);
}

.sidebar-section {
  grid-template-rows: minmax(0, 1fr) auto;
}

.sidebar-footer > .icon-button {
  display: none;
}

html[data-active-entry="contacts"] .sidebar-section,
html[data-active-entry="groups"] .sidebar-section {
  grid-template-rows: minmax(0, 1fr) auto;
}

html[data-active-entry="contacts"] .sidebar-footer {
  display: grid;
}

html[data-active-entry="groups"] .sidebar-footer {
  display: grid;
}

.invite-follow-dialog {
  width: 460px;
  height: 330px;
  overflow: hidden;
  border: 1px solid #e5e6eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 30px rgba(39, 46, 59, 0.16);
}

.search-page {
  background: var(--figma-container);
  color: var(--figma-font-1);
}

.state-page {
  background: var(--figma-container);
  color: var(--figma-font-1);
}

.group-result {
  border-color: var(--figma-border-2);
  background: var(--figma-container);
  color: var(--figma-font-1);
}

.search-page > header input,
.state-page input {
  border: 1px solid var(--figma-border-2);
  background: var(--figma-container);
  color: var(--figma-font-1);
}

.state-kicker,
.state-page > p:not(.state-kicker),
.group-result > div span {
  color: var(--figma-font-3);
}

img.is-load-error {
  display: inline-block;
  border: 1px solid var(--figma-border-2);
  background: var(--figma-bg-base);
  color: transparent;
  object-fit: contain;
}

.invite-follow-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 0 20px;
  border-bottom: 1px solid #f2f3f5;
}

.invite-follow-dialog h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.invite-follow-dialog form {
  display: grid;
  grid-template-rows: auto 120px auto minmax(0, 1fr);
  height: 270px;
  padding: 20px;
}

.invite-follow-dialog label {
  color: #111216;
  font-size: 13px;
}

.invite-follow-dialog textarea {
  width: 100%;
  min-height: 120px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  background: #fff;
  color: #111216;
  font-size: 13px;
  resize: none;
}

.invite-follow-dialog .field-meta {
  margin-top: 6px;
  color: #8e8f93;
  font-size: 12px;
}

.invite-follow-dialog footer {
  align-self: end;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}

.invite-follow-dialog footer button {
  width: 76px;
  height: 36px;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  background: #fff;
  color: #111216;
}

.invite-follow-dialog footer .primary-button {
  border-color: #226df5;
  background: #226df5;
  color: #fff;
}

/* Keep the final exact-UI geometry from overriding compact viewport reflow. */
@media (max-width: 959px), (max-height: 639px) {
  .workspace,
  .scenario-stage {
    width: 100%;
    height: 100dvh;
  }
}
