.chat-page {
  position: absolute;
  inset: 0;
  z-index: 9;
  --chat-ink: #101010;
  --chat-muted: rgba(16, 16, 16, .58);
  --chat-faint: rgba(16, 16, 16, .42);
  --chat-panel-fill: rgba(255, 255, 255, .045);
  --chat-panel-fill-strong: rgba(255, 255, 255, .055);
  --chat-panel-fill-pressed: rgba(255, 255, 255, .055);
  --chat-page-background:
    linear-gradient(180deg, #f7f8f5 0%, #eef1ed 58%, #f4f5f2 100%);
  --chat-thread-border: rgba(28, 39, 35, .10);
  --chat-thread-canvas: rgba(255, 255, 255, .24);
  --chat-thread-surface: rgba(255, 255, 255, .72);
  --chat-thread-surface-strong: rgba(255, 255, 255, .90);
  --chat-thread-user-fill: #293d38;
  --chat-thread-user-ink: #fff;
  --chat-thread-bubble-fill: rgba(255, 255, 255, .82);
  --chat-thread-max-width: 860px;
  --chat-emboss-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .025),
    inset -1px -1px 0 rgba(0, 0, 0, .045);
  --chat-glass-blur: blur(18px) saturate(128%);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  height: 100%;
  min-height: 0;
  padding:
    max(54px, calc(env(safe-area-inset-top) + 40px))
    max(20px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
  color: var(--chat-ink);
  background: var(--chat-page-background);
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  isolation: isolate;
  transform: none;
  transition: none;
}

.chat-page.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: none;
}

.screen.app-icon-border-disabled .chat-page {
  --chat-panel-fill: transparent;
  --chat-panel-fill-strong: transparent;
  --chat-panel-fill-pressed: transparent;
  --chat-thread-bubble-fill: transparent;
  --chat-emboss-shadow: none;
  --chat-glass-blur: none;
}

.chat-page.editor-mode {
  background: var(--chat-page-background);
}

.chat-page.open .chat-bottom-nav {
  animation: none;
}

.chat-topbar {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.chat-icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  color: currentColor;
  border: 0;
  border-radius: 50%;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
  cursor: pointer;
}

.chat-icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.chat-action-slot {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
}

.chat-action-slot > .chat-icon-button {
  grid-area: 1 / 1;
}

.chat-create-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 12;
  display: grid;
  gap: 4px;
  width: 132px;
  padding: 6px;
  border: 0;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-create-menu[hidden] {
  display: none;
}

.chat-create-menu button {
  min-height: 36px;
  padding: 0 10px;
  color: rgba(0, 0, 0, .74);
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.chat-create-menu button:active {
  background: var(--chat-panel-fill-pressed);
  transform: translateY(1px);
}

.chat-create-menu .chat-create-verification {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-verification-badge {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  color: #fff;
  border-radius: 9px;
  background: #c8463b;
  font: 750 10px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.chat-verification-badge[hidden] {
  display: none;
}

.chat-title {
  position: relative;
  justify-self: center;
  display: grid;
  place-items: center;
  width: min(190px, 58vw);
  min-width: 0;
  min-height: 38px;
  overflow: hidden;
  padding: 8px 18px;
  color: var(--chat-ink);
  border: 0;
  border-radius: 999px;
  background: var(--chat-panel-fill-strong);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.chat-title span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-topbar .chat-icon-button,
.chat-topbar .chat-title {
  border: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.chat-topbar .chat-icon-button::after,
.chat-topbar .chat-title::after {
  content: none;
}

.chat-save[hidden],
.chat-add-contact[hidden] {
  display: none;
}

.chat-content {
  position: relative;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 2px 1px 8px;
  scrollbar-width: none;
  touch-action: pan-y;
}

.chat-content::-webkit-scrollbar,
.chat-dialog-card::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.chat-tab-panel,
.chat-home-view,
.chat-editor-view,
.chat-persona-form,
.chat-placeholder-panel {
  min-height: 0;
}

.chat-tab-panel,
.chat-placeholder-panel {
  width: 100%;
  min-height: 100%;
}

.chat-tab-panel:not(.active),
.chat-placeholder-panel:not(.active) {
  display: none;
}

.chat-tab-panel.active {
  display: block;
}

.chat-placeholder-panel.active {
  display: grid;
}

.chat-tab-panel[hidden],
.chat-home-view[hidden],
.chat-editor-view[hidden],
.chat-placeholder-panel[hidden] {
  display: none;
}

.chat-home-view,
.chat-editor-view {
  position: relative;
  display: grid;
  width: 100%;
}

.chat-home-view {
  max-width: 760px;
  margin-inline: auto;
  gap: 14px;
}

.chat-home-view:not(.active),
.chat-editor-view:not(.active) {
  display: none;
}

.chat-home-view.active,
.chat-editor-view.active {
  display: grid;
}

.chat-verification-view {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  width: min(100%, 760px);
  min-height: 100%;
  margin-inline: auto;
  padding: 6px 2px 18px;
}

.chat-verification-view:not(.active),
.chat-verification-view[hidden] {
  display: none;
}

.chat-verification-summary {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 4px 4px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, .10);
}

.chat-verification-summary > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chat-verification-summary strong {
  color: var(--chat-ink);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 18px;
  font-weight: 780;
  letter-spacing: 0;
}

.chat-verification-summary small,
.chat-verification-summary output {
  color: rgba(0, 0, 0, .45);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0;
}

.chat-verification-summary output {
  padding-bottom: 2px;
  white-space: nowrap;
}

.chat-verification-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.chat-verification-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  grid-template-areas:
    "avatar copy stamp"
    "avatar actions actions";
  align-items: center;
  gap: 7px 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, .065);
  border-radius: 8px;
  background: rgba(255, 255, 255, .64);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .055);
}

.chat-verification-item.is-focused {
  border-color: rgba(39, 92, 82, .38);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, .055),
    inset 3px 0 0 #39786d;
}

.chat-verification-avatar {
  grid-area: avatar;
  align-self: start;
  display: grid;
  place-items: center;
  width: 46px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  background: #e0e5e3;
  color: rgba(0, 0, 0, .55);
  font-size: 14px;
  font-weight: 760;
}

.chat-verification-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-verification-copy {
  grid-area: copy;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.chat-verification-copy strong,
.chat-verification-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-verification-copy strong {
  color: var(--chat-ink);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 14px;
  font-weight: 760;
}

.chat-verification-copy small {
  color: rgba(0, 0, 0, .48);
  font-size: 11px;
  font-weight: 500;
}

.chat-verification-item time {
  grid-area: stamp;
  align-self: start;
  color: rgba(0, 0, 0, .36);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.chat-verification-actions {
  grid-area: actions;
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  min-height: 30px;
}

.chat-verification-resolver {
  flex: 1 1 148px;
  width: min(168px, 100%);
  max-width: 188px;
  min-height: 30px;
  overflow: hidden;
  padding: 0 28px 0 9px;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 7px;
  background: rgba(255, 255, 255, .78);
  color: rgba(0, 0, 0, .68);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-verification-actions button {
  min-width: 58px;
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
}

.chat-verification-actions button:disabled {
  cursor: not-allowed;
  opacity: .46;
}

.chat-verification-reject {
  color: rgba(0, 0, 0, .62);
  background: rgba(0, 0, 0, .07);
}

.chat-verification-approve {
  color: #fff;
  background: #39786d;
}

.chat-verification-state {
  color: rgba(0, 0, 0, .45);
  font-size: 11px;
  font-weight: 700;
}

.chat-verification-state.status-approved {
  color: #327064;
}

.chat-verification-state.status-rejected {
  color: #8a4b46;
}

.chat-verification-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  min-height: 220px;
  color: rgba(0, 0, 0, .44);
  text-align: center;
}

.chat-verification-empty[hidden] {
  display: none;
}

.chat-verification-empty strong {
  color: var(--chat-ink);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 15px;
  font-weight: 760;
}

.chat-verification-empty small {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.chat-profile-head {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 6px 2px 2px;
}

.chat-avatar,
.chat-editor-avatar {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: rgba(0, 0, 0, .62);
  border: 0;
  border-radius: 50%;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
}

.chat-avatar {
  width: 76px;
  aspect-ratio: 1;
  font-size: 24px;
  cursor: pointer;
}

.chat-avatar img,
.chat-editor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-profile-copy {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
}

.chat-persona-button,
.chat-signature-button {
  min-width: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.chat-persona-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 20px;
  font-weight: 760;
  line-height: 1.12;
}

.chat-persona-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-persona-button svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: .68;
  transition: transform .16s ease;
}

.chat-persona-button[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.chat-signature-button {
  width: 100%;
  overflow: hidden;
  color: rgba(0, 0, 0, .56);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 13px;
  line-height: 1.35;
}

.chat-persona-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 8;
  display: grid;
  gap: 8px;
  width: min(100%, 270px);
  padding: 8px;
  border: 0;
  border-radius: 18px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-persona-menu[hidden] {
  display: none;
}

.chat-add-persona,
.chat-persona-option {
  min-width: 0;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
}

.chat-add-persona {
  display: grid;
  place-items: center;
  width: 44px;
  color: #111;
  background: var(--chat-panel-fill-strong);
  box-shadow: var(--chat-emboss-shadow);
}

.chat-add-persona svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.chat-persona-list {
  display: grid;
  gap: 7px;
}

.chat-persona-option {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 5px 10px 5px 5px;
  color: rgba(0, 0, 0, .72);
  text-align: left;
  background: transparent;
}

.chat-persona-option[aria-current="true"] {
  background: var(--chat-panel-fill-pressed);
  box-shadow: var(--chat-emboss-shadow);
}

.chat-persona-option-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.chat-persona-option-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chat-persona-option-copy strong,
.chat-persona-option-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-persona-option-copy strong {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.chat-persona-option-copy small {
  color: rgba(0, 0, 0, .44);
  font-size: 10px;
  font-weight: 720;
}

.chat-profile-pill,
.chat-collection-button,
.chat-bottom-nav,
.chat-placeholder-panel,
.chat-contact-shell,
.chat-field input,
.chat-field textarea,
.chat-field select,
.chat-birthday-button,
.chat-date-picker,
.chat-date-nav,
.chat-date-year-button,
.chat-date-year-input,
.chat-date-day,
.chat-date-today,
.chat-dialog-option,
.chat-dialog-actions button {
  border: 0;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}
.chat-icon-button,
.chat-title,
.chat-avatar,
.chat-editor-avatar,
.chat-profile-pill,
.chat-collection-button,
.chat-bottom-nav,
.chat-placeholder-panel,
.chat-contact-shell,
.chat-piano-widget,
.chat-contact-avatar,
.chat-add-contact-avatar,
.chat-date-picker,
.chat-date-nav,
.chat-date-year-button,
.chat-date-day,
.chat-date-today,
.chat-dialog-card,
.chat-dialog-option,
.chat-dialog-actions button {
  position: relative;
  background-clip: padding-box;
}

.chat-persona-menu {
  background-clip: padding-box;
}

.chat-icon-button::after,
.chat-title::after,
.chat-avatar::after,
.chat-editor-avatar::after,
.chat-persona-menu::after,
.chat-profile-pill::after,
.chat-collection-button::after,
.chat-bottom-nav::after,
.chat-placeholder-panel::after,
.chat-contact-shell::after,
.chat-piano-widget::after,
.chat-contact-avatar::after,
.chat-add-contact-avatar::after,
.chat-date-picker::after,
.chat-date-nav::after,
.chat-date-year-button::after,
.chat-date-day::after,
.chat-date-today::after,
.chat-dialog-card::after,
.chat-dialog-option::after,
.chat-dialog-actions button::after {
  content: none;
}

.chat-profile-pill {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  justify-self: center;
  width: min(100%, 330px);
  min-height: 54px;
  padding: 8px 16px;
  border-radius: 999px;
}

.chat-profile-pill span {
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 4px;
  min-width: 0;
}

.chat-profile-pill b,
.chat-profile-pill i {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.chat-profile-pill b {
  color: var(--chat-faint);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
}

.chat-profile-pill i {
  color: var(--chat-ink);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 13px;
  font-weight: 660;
}

.chat-collection-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.chat-collection-button {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: rgba(0, 0, 0, .74);
  cursor: pointer;
}

.chat-collection-button[aria-selected="true"] {
  color: var(--chat-ink);
  background: var(--chat-panel-fill-pressed);
}

.chat-collection-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.chat-collection-button span {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-collection-button small {
  display: none;
  overflow: hidden;
  color: rgba(0, 0, 0, .46);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 9px;
  font-weight: 800;
}

.chat-collection-panel {
  min-height: 156px;
}

.chat-collection-panel[hidden] {
  display: none;
}

.chat-collection-empty,
.chat-placeholder-panel {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  color: var(--chat-muted);
  text-align: center;
}

.chat-placeholder-panel {
  min-height: clamp(280px, 56dvh, 460px);
  border-radius: 8px;
}

.chat-collection-empty strong,
.chat-favorites-empty strong,
.chat-placeholder-panel strong {
  color: var(--chat-ink);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 16px;
  line-height: 1.2;
}

.chat-collection-empty small,
.chat-favorites-empty small,
.chat-placeholder-panel small {
  color: var(--chat-faint);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 800;
}

.chat-collection-empty > svg,
.chat-favorites-empty svg,
.chat-placeholder-panel svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.chat-collection-empty > svg {
  width: 34px;
  height: 34px;
}

.chat-favorites-empty svg {
  width: 30px;
  height: 30px;
}

.chat-favorites-view {
  display: grid;
  align-content: start;
  gap: 10px;
}

.chat-favorites-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 2px 2px 4px;
}


.chat-favorites-head strong {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 15px;
  font-weight: 700;
}

.chat-favorites-head > span {
  min-width: 28px;
  color: var(--chat-faint);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.chat-favorite-list {
  display: grid;
  gap: 8px;
}

.chat-favorite-item {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px 42px 12px 12px;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
}

.chat-favorite-item > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.chat-favorite-item > header > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.chat-favorite-item strong,
.chat-favorite-item small,
.chat-favorite-item time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-favorite-item strong {
  color: var(--chat-ink);
  font-size: 12px;
  font-weight: 650;
}

.chat-favorite-item small,
.chat-favorite-item time {
  color: var(--chat-faint);
  font-size: 10px;
  font-weight: 500;
}

.chat-favorite-item > p {
  margin: 0;
  color: var(--chat-ink);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chat-favorite-quote {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 7px 9px;
  color: var(--chat-muted);
  border-left: 2px solid rgba(0, 0, 0, .18);
  font-size: 11px;
  line-height: 1.4;
}

.chat-favorite-quote strong,
.chat-favorite-quote span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-favorite-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--chat-faint);
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.chat-favorites-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 112px;
  padding: 18px;
  color: var(--chat-faint);
  text-align: center;
}

.chat-favorites-empty[hidden] {
  display: none;
}


.chat-placeholder-panel svg {
  width: 70px;
  height: 70px;
  padding: 15px;
  color: var(--chat-faint);
  border: 0;
  border-radius: 22px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-messages-view,
.chat-contacts-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  min-height: 100%;
}

.chat-messages-view.active,
.chat-contacts-view.active {
  display: grid;
}

.chat-signal-widget {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 116px;
  padding: 14px 16px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-signal-widget::before,
.chat-signal-widget::after {
  content: "";
  position: absolute;
  inset-inline: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .36), transparent);
  pointer-events: none;
}

.chat-signal-widget::before {
  top: 8px;
}

.chat-signal-widget::after {
  bottom: 8px;
}

.chat-signal-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  color: rgba(0, 0, 0, .72);
}

.chat-signal-copy-right {
  justify-items: end;
  text-align: right;
}

.chat-signal-copy small,
.chat-signal-copy span,
.chat-signal-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-signal-copy small,
.chat-signal-copy span {
  color: rgba(0, 0, 0, .48);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 820;
  line-height: 1;
}

.chat-signal-copy strong {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
}

.chat-signal-copy-right strong {
  max-width: 100%;
  font-size: 15px;
  font-style: italic;
}

.chat-target-label {
  display: inline-grid;
  grid-template-columns: 8px auto;
  align-items: center;
  justify-content: end;
  gap: 6px;
}

.chat-target-label i {
  display: block;
  width: 7px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  animation: chat-target-breathe 1.9s ease-in-out infinite;
}

.chat-widget-photo-stack {
  position: relative;
  z-index: 1;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 86px;
  height: 68px;
  isolation: isolate;
}

.chat-widget-photo-card {
  position: absolute;
  display: grid;
  place-items: center;
  width: 58px;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  color: rgba(0, 0, 0, .48);
  border: 0;
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .50), rgba(255, 255, 255, .12)),
    var(--chat-panel-fill);
  box-shadow:
    8px 10px 20px rgba(0, 0, 0, .10),
    var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
  cursor: pointer;
  transform-origin: center;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    filter .18s ease;
}

.chat-widget-photo-card-left {
  transform: translateX(-12px) rotate(-5deg);
  z-index: 1;
}

.chat-widget-photo-card-right {
  transform: translateX(12px) rotate(5deg);
  z-index: 2;
}

.chat-widget-photo-card:hover,
.chat-widget-photo-card:focus-visible {
  z-index: 3;
  filter: saturate(1.08) contrast(1.02);
}

.chat-widget-photo-card-left:hover,
.chat-widget-photo-card-left:focus-visible {
  transform: translateX(-14px) translateY(-2px) rotate(-3deg) scale(1.035);
}

.chat-widget-photo-card-right:hover,
.chat-widget-photo-card-right:focus-visible {
  transform: translateX(14px) translateY(-2px) rotate(3deg) scale(1.035);
}

.chat-widget-photo-card:active {
  box-shadow:
    5px 7px 14px rgba(0, 0, 0, .10),
    var(--chat-emboss-shadow);
}

.chat-widget-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-widget-photo-card img[hidden],
.chat-widget-photo-card i[hidden] {
  display: none !important;
}

.chat-widget-photo-card i {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .72) 0 3px, transparent 4px),
    linear-gradient(135deg, transparent 0 54%, rgba(0, 0, 0, .12) 55% 56%, transparent 57%),
    linear-gradient(35deg, rgba(0, 0, 0, .11) 0 28%, transparent 29% 100%),
    linear-gradient(145deg, rgba(255, 255, 255, .36), rgba(0, 0, 0, .10));
}

.chat-widget-photo-card i::after {
  content: "+";
  position: absolute;
  right: 6px;
  bottom: 4px;
  color: rgba(0, 0, 0, .54);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 760;
  line-height: 1;
}

.chat-message-shell {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 0;
}

.chat-message-list {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
}

.chat-message-shell > .chat-status {
  justify-self: center;
  max-width: min(100%, 320px);
  margin: 0;
  text-align: center;
}

.chat-message-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 7px 9px;
  color: rgba(0, 0, 0, .78);
  border: 0;
  border-radius: 8px;
  background: var(--chat-thread-bubble-fill);
  box-shadow: var(--chat-emboss-shadow);
  text-align: left;
  cursor: pointer;
}

.chat-message-row:active {
  transform: translateY(1px);
}

.chat-message-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: var(--chat-thread-bubble-fill);
  box-shadow: var(--chat-emboss-shadow);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 850;
}

.chat-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-message-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.chat-message-copy strong,
.chat-message-copy small,
.chat-message-row time {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-message-copy strong {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 15px;
  font-weight: 700;
}

.chat-message-copy small,
.chat-message-row time {
  color: rgba(0, 0, 0, .45);
  font-size: 10px;
  font-weight: 780;
}

.chat-message-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 154px;
  padding: 18px;
  color: rgba(0, 0, 0, .52);
  text-align: center;
  pointer-events: none;
}

.chat-message-empty[hidden] {
  display: none;
}

.chat-message-empty strong {
  color: #111;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 16px;
}

.chat-message-empty small {
  color: rgba(0, 0, 0, .44);
  font-size: 10px;
  font-weight: 800;
}


@keyframes chat-target-breathe {
  0%, 100% {
    opacity: .42;
    transform: scale(.78);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, .10);
  }

  50% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(0, 0, 0, .045);
  }
}

.chat-piano-widget {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  height: clamp(82px, 18dvh, 128px);
  min-height: 82px;
  padding: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-piano-widget::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .30), rgba(255, 255, 255, .08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .64),
    inset 0 -12px 18px rgba(0, 0, 0, .045);
  pointer-events: none;
}

.chat-piano-white-keys {
  position: absolute;
  inset: 8px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  pointer-events: none;
}

.chat-piano-white-keys span {
  min-width: 0;
  border: 0;
  border-radius: 7px 7px 5px 5px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .40), rgba(255, 255, 255, .13)),
    rgba(255, 255, 255, .18);
  box-shadow: var(--chat-emboss-shadow);
}

.chat-piano-key {
  position: relative;
  z-index: 2;
  min-width: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.chat-piano-key:focus-visible {
  outline: 1px solid rgba(0, 0, 0, .34);
  outline-offset: -5px;
}

.chat-piano-key-white {
  min-height: 100%;
}

.chat-piano-key-white:active,
.chat-piano-key-white.playing {
  background: rgba(255, 255, 255, .22);
  box-shadow: inset 0 8px 16px rgba(0, 0, 0, .055);
}

.chat-piano-key-black {
  position: absolute;
  top: 8px;
  z-index: 3;
  width: calc((100% - 16px) / 8 * .58);
  height: 58%;
  border-radius: 0 0 7px 7px;
  background:
    linear-gradient(180deg, rgba(28, 28, 28, .48), rgba(10, 10, 10, .32)),
    rgba(255, 255, 255, .12);
  box-shadow:
    6px 8px 14px rgba(0, 0, 0, .12),
    inset 1px 1px 0 rgba(255, 255, 255, .22),
    inset -1px -1px 0 rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-piano-key-black[data-chat-note="Db4"] {
  left: calc(8px + (100% - 16px) / 8 * .72);
}

.chat-piano-key-black[data-chat-note="Eb4"] {
  left: calc(8px + (100% - 16px) / 8 * 1.72);
}

.chat-piano-key-black[data-chat-note="Gb4"] {
  left: calc(8px + (100% - 16px) / 8 * 3.72);
}

.chat-piano-key-black[data-chat-note="Ab4"] {
  left: calc(8px + (100% - 16px) / 8 * 4.72);
}

.chat-piano-key-black[data-chat-note="Bb4"] {
  left: calc(8px + (100% - 16px) / 8 * 5.72);
}

.chat-piano-key-black:active,
.chat-piano-key-black.playing {
  transform: translateY(1px);
  box-shadow:
    4px 5px 10px rgba(0, 0, 0, .13),
    inset 1px 1px 0 rgba(255, 255, 255, .16),
    inset -1px -1px 0 rgba(0, 0, 0, .34);
}

.chat-contact-shell {
  position: relative;
  min-height: 0;
  padding: 10px 22px 10px 10px;
  overflow: hidden;
  border-radius: 8px;
}

.chat-contact-list {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 100%;
  padding-bottom: 2px;
}

.chat-contact-group {
  display: grid;
  align-content: start;
  gap: 4px;
}

.chat-contact-letter {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  color: rgba(0, 0, 0, .45);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  background:
    linear-gradient(180deg, rgba(249, 249, 247, .58), rgba(249, 249, 247, .26)),
    transparent;
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-contact-row,
.chat-add-contact-option {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  color: rgba(0, 0, 0, .78);
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.chat-contact-row:active,
.chat-add-contact-option:active {
  transform: translateY(1px);
}

.chat-contact-avatar,
.chat-add-contact-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 850;
}

.chat-contact-avatar img,
.chat-add-contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-contact-copy,
.chat-add-contact-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.chat-contact-copy strong,
.chat-contact-copy small,
.chat-add-contact-copy strong,
.chat-add-contact-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-contact-copy strong,
.chat-add-contact-copy strong {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 15px;
  font-weight: 700;
}

.chat-contact-copy small,
.chat-add-contact-copy small {
  color: rgba(0, 0, 0, .45);
  font-size: 10px;
  font-weight: 780;
}

.chat-contact-index {
  position: absolute;
  top: 4px;
  right: 0;
  z-index: 5;
  display: grid;
  gap: 1px;
  width: 16px;
  justify-items: center;
  padding-block: 2px;
}

.chat-contact-index button {
  display: grid;
  place-items: center;
  width: 16px;
  min-height: 12px;
  color: rgba(0, 0, 0, .48);
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}

.chat-contact-index button:active {
  color: #111;
  background: rgba(255, 255, 255, .40);
}

.chat-contact-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 154px;
  padding: 18px;
  color: rgba(0, 0, 0, .52);
  text-align: center;
}

.chat-contact-empty[hidden] {
  display: none;
}

.chat-contact-empty strong {
  color: #111;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 16px;
}

.chat-contact-empty small {
  color: rgba(0, 0, 0, .44);
  font-size: 10px;
  font-weight: 800;
}

.chat-add-contact-card {
  gap: 10px;
}

.chat-add-contact-list {
  display: grid;
  gap: 5px;
  max-height: min(48dvh, 360px);
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: none;
}

.chat-add-contact-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.chat-group-card {
  gap: 12px;
}

.chat-group-membership-card {
  gap: 12px;
}

.chat-group-membership-card .chat-group-participant-list {
  max-height: min(42dvh, 330px);
}

.chat-group-membership-empty {
  display: grid;
  place-items: center;
  min-height: 84px;
  margin: 0;
  color: rgba(0, 0, 0, .45);
  font-size: 11px;
  font-weight: 650;
  text-align: center;
}

.chat-group-profile {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.chat-group-avatar {
  display: grid;
  place-items: center;
  width: 78px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}

.chat-group-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-group-avatar-fields {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.chat-group-avatar-clear {
  justify-self: start;
  min-height: 30px;
  padding: 0 10px;
  color: rgba(0, 0, 0, .62);
  border: 0;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
  font-size: 12px;
  cursor: pointer;
}


.chat-group-participants {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.chat-group-participants-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.chat-group-participants-head strong {
  color: rgba(0, 0, 0, .74);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 14px;
}

.chat-group-participants-head small {
  color: rgba(0, 0, 0, .42);
  font-size: 10px;
  font-weight: 800;
}

.chat-group-participant-list {
  display: grid;
  gap: 5px;
  max-height: min(32dvh, 260px);
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: none;
}

.chat-group-participant-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.chat-group-participant-option {
  display: grid;
  grid-template-columns: 18px 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 54px;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  color: rgba(0, 0, 0, .78);
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
  cursor: pointer;
}

.chat-group-participant-option input {
  width: 16px;
  height: 16px;
  accent-color: #181818;
}

.chat-group-participant-option-fixed {
  cursor: default;
}

.chat-group-participant-option-fixed input {
  opacity: .68;
}

.chat-group-owner-field select {
  cursor: pointer;
}

.chat-group-owner-field select:invalid {
  color: rgba(0, 0, 0, .46);
}

.chat-group-participant-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 850;
}

.chat-group-participant-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-group-participant-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.chat-group-participant-copy strong,
.chat-group-participant-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-group-participant-copy strong {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 15px;
  font-weight: 700;
}

.chat-group-participant-copy small {
  color: rgba(0, 0, 0, .45);
  font-size: 10px;
  font-weight: 780;
}

.chat-editor-view {
  display: grid;
  min-height: 100%;
}

.chat-persona-form {
  display: grid;
  gap: 14px;
  padding-bottom: 8px;
}

.chat-page.editor-mode .chat-content {
  padding-bottom: 14px;
}

.chat-page.editor-mode .chat-editor-avatar {
  border: 0;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-page.editor-mode .chat-field input,
.chat-page.editor-mode .chat-field textarea,
.chat-page.editor-mode .chat-field select,
.chat-page.editor-mode .chat-birthday-button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background-clip: padding-box;
  background: var(--chat-panel-fill-strong);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
  transition: none;
}

.chat-page.editor-mode .chat-field input:focus,
.chat-page.editor-mode .chat-field textarea:focus,
.chat-page.editor-mode .chat-field select:focus-visible,
.chat-page.editor-mode .chat-birthday-button:focus-visible {
  box-shadow: var(--chat-emboss-shadow);
}

.chat-page.editor-mode .chat-field textarea {
  resize: none;
}

.chat-page.editor-mode .chat-field > span {
  color: rgba(0, 0, 0, .62);
}

.chat-page.editor-mode .chat-pulse-divider {
  display: grid;
}

.chat-editor-profile {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.chat-editor-avatar {
  width: 86px;
  aspect-ratio: 1;
  cursor: pointer;
}

.chat-editor-fields {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.chat-editor-fields .chat-field {
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.chat-editor-fields .chat-field input {
  min-height: 32px;
  padding: 6px 10px;
}

.chat-identity-row {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.chat-identity-row .chat-field {
  min-width: 0;
}

.chat-public-figure-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: max-content 30px;
  align-items: center;
  justify-self: start;
  gap: 3px;
  width: auto;
  min-height: 28px;
  cursor: pointer;
}

.chat-public-figure-copy {
  color: rgba(0, 0, 0, .62);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.chat-editor-fields .chat-public-figure-toggle input,
.chat-page.editor-mode .chat-public-figure-toggle input {
  position: absolute;
  inset: 0;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  cursor: pointer;
}

.chat-public-figure-mark {
  position: relative;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  justify-self: center;
  border: 1.5px solid rgba(0, 0, 0, .68);
  border-radius: 50%;
  background: transparent;
}

.chat-public-figure-toggle input:checked + .chat-public-figure-mark {
  border-color: #171717;
  background: #171717;
}

.chat-public-figure-toggle input:checked + .chat-public-figure-mark::after {
  position: absolute;
  top: 2px;
  left: 5px;
  width: 3px;
  height: 7px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  content: "";
  transform: rotate(45deg);
}

.chat-public-figure-toggle input:focus-visible + .chat-public-figure-mark {
  outline: 2px solid rgba(16, 16, 16, .68);
  outline-offset: 2px;
}

.chat-pulse-divider {
  display: grid;
  place-items: center;
  height: 42px;
  margin-block: 1px;
  overflow: hidden;
}

.chat-pulse-divider svg {
  width: min(66%, 360px);
  height: 42px;
}

.chat-pulse-divider path {
  fill: none;
  stroke: rgba(0, 0, 0, .35);
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-detail-stack {
  display: grid;
  gap: 12px;
}

.chat-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.chat-field > span {
  color: rgba(0, 0, 0, .58);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 12px;
  font-weight: 650;
}

.chat-field input,
.chat-field textarea,
.chat-field select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  color: #101010;
  border-radius: 8px;
  outline: none;
  font: inherit;
  line-height: 1.35;
}

.chat-field textarea {
  min-height: 116px;
  resize: vertical;
}

.chat-field select {
  appearance: none;
}

.chat-birthday-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  color: #101010;
  cursor: pointer;
}

.chat-birthday-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.chat-birthday-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.chat-status {
  min-height: 18px;
  margin: 0;
  color: rgba(0, 0, 0, .52);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 12px;
  line-height: 1.35;
}

.chat-status[data-tone="error"] {
  color: #a83b34;
}

.chat-status[data-tone="success"] {
  color: #2f715c;
}

.chat-bottom-nav {
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(4, 46px);
  gap: 7px;
  min-height: 58px;
  padding: 6px;
  border-radius: 999px;
}

.chat-tab-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: rgba(0, 0, 0, .50);
  border-radius: 50%;
  cursor: pointer;
  transition: color .16s ease, background .16s ease, box-shadow .16s ease, transform .12s ease;
}

.chat-tab-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.chat-tab-button[aria-selected="true"] {
  color: var(--chat-ink);
  background: var(--chat-panel-fill-pressed);
  box-shadow: var(--chat-emboss-shadow);
}

.chat-tab-button:active,
.chat-collection-button:active,
.chat-persona-option:active,
.chat-add-persona:active,
.chat-icon-button:active,
.chat-group-avatar:active,
.chat-group-avatar-clear:active,
.chat-dialog-option:active,
.chat-dialog-actions button:active {
  transform: translateY(1px);
}

.chat-dialog {
  position: absolute;
  inset: 0;
  z-index: 36;
  display: grid;
  place-items: end center;
  padding:
    max(24px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  background: rgba(247, 247, 245, .38);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.chat-dialog.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.chat-dialog-card {
  display: grid;
  gap: 12px;
  width: min(100%, 430px);
  max-height: min(82dvh, 680px);
  overflow-y: auto;
  padding: 18px;
  color: var(--chat-ink);
  border: 0;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  transform: translateY(18px) scale(.985);
  transition: none;
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-dialog.open .chat-dialog-card {
  transform: translateY(0) scale(1);
}

.chat-message-action-dialog {
  place-items: center;
}

.chat-message-action-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  width: min(100%, 390px);
  overflow: hidden;
  padding: 6px;
  border-radius: 8px;
  background: rgba(250, 250, 248, .94);
  box-shadow: 0 18px 54px rgba(0, 0, 0, .18);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-message-action-card button {
  min-width: 0;
  min-height: 52px;
  padding: 0 4px;
  color: rgba(0, 0, 0, .72);
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}

.chat-message-action-card button:active {
  background: rgba(0, 0, 0, .055);
}

.chat-message-action-card button.danger {
  color: #a23a34;
}

.chat-message-edit-card {
  gap: 8px;
  width: min(100%, 430px);
  max-height: min(calc(var(--chat-visual-height, 100dvh) - 24px), 680px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f5f5f3;
  box-shadow: 0 18px 54px rgba(0, 0, 0, .20);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.chat-message-edit-dialog {
  inset: var(--chat-visual-top, 0px) 0 auto;
  height: var(--chat-visual-height, 100dvh);
  place-items: center;
  padding:
    max(12px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
}

.chat-message-edit-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.chat-message-edit-field > span {
  color: var(--chat-muted);
  font-size: 11px;
  font-weight: 600;
}

.chat-message-edit-attachment {
  min-width: 0;
  padding: 8px 10px;
  color: rgba(0, 0, 0, .58);
  border-radius: 7px;
  background: rgba(0, 0, 0, .06);
  font-size: 11px;
  line-height: 1.4;
}

.chat-message-edit-attachment[hidden] {
  display: none;
}

.chat-message-edit-attachment {
  display: grid;
  gap: 3px;
}

.chat-message-edit-attachment strong,
.chat-message-edit-attachment span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-message-edit-attachment strong {
  color: var(--chat-ink);
  font-size: 11px;
  font-weight: 650;
}

.chat-message-edit-card textarea {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 132px;
  max-height: min(48dvh, 320px);
  resize: vertical;
  overflow-y: auto;
  padding: 12px;
  color: var(--chat-ink);
  border: 0;
  border-radius: 8px;
  outline: 0;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
}

.chat-message-edit-card .chat-dialog-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-top: 8px;
  background: #f5f5f3;
}

.chat-message-edit-card textarea:focus-visible {
  box-shadow:
    var(--chat-emboss-shadow),
    0 0 0 1px rgba(0, 0, 0, .18);
}

.chat-message-edit-card .chat-status:empty {
  display: none;
}

.chat-message-forward-card {
  gap: 8px;
  background: #f5f5f3;
  box-shadow: 0 18px 54px rgba(0, 0, 0, .20);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.chat-message-forward-list {
  display: grid;
  gap: 6px;
  max-height: min(58dvh, 430px);
  overflow-y: auto;
  scrollbar-width: none;
}

.chat-message-forward-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.chat-message-forward-option {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 10px;
  color: var(--chat-ink);
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, .055),
    0 5px 14px rgba(0, 0, 0, .045);
  text-align: left;
  cursor: pointer;
}

.chat-message-forward-option > span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chat-message-forward-option strong,
.chat-message-forward-option small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-message-forward-option strong {
  font-size: 13px;
  font-weight: 600;
}

.chat-message-forward-option small {
  color: var(--chat-faint);
  font-size: 10px;
  font-weight: 500;
}

.chat-dialog-card header h2,
.chat-dialog-card header p {
  margin: 0;
}

.chat-dialog-card header h2 {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 17px;
  line-height: 1.25;
}

.chat-dialog-card header p {
  margin-top: 4px;
  color: rgba(0, 0, 0, .46);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.chat-dialog-option {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 0 14px;
  color: rgba(0, 0, 0, .72);
  border-radius: 8px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
  cursor: pointer;
}

.chat-dialog-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.chat-dialog-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.chat-avatar-source-card .chat-dialog-actions,
.chat-persona-action-card .chat-dialog-actions {
  grid-template-columns: minmax(0, 1fr);
}

.chat-dialog-actions button {
  min-height: 40px;
  padding: 0 14px;
  color: rgba(0, 0, 0, .68);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.chat-dialog-actions button[type="submit"] {
  color: #f8f7f4;
  background: rgba(20, 20, 20, .78);
}

.chat-dialog-actions .chat-dialog-danger {
  justify-self: start;
  color: #a13434;
}
.chat-danger-option {
  color: #9f2d2d;
}

.chat-date-picker {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
}

.chat-date-header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
}

.chat-date-nav {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
}

.chat-date-nav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.chat-date-title {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, auto);
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #101010;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 760;
}

.chat-date-year-button,
.chat-date-year-input {
  width: 76px;
  min-width: 0;
  height: 34px;
  border-radius: 999px;
  color: inherit;
  text-align: center;
  font: inherit;
}

.chat-date-year-button {
  cursor: pointer;
}

.chat-date-year-input {
  padding: 0 8px;
  outline: none;
}

.chat-date-year-input[hidden] {
  display: none;
}

.chat-date-weekdays,
.chat-date-day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.chat-date-weekdays span {
  display: grid;
  place-items: center;
  min-height: 20px;
  color: rgba(0, 0, 0, .42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 800;
}

.chat-date-day,
.chat-date-day-spacer {
  aspect-ratio: 1;
  min-width: 0;
  min-height: 30px;
}

.chat-date-day {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(0, 0, 0, .72);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.chat-date-day[aria-selected="true"] {
  color: #f8f7f4;
  background: rgba(20, 20, 20, .82);
  box-shadow:
    4px 6px 14px rgba(0, 0, 0, .12),
    inset 1px 1px 0 rgba(255, 255, 255, .18),
    inset -1px -1px 0 rgba(0, 0, 0, .24);
}

.chat-date-today {
  justify-self: center;
  min-width: 94px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(0, 0, 0, .66);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.chat-icon-button:focus-visible,
.chat-create-menu button:focus-visible,
.chat-persona-button:focus-visible,
.chat-signature-button:focus-visible,
.chat-avatar:focus-visible,
.chat-group-avatar:focus-visible,
.chat-group-avatar-clear:focus-visible,
.chat-group-settings-avatar:focus-visible,
.chat-group-settings-name:focus-visible,

.chat-group-settings-qr-button:focus-visible,
.chat-group-settings-alias-control button:focus-visible,

.chat-group-qr-forward:focus-visible,
.chat-group-qr-forward-option:focus-visible,

.chat-group-participant-option:focus-within,
.chat-collection-button:focus-visible,
.chat-tab-button:focus-visible,
.chat-editor-avatar:focus-visible,
.chat-birthday-button:focus-visible,
.chat-date-nav:focus-visible,
.chat-date-year-button:focus-visible,
.chat-date-year-input:focus-visible,
.chat-date-day:focus-visible,
.chat-date-today:focus-visible,
.chat-dialog-option:focus-visible,
.chat-message-row:focus-visible,
.chat-contact-row:focus-visible,
.chat-add-contact-option:focus-visible,
.chat-contact-index button:focus-visible,
.chat-dialog-actions button:focus-visible {
  outline: 1px solid rgba(0, 0, 0, .34);
  outline-offset: 3px;
}

.chat-field input:focus,
.chat-field textarea:focus,
.chat-field select:focus-visible {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .chat-target-label i {
    animation: none;
  }

  .chat-widget-photo-card {
    transition: none;
  }
}

@keyframes chat-float-in {
  from {
    transform: translateY(12px);
  }

  to {
    transform: translateY(0);
  }
}

@media (max-width: 460px) {
  .chat-page {
    padding:
      max(50px, calc(env(safe-area-inset-top) + 36px))
      max(16px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
  }

  .chat-profile-head {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
  }

  .chat-avatar {
    width: 68px;
  }

  .chat-persona-button {
    font-size: 18px;
  }

  .chat-profile-pill {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 310px);
    border-radius: 999px;
  }

  .chat-collection-nav {
    gap: 7px;
  }

  .chat-collection-button {
    grid-template-columns: 16px minmax(0, 1fr);
    min-height: 32px;
    padding: 0 9px;
  }

  .chat-collection-button svg {
    width: 15px;
    height: 15px;
  }

  .chat-collection-button span {
    font-size: 10px;
    text-align: left;
  }

  .chat-editor-profile,
  .chat-group-profile {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
  }

  .chat-editor-avatar,
  .chat-group-avatar {
    width: 78px;
  }

  .chat-editor-fields .chat-field {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 7px;
  }


  .chat-field input,
  .chat-field textarea,
  .chat-field select {
    font-size: 13px;
  }

  .chat-pulse-divider svg {
    width: 78%;
  }

  .chat-signal-widget {
    grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
    gap: 8px;
    min-height: 98px;
    padding: 12px 10px;
  }

  .chat-signal-copy strong {
    font-size: 22px;
  }

  .chat-signal-copy-right strong {
    font-size: 13px;
  }

  .chat-widget-photo-stack {
    width: 70px;
    height: 58px;
  }

  .chat-widget-photo-card {
    width: 50px;
    border-radius: 9px;
  }

  .chat-widget-photo-card-left {
    transform: translateX(-9px) rotate(-5deg);
  }

  .chat-widget-photo-card-right {
    transform: translateX(9px) rotate(5deg);
  }


  .chat-piano-widget {
    height: 88px;
  }

  .chat-message-row,
  .chat-contact-row,
  .chat-add-contact-option,
  .chat-group-participant-option {
    min-height: 52px;
    padding-inline: 6px;
  }
}

html.night-mode .chat-page {
  --chat-ink: #f5efe5;
  --chat-muted: rgba(245, 239, 229, .58);
  --chat-faint: rgba(245, 239, 229, .42);
  --chat-panel-fill: rgba(238, 244, 255, .012);
  --chat-panel-fill-strong: rgba(238, 244, 255, .018);
  --chat-panel-fill-pressed: rgba(238, 244, 255, .018);
  --chat-page-background:
    linear-gradient(180deg, #1a1d1b 0%, #111412 58%, #171a18 100%);
  --chat-thread-border: rgba(235, 240, 235, .11);
  --chat-thread-canvas: rgba(255, 255, 255, .018);
  --chat-thread-surface: rgba(45, 49, 46, .76);
  --chat-thread-surface-strong: rgba(39, 43, 40, .94);
  --chat-thread-user-fill: #e8ebe5;
  --chat-thread-user-ink: #151816;
  --chat-thread-bubble-fill: rgba(35, 36, 38, .78);
  --chat-emboss-shadow:
    inset 0 0 0 1px rgba(238, 244, 255, .016),
    inset -1px -1px 0 rgba(0, 0, 0, .30);
  --chat-glass-blur: blur(18px) saturate(112%);
  color: var(--chat-ink);
  background: var(--chat-page-background);
}

html.night-mode .chat-page.editor-mode {
  background: var(--chat-page-background);
}

html.night-mode .chat-title,
html.night-mode .chat-profile-pill i,
html.night-mode .chat-collection-empty strong,
html.night-mode .chat-placeholder-panel strong,
html.night-mode .chat-message-empty strong,
html.night-mode .chat-signal-copy strong,
html.night-mode .chat-group-participants-head strong,
html.night-mode .chat-dialog-card header h2,
html.night-mode .chat-field input,
html.night-mode .chat-field textarea,
html.night-mode .chat-field select,
html.night-mode .chat-birthday-button,
html.night-mode .chat-date-title {
  color: #f5efe5;
}

html.night-mode .chat-avatar,
html.night-mode .chat-title,
html.night-mode .chat-editor-avatar,
html.night-mode .chat-persona-menu,
html.night-mode .chat-create-menu,
html.night-mode .chat-group-avatar,
html.night-mode .chat-group-avatar-clear,
html.night-mode .chat-profile-pill,
html.night-mode .chat-collection-button,
html.night-mode .chat-bottom-nav,
html.night-mode .chat-placeholder-panel,
html.night-mode .chat-signal-widget,
html.night-mode .chat-contact-shell,
html.night-mode .chat-piano-widget,
html.night-mode .chat-message-avatar,
html.night-mode .chat-contact-avatar,
html.night-mode .chat-add-contact-avatar,
html.night-mode .chat-group-participant-avatar,
html.night-mode .chat-field input,
html.night-mode .chat-field textarea,
html.night-mode .chat-field select,
html.night-mode .chat-birthday-button,
html.night-mode .chat-date-picker,
html.night-mode .chat-date-nav,
html.night-mode .chat-date-year-button,
html.night-mode .chat-date-year-input,
html.night-mode .chat-date-day,
html.night-mode .chat-date-today,
html.night-mode .chat-dialog-option,
html.night-mode .chat-dialog-actions button {
  color: rgba(245, 239, 229, .78);
}

html.night-mode .chat-dialog-actions .chat-dialog-danger {
  color: #ef9993;
}
html.night-mode .chat-dialog {
  background: rgba(10, 10, 10, .44);
}

html.night-mode .chat-dialog-card {
  color: var(--chat-ink);
}

html.night-mode .chat-signature-button,
html.night-mode .chat-profile-pill b,
html.night-mode .chat-collection-button small,
html.night-mode .chat-collection-empty small,
html.night-mode .chat-placeholder-panel small,
html.night-mode .chat-message-empty small,
html.night-mode .chat-signal-copy small,
html.night-mode .chat-signal-copy span,
html.night-mode .chat-group-participants-head small,
html.night-mode .chat-field > span,
html.night-mode .chat-status,
html.night-mode .chat-date-weekdays span,
html.night-mode .chat-date-today {
  color: rgba(245, 239, 229, .56);
}

html.night-mode .chat-date-day[aria-selected="true"] {
  color: #141414;
  background: rgba(245, 239, 229, .86);
}

html.night-mode .chat-piano-white-keys span {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04)),
    rgba(255, 255, 255, .06);
  box-shadow: var(--chat-emboss-shadow);
}

html.night-mode .chat-piano-key-black {
  background:
    linear-gradient(180deg, rgba(245, 239, 229, .18), rgba(0, 0, 0, .28)),
    rgba(255, 255, 255, .08);
}

html.night-mode .chat-contact-letter {
  color: rgba(245, 239, 229, .50);
  background:
    linear-gradient(180deg, rgba(18, 18, 18, .78), rgba(18, 18, 18, .48)),
    transparent;
}

html.night-mode .chat-message-row,
html.night-mode .chat-contact-row,
html.night-mode .chat-add-contact-option,
html.night-mode .chat-group-participant-option,
html.night-mode .chat-message-empty strong,
html.night-mode .chat-contact-empty strong {
  color: #f5efe5;
}

html.night-mode .chat-message-copy small,
html.night-mode .chat-message-row time,
html.night-mode .chat-contact-copy small,
html.night-mode .chat-add-contact-copy small,
html.night-mode .chat-group-participant-copy small,
html.night-mode .chat-message-empty,
html.night-mode .chat-message-empty small,
html.night-mode .chat-contact-empty,
html.night-mode .chat-contact-empty small,
html.night-mode .chat-contact-index button {
  color: rgba(245, 239, 229, .52);
}

html.night-mode .chat-danger-option {
  color: #f09a94;
}

html.night-mode .chat-page.editor-mode .chat-field input,
html.night-mode .chat-page.editor-mode .chat-field textarea,
html.night-mode .chat-page.editor-mode .chat-field select,
html.night-mode .chat-page.editor-mode .chat-birthday-button {
  background: var(--chat-panel-fill-strong);
  box-shadow: var(--chat-emboss-shadow);
}

html.night-mode .chat-page.editor-mode .chat-editor-avatar {
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
}

html.night-mode .chat-page.editor-mode .chat-field > span {
  color: rgba(245, 239, 229, .66);
}

html.night-mode .chat-public-figure-mark {
  border-color: rgba(245, 239, 229, .68);
}

html.night-mode .chat-public-figure-copy {
  color: rgba(245, 239, 229, .66);
}

html.night-mode .chat-public-figure-toggle input:checked + .chat-public-figure-mark {
  border-color: #f5efe5;
  background: #f5efe5;
}

html.night-mode .chat-public-figure-toggle input:checked + .chat-public-figure-mark::after {
  border-color: #141414;
}

html.night-mode .chat-public-figure-toggle input:focus-visible + .chat-public-figure-mark {
  outline-color: rgba(245, 239, 229, .74);
}

html.night-mode .chat-pulse-divider path {
  stroke: rgba(245, 239, 229, .36);
}

html.night-mode .chat-create-menu button,
html.night-mode .chat-group-avatar-clear {
  color: rgba(245, 239, 229, .78);
}

html.night-mode .chat-group-participant-option input {
  accent-color: #f5efe5;
}

html.night-mode .chat-target-label i {
  box-shadow: 0 0 0 0 rgba(245, 239, 229, .10);
}

html.night-mode .chat-widget-photo-card {
  color: rgba(245, 239, 229, .62);
  background:
    linear-gradient(145deg, rgba(245, 239, 229, .13), rgba(245, 239, 229, .035)),
    var(--chat-panel-fill);
  box-shadow:
    8px 10px 20px rgba(0, 0, 0, .18),
    var(--chat-emboss-shadow);
}

html.night-mode .chat-widget-photo-card i {
  background:
    radial-gradient(circle at 32% 28%, rgba(245, 239, 229, .56) 0 3px, transparent 4px),
    linear-gradient(135deg, transparent 0 54%, rgba(245, 239, 229, .14) 55% 56%, transparent 57%),
    linear-gradient(35deg, rgba(245, 239, 229, .13) 0 28%, transparent 29% 100%),
    linear-gradient(145deg, rgba(245, 239, 229, .10), rgba(0, 0, 0, .20));
}

html.night-mode .chat-widget-photo-card i::after {
  color: rgba(245, 239, 229, .64);
}
html.night-mode .chat-page {
  background: var(--chat-page-background);
  contain: layout paint;
}

html.night-mode .chat-page.editor-mode {
  background: var(--chat-page-background);
}

html.night-mode .chat-tab-panel,
html.night-mode .chat-home-view,
html.night-mode .chat-editor-view,
html.night-mode .chat-placeholder-panel {
  backface-visibility: hidden;
  transform: translateZ(0);
}

html.low-performance-mode .chat-page {
  --chat-glass-blur: none;
}

html.low-performance-mode .chat-icon-button,
html.low-performance-mode .chat-title,
html.low-performance-mode .chat-avatar,
html.low-performance-mode .chat-editor-avatar,
html.low-performance-mode .chat-persona-menu,
html.low-performance-mode .chat-create-menu,
html.low-performance-mode .chat-group-avatar,
html.low-performance-mode .chat-group-avatar-clear,
html.low-performance-mode .chat-profile-pill,
html.low-performance-mode .chat-collection-button,
html.low-performance-mode .chat-bottom-nav,
html.low-performance-mode .chat-placeholder-panel,
html.low-performance-mode .chat-signal-widget,
html.low-performance-mode .chat-contact-shell,
html.low-performance-mode .chat-piano-widget,
html.low-performance-mode .chat-widget-photo-card,
html.low-performance-mode .chat-piano-key-black,
html.low-performance-mode .chat-contact-letter,
html.low-performance-mode .chat-placeholder-panel svg,
html.low-performance-mode .chat-field input,
html.low-performance-mode .chat-field textarea,
html.low-performance-mode .chat-field select,
html.low-performance-mode .chat-birthday-button,
html.low-performance-mode .chat-date-picker,
html.low-performance-mode .chat-date-nav,
html.low-performance-mode .chat-date-year-button,
html.low-performance-mode .chat-date-year-input,
html.low-performance-mode .chat-date-day,
html.low-performance-mode .chat-date-today,
html.low-performance-mode .chat-dialog,
html.low-performance-mode .chat-dialog-card,
html.low-performance-mode .chat-dialog-option,
html.low-performance-mode .chat-dialog-actions button {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.chat-persona-menu {
  max-height: min(270px, calc(100dvh - 220px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-persona-action-card .chat-dialog-option {
  grid-template-columns: minmax(0, 1fr) auto;
  place-items: center stretch;
  gap: 12px;
  padding-inline: 16px;
  text-align: left;
}

.chat-persona-action-card .chat-dialog-option > span,
.chat-persona-action-card .chat-dialog-option > small {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.chat-persona-action-card .chat-dialog-option > small {
  color: rgba(0, 0, 0, .34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  line-height: 1;
}

html.night-mode .chat-persona-action-card .chat-dialog-option > small {
  color: rgba(245, 239, 229, .38);
}


/* Online chat thread layout. Keep this section consolidated; do not layer overrides below it. */
.screen.chat-open .status-bar {
  position: fixed;
  top: calc(var(--chat-visual-top, 0px) + max(22px, env(safe-area-inset-top)));
  left: max(24px, env(safe-area-inset-left));
  right: max(24px, env(safe-area-inset-right));
  z-index: 20;
}

.chat-topbar {
  display: block;
}

.chat-topbar-default {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}

.chat-topbar-default[hidden],
.chat-thread-topbar[hidden],
.chat-composer[hidden],
.chat-thread-view[hidden],
.chat-sticker-view[hidden],
.chat-mini-theater-view[hidden],
.chat-sticker-topbar-actions[hidden],
.chat-thread-action[hidden],
.chat-thread-charm[hidden],
.chat-thread-panel[hidden],
.chat-thread-arc-nav[hidden],
.chat-bottom-nav[hidden] {
  display: none !important;
}

.chat-page.thread-mode {
  position: fixed;
  inset: var(--chat-visual-top, 0px) 0 auto 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  height: var(--chat-visual-height, 100dvh);
  min-height: 0;
  padding:
    max(54px, calc(env(safe-area-inset-top) + 40px))
    max(20px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
}

.chat-page.thread-mode .chat-topbar {
  position: relative;
  z-index: 8;
  flex: none;
  width: min(100%, var(--chat-thread-max-width));
  justify-self: center;
  padding: 0 2px 9px;
  border-bottom: 1px solid var(--chat-thread-border);
}

.chat-page.thread-mode .chat-content {
  width: min(100%, var(--chat-thread-max-width));
  justify-self: center;
  overflow: hidden;
  padding: 0;
  border-inline: 1px solid var(--chat-thread-border);
  background: var(--chat-thread-canvas);
}

.chat-thread-topbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 12px;
  min-height: 42px;
}

.chat-thread-peer {
  display: grid;
  grid-template-columns: 32px 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.chat-thread-back,
.chat-thread-action,
.chat-composer-button {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0;
  color: currentColor;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.chat-thread-back {
  width: 32px;
  height: 34px;
}

.chat-thread-action {
  width: 30px;
  height: 30px;
}

.chat-composer-button {
  width: 34px;
  height: 34px;
}

.chat-thread-back svg,
.chat-thread-action svg,
.chat-composer-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.chat-thread-action svg {
  width: 19px;
  height: 19px;
}

.chat-thread-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  overflow: hidden;
  color: rgba(0, 0, 0, .66);
  border: 0;
  border-radius: 50%;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 14px;
  font-weight: 800;
}

.chat-thread-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-thread-copy {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
}

.chat-thread-copy strong,
.chat-thread-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread-copy strong {
  color: var(--chat-ink);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.05;
}

.chat-thread-copy small {
  color: rgba(0, 0, 0, .48);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  line-height: 1.05;
  text-transform: lowercase;
}

.chat-thread-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 30px;
  align-items: center;
  gap: 8px;
}

.chat-page.thread-mode .chat-thread-back,
.chat-page.thread-mode .chat-thread-action {
  transition: color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.chat-page.thread-mode .chat-thread-back:focus-visible,
.chat-page.thread-mode .chat-thread-action:focus-visible {
  color: var(--chat-ink);
  outline: 2px solid color-mix(in srgb, var(--chat-ink) 28%, transparent);
  outline-offset: 1px;
}

@media (hover: hover) and (pointer: fine) {
  .chat-page.thread-mode .chat-thread-back:hover,
  .chat-page.thread-mode .chat-thread-action:hover {
    background: var(--chat-thread-surface);
  }
}

.chat-page.sticker-mode .chat-thread-peer,
.chat-page.mini-theater-mode .chat-thread-peer {
  grid-template-columns: 32px minmax(0, 1fr);
}

.chat-page.sticker-mode .chat-thread-avatar,
.chat-page.mini-theater-mode .chat-thread-avatar {
  display: none;
}

.chat-page.sticker-mode .chat-thread-actions {
  grid-auto-columns: max-content;
}

.chat-thread-charm {
  position: absolute;
  inset: 0;
  z-index: 18;
  overflow: visible;
  pointer-events: none;
  --chat-star-pull: 0px;
  --chat-star-sway: 0deg;
  --chat-star-drag-sway: 0deg;
}

.chat-thread-star {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 42px;
  right: 8px;
  z-index: 23;
  display: block;
  width: 38px;
  height: 82px;
  padding: 0;
  color: #d7dce5;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: grab;
  touch-action: none;
  pointer-events: auto;
}

.chat-thread-star:active {
  cursor: grabbing;
}

.chat-thread-star-pendant {
  position: absolute;
  inset: 0;
  transform: rotate(calc(var(--chat-star-sway) + var(--chat-star-drag-sway)));
  transform-origin: 50% 0;
  transition: transform .16s ease;
}

.chat-thread-charm.dragging .chat-thread-star-pendant {
  transition: none;
}

.chat-thread-star-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: calc(31px + var(--chat-star-pull));
  background: linear-gradient(180deg, rgba(255, 255, 255, .84), rgba(151, 157, 168, .70));
  box-shadow: 0 0 4px rgba(255, 255, 255, .46);
  transform: translateX(-50%);
}

.chat-thread-star-shape {
  position: absolute;
  top: calc(25px + var(--chat-star-pull));
  left: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .14));
  transform: translateX(-50%);
  transition: top .16s ease;
}

.chat-thread-charm.dragging .chat-thread-star-shape,
.chat-thread-charm.dragging .chat-thread-star-line {
  transition: none;
}

.chat-thread-star-shape svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
  stroke: rgba(255, 255, 255, .86);
  stroke-linejoin: round;
  stroke-width: .85;
}

.chat-thread-star:focus-visible,
.chat-thread-arc-button:focus-visible {
  outline: 1px solid rgba(0, 0, 0, .34);
  outline-offset: 3px;
}

.chat-thread-arc-nav {
  position: absolute;
  top: 56px;
  left: 50%;
  z-index: 21;
  width: min(268px, calc(100vw - 52px));
  height: 124px;
  overflow: hidden;
  color: var(--chat-muted);
  border: 0;
  border-radius: 0 0 136px 136px / 0 0 118px 118px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
  transform: translateX(-50%);
  transform-origin: 50% 0;
  touch-action: pan-x;
  pointer-events: auto;
}

.chat-thread-charm.open .chat-thread-arc-nav {
  animation: chat-thread-arc-settle .18s cubic-bezier(.2, .86, .22, 1.08);
}

@keyframes chat-thread-arc-settle {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px) scale(.96);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.chat-thread-arc-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 34px;
  right: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16, 16, 16, .18), transparent);
}


.chat-thread-arc-button {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  color: rgba(16, 16, 16, .50);
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: color .14s ease, background-color .14s ease, transform .12s ease;
}

.chat-thread-arc-button:nth-child(1) {
  left: 42px;
  top: 30px;
}

.chat-thread-arc-button:nth-child(2) {
  left: calc(50% - 24px);
  top: 66px;
}

.chat-thread-arc-button:nth-child(3) {
  right: 42px;
  top: 30px;
}

.chat-thread-arc-button[aria-selected="true"] {
  color: var(--chat-ink);
  background-color: rgba(255, 255, 255, .22);
}

.chat-thread-arc-button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: .62;
  transform: translateX(-50%);
}

.chat-thread-arc-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.85;
}

.chat-thread-action:active,
.chat-thread-back:active,
.chat-composer-button:active {
  transform: translateY(1px);
}

.chat-thread-view {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.chat-thread-view.active {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.chat-thread-panel {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.chat-thread-panel:not(.active) {
  display: none;
}

.chat-thread-panel-chat.active {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.chat-thread-placeholder.active {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 0;
  padding: 24px;
  color: rgba(0, 0, 0, .46);
  text-align: center;
}

.chat-thread-placeholder svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.chat-thread-placeholder strong {
  color: var(--chat-ink);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 16px;
  font-weight: 850;
}

.chat-thread-placeholder small {
  color: rgba(0, 0, 0, .42);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
}

.chat-thread-settings.active {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
}

.chat-thread-settings-scroll {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px 2px 18px;
  scrollbar-width: none;
}

.chat-thread-settings-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.chat-thread-settings-private {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.chat-thread-settings-private[hidden],
.chat-thread-settings-group[hidden] {
  display: none !important;
}

.chat-thread-settings-profile {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 10px 12px;
  color: var(--chat-ink);
  border: 0;
  border-radius: 18px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-thread-settings-avatar {
  display: grid;
  place-items: center;
  width: 62px;
  aspect-ratio: 1;
  overflow: hidden;
  color: rgba(0, 0, 0, .62);
  border: 0;
  border-radius: 12px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 18px;
  font-weight: 500;
}

.chat-thread-settings-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-thread-settings-profile-copy {
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 0;
}

.chat-thread-settings-profile-copy strong {
  min-width: 0;
  overflow: hidden;
  color: var(--chat-ink);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread-settings-signature {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: rgba(0, 0, 0, .50);
  border: 0;
  background: transparent;
  box-shadow: none;
  font: 400 12px/1.38 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.chat-thread-settings-section {
  display: grid;
  gap: 0;
  min-width: 0;
  padding: 8px 10px 9px;
  border: 0;
  border-radius: 16px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-thread-settings-section h2 {
  margin: 0 2px 5px;
  color: rgba(0, 0, 0, .46);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .10em;
}

.chat-thread-settings-row {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 11px 4px;
  color: var(--chat-ink);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  text-align: left;
}

button.chat-thread-settings-row {
  cursor: pointer;
}

.chat-thread-settings-section > .chat-thread-settings-row:not(:last-child) {
  border-bottom: 1px solid rgba(0, 0, 0, .075);
}

.chat-thread-settings-row > span,
.chat-thread-settings-range-head {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chat-thread-settings-row b,
.chat-thread-settings-row small,
.chat-thread-settings-range output {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread-settings-row b {
  color: var(--chat-ink);
  font-size: 13px;
  font-weight: 450;
}

.chat-thread-settings-row small,
.chat-thread-settings-range output {
  color: rgba(0, 0, 0, .46);
  font-size: 11px;
  font-weight: 400;
}

.chat-thread-format-repair-setting[hidden] {
  display: none !important;
}

.chat-thread-format-repair-setting small {
  overflow: visible;
  line-height: 1.45;
  text-overflow: clip;
  white-space: normal;
}

.chat-thread-settings-remark-control {
  justify-self: end;
  width: min(58%, 190px);
}

.chat-thread-settings-inline-value,
.chat-thread-settings-inline-input {
  width: 100%;
  min-width: 0;
  color: rgba(0, 0, 0, .52);
  font: 400 11px/1.25 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: right;
}

.chat-thread-settings-inline-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.chat-thread-settings-inline-input {
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  outline: 0;
}

.chat-thread-settings-reply-row {
  grid-template-columns: minmax(0, 1fr) max-content;
}

.chat-thread-voice-settings[hidden] {
  display: none !important;
}

.chat-thread-language-row {
  grid-template-columns: minmax(0, 1fr) minmax(138px, 176px);
}

#chatThreadMinimaxVoiceStatus {
  display: block;
  max-width: min(58vw, 220px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#chatThreadMinimaxVoiceStatus[data-tone="ready"] {
  color: #27735f;
}

#chatThreadMinimaxVoiceStatus[data-tone="missing"] {
  color: #8a554d;
}

.chat-thread-minimax-controls {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px 4px 15px;
  border-bottom: 1px solid rgba(0, 0, 0, .075);
}

.chat-thread-minimax-controls[hidden] {
  display: none !important;
}

.chat-thread-voice-parameter {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.chat-thread-voice-parameter > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.chat-thread-voice-parameter b {
  color: var(--chat-ink);
  font-size: 12px;
  font-weight: 450;
}

.chat-thread-voice-parameter output {
  min-width: 38px;
  color: rgba(0, 0, 0, .54);
  font: 500 11px/1 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.chat-thread-voice-parameter input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 20px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.chat-thread-voice-parameter input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .14);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .10);
}

.chat-thread-voice-parameter input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 50%;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

.chat-thread-voice-parameter input[type="range"]::-moz-range-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, .14);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .10);
}

.chat-thread-voice-parameter input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 50%;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

.chat-thread-voice-parameter input[type="range"]:focus-visible {
  outline: 2px solid rgba(20, 20, 20, .42);
  outline-offset: 3px;
  border-radius: 999px;
}

.chat-thread-voice-preview-button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  color: rgba(20, 20, 20, .82);
  border: 0;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  font: 500 12px/1 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

.chat-thread-voice-preview-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: currentColor;
  stroke: none;
}

.chat-thread-voice-preview-stop,
.chat-thread-voice-preview-spinner {
  display: none;
}

.chat-thread-voice-preview-button.is-playing .chat-thread-voice-preview-play {
  display: none;
}

.chat-thread-voice-preview-button.is-playing .chat-thread-voice-preview-stop {
  display: block;
}

.chat-thread-voice-preview-button[data-busy="true"] .chat-thread-voice-preview-play,
.chat-thread-voice-preview-button[data-busy="true"] .chat-thread-voice-preview-stop {
  display: none;
}

.chat-thread-voice-preview-button[data-busy="true"] .chat-thread-voice-preview-spinner {
  display: block;
}

.chat-thread-voice-preview-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: chat-thread-voice-preview-spin 700ms linear infinite;
}

.chat-thread-voice-preview-button:focus-visible {
  outline: 2px solid rgba(20, 20, 20, .42);
  outline-offset: 2px;
}

.chat-thread-voice-preview-button:disabled {
  opacity: .46;
  cursor: default;
}

.chat-thread-voice-preview-status {
  min-height: 0;
  margin-top: -5px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
}

.chat-thread-voice-preview-status:empty {
  display: none;
}

@keyframes chat-thread-voice-preview-spin {
  to {
    transform: rotate(360deg);
  }
}

.chat-thread-language-control {
  position: relative;
  justify-self: end;
  width: 100%;
}

.chat-thread-language-control::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: .42;
  pointer-events: none;
  transform: translateY(-68%) rotate(45deg);
}

.chat-thread-language-control select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 34px;
  min-width: 0;
  padding: 0 28px 0 10px;
  overflow: hidden;
  color: rgba(0, 0, 0, .62);
  border: 0;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  outline: 0;
  font: 450 12px/1 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.chat-thread-reply-count-control {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 6px;
  min-width: 0;
}

.chat-thread-reply-count-control label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.chat-thread-reply-count-control label span,
.chat-thread-reply-count-separator {
  color: rgba(0, 0, 0, .46);
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.chat-thread-reply-count-control input {
  width: 42px;
  height: 30px;
  padding: 0 6px;
  color: rgba(0, 0, 0, .62);
  border: 0;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  outline: 0;
  font: 500 12px/1 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: center;
}

.chat-thread-reply-count-control input::-webkit-outer-spin-button,
.chat-thread-reply-count-control input::-webkit-inner-spin-button {
  margin: 0;
}

.chat-thread-reply-count-control input:disabled {
  opacity: .58;
}

.chat-thread-settings-row svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: .42;
}

.chat-thread-settings-row:active,
.chat-thread-settings-signature:active {
  transform: translateY(1px);
}

.chat-thread-settings-range {
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}

.chat-thread-settings-range-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
}

.chat-thread-settings-range input[type="range"] {
  width: 100%;
  accent-color: rgba(17, 17, 17, .86);
}

.chat-thread-settings-toggle {
  position: relative;
  cursor: default;
}

.chat-thread-settings-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chat-thread-settings-toggle i {
  display: block;
  width: 42px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
}

.chat-thread-settings-toggle i::after {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .12);
}

.chat-thread-settings-toggle[for="chatThreadMemoryRetrievalToggle"],
.chat-thread-settings-toggle[for="chatThreadFormatRepairToggle"],
.chat-thread-settings-toggle[for="chatThreadChainOfThoughtToggle"],
.chat-thread-settings-toggle[for="chatThreadMiniTheaterToggle"],
.chat-thread-settings-toggle[for="chatThreadMinimaxVoiceToggle"] {
  cursor: pointer;
}

.chat-thread-settings-toggle[for="chatThreadMemoryRetrievalToggle"] input,
.chat-thread-settings-toggle[for="chatThreadFormatRepairToggle"] input,
.chat-thread-settings-toggle[for="chatThreadChainOfThoughtToggle"] input,
.chat-thread-settings-toggle[for="chatThreadMiniTheaterToggle"] input,
.chat-thread-settings-toggle[for="chatThreadMinimaxVoiceToggle"] input {
  top: 50%;
  right: 4px;
  z-index: 2;
  width: 42px;
  height: 24px;
  pointer-events: auto;
  cursor: pointer;
  transform: translateY(-50%);
}

.chat-thread-settings-toggle i,
.chat-thread-settings-toggle i::after {
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.chat-thread-settings-toggle input:checked + i {
  background: rgba(20, 20, 20, .82);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18);
}

.chat-thread-settings-toggle input:checked + i::after {
  transform: translateX(18px);
}

.chat-thread-settings-toggle input:focus-visible + i {
  outline: 2px solid rgba(20, 20, 20, .42);
  outline-offset: 2px;
}

.chat-chain-panel {
  display: grid;
  gap: 10px;
  padding: 4px 4px 13px;
  border-bottom: 1px solid rgba(0, 0, 0, .075);
}

.chat-chain-panel[hidden] {
  display: none !important;
}

.chat-chain-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.chat-chain-panel-head > span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.chat-chain-panel-head strong,
.chat-chain-panel-head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-chain-panel-head strong {
  color: var(--chat-ink);
  font-size: 12px;
  font-weight: 760;
}

.chat-chain-panel-head small {
  color: rgba(0, 0, 0, .48);
  font-size: 10px;
  font-weight: 650;
}

.chat-chain-toolbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 30px);
  gap: 5px;
}
.chat-mini-theater-toolbar {
  grid-template-columns: 30px;
}

.chat-chain-toolbar button,
.chat-chain-icon-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: rgba(0, 0, 0, .62);
  border: 0;
  border-radius: 50%;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  cursor: pointer;
}

.chat-chain-toolbar svg,
.chat-chain-icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.chat-chain-icon-button.danger {
  color: rgba(159, 49, 43, .74);
}

.chat-chain-entry-list {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.chat-chain-entry {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 9px 8px 9px 10px;
  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 8px;
  background: rgba(255, 255, 255, .24);
}

.chat-chain-entry-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.chat-chain-entry-disclosure {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 5px;
  min-width: 0;
  width: 100%;
  padding: 0;
  color: inherit;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.chat-chain-entry-chevron {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: rgba(0, 0, 0, .48);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 160ms ease;
}

.chat-chain-entry-disclosure[aria-expanded="true"] .chat-chain-entry-chevron {
  transform: rotate(90deg);
}

.chat-chain-entry-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.chat-chain-entry-copy strong,
.chat-chain-entry-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-chain-entry-copy strong {
  color: var(--chat-ink);
  font-size: 12px;
  font-weight: 740;
}

.chat-chain-entry-copy small {
  color: rgba(0, 0, 0, .50);
  font-size: 9px;
  font-weight: 650;
}

.chat-chain-entry-preview {
  min-width: 0;
  padding: 8px 3px 1px;
  overflow-wrap: anywhere;
  color: rgba(0, 0, 0, .62);
  border-top: 1px solid rgba(0, 0, 0, .07);
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.chat-chain-entry-preview[hidden],
.chat-chain-depth-field[hidden] {
  display: none;
}

.chat-chain-entry-actions {
  display: grid;
  grid-template-columns: 28px 36px 28px;
  align-items: center;
  gap: 4px;
}

.chat-chain-entry-actions .chat-chain-icon-button {
  width: 28px;
  height: 28px;
  background: transparent;
  box-shadow: none;
}

.chat-chain-entry-toggle {
  position: relative;
  display: block;
  width: 36px;
  height: 22px;
  cursor: pointer;
}

.chat-chain-entry-toggle input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.chat-chain-entry-toggle i {
  display: block;
  width: 36px;
  height: 22px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .10);
}

.chat-chain-entry-toggle i::after {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  margin: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .16);
  transition: transform 160ms ease;
}

.chat-chain-entry-toggle input:checked + i {
  background: rgba(20, 20, 20, .82);
}

.chat-chain-entry-toggle input:checked + i::after {
  transform: translateX(14px);
}

.chat-chain-entry-toggle input:focus-visible + i {
  outline: 2px solid rgba(20, 20, 20, .42);
  outline-offset: 2px;
}

.chat-chain-empty,
.chat-chain-preset-empty {
  margin: 2px 0;
  padding: 11px;
  color: rgba(0, 0, 0, .42);
  border: 1px dashed rgba(0, 0, 0, .12);
  border-radius: 8px;
  font-size: 11px;
  text-align: center;
}

.chat-chain-empty[hidden],
.chat-chain-preset-empty[hidden] {
  display: none;
}

.chat-chain-status:empty {
  display: none;
}

.chat-chain-entry-card {
  max-height: min(88dvh, 720px);
}

#chatChainEntryDialog .chat-field input,
#chatChainEntryDialog .chat-field textarea,
#chatChainEntryDialog .chat-field select,
#chatChainPresetNameDialog .chat-field input {
  border: 1px solid rgba(0, 0, 0, .16);
}

#chatChainEntryDialog .chat-field input:focus,
#chatChainEntryDialog .chat-field textarea:focus,
#chatChainEntryDialog .chat-field select:focus-visible,
#chatChainPresetNameDialog .chat-field input:focus {
  border-color: rgba(0, 0, 0, .38);
}

.chat-chain-entry-card .chat-field textarea {
  min-height: 132px;
}

.chat-chain-depth-position {
  color: rgba(0, 0, 0, .48);
  font-size: 10px;
  line-height: 1.35;
}

.chat-chain-preset-card,
.chat-reasoning-card {
  width: min(100%, 460px);
}

.chat-chain-preset-list {
  display: grid;
  gap: 7px;
  min-width: 0;
  max-height: min(52dvh, 430px);
  overflow-y: auto;
}

.chat-chain-preset-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 4px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .24);
}

.chat-chain-preset-item.is-active {
  border-color: rgba(0, 0, 0, .22);
  background: rgba(0, 0, 0, .045);
}

.chat-chain-preset-select {
  display: block;
  min-width: 0;
  padding: 8px;
  color: inherit;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.chat-chain-preset-select > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chat-chain-preset-select strong,
.chat-chain-preset-select small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-chain-preset-select strong {
  color: var(--chat-ink);
  font-size: 12px;
  font-weight: 740;
}

.chat-chain-preset-select small {
  color: rgba(0, 0, 0, .48);
  font-size: 10px;
}

.chat-chain-preset-item > .chat-chain-icon-button {
  width: 30px;
  height: 30px;
  background: transparent;
  box-shadow: none;
}

.chat-reasoning-content {
  min-height: 150px;
  max-height: min(58dvh, 460px);
  padding: 13px;
  overflow-y: auto;
  color: rgba(0, 0, 0, .74);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .36);
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chat-thread-reasoning-button.chat-chain-icon-button {
  align-self: flex-start;
  width: 24px;
  height: 24px;
  margin: 0 0 -1px 2px;
  color: rgba(0, 0, 0, .54);
  background: transparent;
  box-shadow: none;
}

.chat-thread-reasoning-button.chat-chain-icon-button svg {
  width: 15px;
  height: 15px;
}

.chat-thread-exclusive-api-panel {
  display: grid;
  gap: 10px;
  padding: 2px 4px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, .075);
}

.chat-thread-exclusive-api-panel[hidden] {
  display: none !important;
}

.chat-thread-exclusive-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.chat-thread-exclusive-field span {
  color: rgba(0, 0, 0, .50);
  font-size: 11px;
  font-weight: 400;
}

.chat-thread-exclusive-temperature-field span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.chat-thread-exclusive-temperature-field output {
  color: rgba(0, 0, 0, .58);
  font-size: 11px;
  font-weight: 400;
}

.chat-thread-exclusive-field input,
.chat-thread-exclusive-field select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  color: rgba(0, 0, 0, .72);
  border: 0;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  outline: 0;
  font: 400 12px/1.25 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.chat-thread-exclusive-field input[type="range"] {
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  accent-color: rgba(17, 17, 17, .86);
}

.chat-thread-exclusive-model-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: end;
}

.chat-thread-exclusive-api-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.chat-thread-format-repair-actions {
  grid-template-columns: minmax(0, 1fr);
}

.chat-thread-exclusive-secondary,
.chat-thread-exclusive-primary {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
}

.chat-thread-exclusive-secondary {
  color: rgba(0, 0, 0, .62);
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-thread-exclusive-primary {
  color: #f8f7f4;
  background: rgba(18, 18, 18, .78);
}

.chat-thread-exclusive-secondary:disabled,
.chat-thread-exclusive-primary:disabled {
  cursor: wait;
  opacity: .62;
}

.chat-dialog-check-list {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.chat-dialog-check-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
  cursor: pointer;
}

.chat-dialog-check-option input {
  width: 16px;
  height: 16px;
  accent-color: rgba(17, 17, 17, .86);
}

.chat-dialog-check-option span,
.chat-sticker-export-option {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chat-dialog-check-option strong,
.chat-sticker-export-option strong {
  min-width: 0;
  overflow: hidden;
  color: var(--chat-ink);
  font-size: 13px;
  font-weight: 450;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-dialog-check-option small,
.chat-sticker-export-option small,
.chat-dialog-empty {
  color: rgba(0, 0, 0, .48);
  font-size: 11px;
  font-weight: 400;
}

.chat-dialog-empty {
  margin: 0;
  text-align: center;
}


.chat-thread-settings-group {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.chat-group-settings-profile {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-height: 96px;
  padding: 12px 58px 12px 12px;
  color: var(--chat-ink);
  border: 0;
  border-radius: 16px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-group-settings-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  color: rgba(0, 0, 0, .62);
  border: 0;
  border-radius: 14px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
}

.chat-group-settings-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-group-settings-profile-copy {
  display: grid;
  align-content: center;
  gap: 9px;
  min-width: 0;
}

.chat-group-settings-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.chat-group-settings-name-control {
  display: block;
  min-width: 0;
}

.chat-group-settings-name,
.chat-group-settings-name-input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0;
  color: var(--chat-ink);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
  font: 500 16px/1.2 "Noto Serif SC", "Songti SC", serif;
  text-align: left;
}

.chat-group-settings-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.chat-group-settings-name-input {
  padding: 0 8px;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: none;
}

.chat-group-settings-name-input[hidden] {
  display: none;
}

.chat-group-settings-qr-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: rgba(0, 0, 0, .58);
  border: 0;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  cursor: pointer;
}

.chat-group-settings-qr-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.chat-group-settings-number {
  color: rgba(0, 0, 0, .48);
  font-size: 11px;
  font-weight: 400;
}

.chat-group-settings-number b {
  margin-left: 4px;
  color: rgba(0, 0, 0, .58);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.chat-group-settings-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0 2px 8px;
}

.chat-thread-settings-section .chat-group-settings-section-head h2 {
  margin: 0;
}

.chat-group-settings-section-head span {
  color: rgba(0, 0, 0, .44);
  font-size: 10px;
  font-weight: 450;
}

.chat-group-settings-member-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 7px;
  min-width: 0;
  padding: 3px 0 10px;
}

.chat-group-settings-member {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.chat-group-settings-member-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  overflow: hidden;
  color: rgba(0, 0, 0, .58);
  border: 0;
  border-radius: 50%;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  font-size: 12px;
  font-weight: 550;
}

.chat-group-settings-member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-group-settings-member-name {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  color: rgba(0, 0, 0, .62);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-group-settings-member-role {
  color: rgba(0, 0, 0, .46);
  font-size: 9px;
  font-weight: 550;
  line-height: 1.2;
}

.chat-group-settings-member-identity {
  width: 100%;
  min-width: 0;
  color: rgba(0, 0, 0, .42);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: center;
}

.chat-group-settings-member-actions {
  display: flex;
  gap: 14px;
  padding: 10px 4px 2px;
  border-top: 1px solid rgba(0, 0, 0, .075);
}

.chat-group-settings-member-action {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.chat-group-settings-member-action button {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  padding: 0;
  color: rgba(0, 0, 0, .46);
  border: 0;
  border-radius: 50%;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
}

.chat-group-settings-member-action button:disabled {
  opacity: .55;
}

.chat-group-settings-member-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.chat-group-settings-member-action small {
  color: rgba(0, 0, 0, .48);
  font-size: 10px;
  font-weight: 400;
}

.chat-group-settings-alias-control {
  justify-self: end;
  width: min(42vw, 190px);
  min-width: 76px;
  max-width: 100%;
}

.chat-group-settings-alias-control input {
  box-shadow: none;
}

.chat-group-settings-status:empty {
  display: none;
}

.chat-group-qr-card {
  gap: 13px;
}

.chat-group-qr-preview {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  padding: 2px 0 6px;
  text-align: center;
}

.chat-group-qr-canvas {
  display: grid;
  place-items: center;
  width: 208px;
  max-width: 100%;
  aspect-ratio: 1;
  margin-bottom: 5px;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}

.chat-group-qr-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.chat-group-qr-preview strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--chat-ink);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 16px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-group-qr-preview span {
  color: rgba(0, 0, 0, .48);
  font-size: 11px;
  font-weight: 400;
}

.chat-group-qr-preview b {
  margin-left: 4px;
  color: rgba(0, 0, 0, .62);
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.chat-group-qr-forward {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  color: #f8f7f4;
  border: 0;
  border-radius: 8px;
  background: rgba(18, 18, 18, .82);
  font-size: 13px;
  font-weight: 450;
  cursor: pointer;
}

.chat-group-qr-forward svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.chat-group-qr-forward-list {
  display: grid;
  gap: 6px;
  max-height: min(50dvh, 380px);
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: none;
}

.chat-group-qr-forward-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.chat-group-qr-forward-option {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 7px 9px;
  color: var(--chat-ink);
  border: 0;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  text-align: left;
  cursor: pointer;
}

.chat-group-qr-forward-option strong,
.chat-group-qr-forward-option small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-group-qr-forward-option strong {
  color: var(--chat-ink);
  font-size: 13px;
  font-weight: 500;
}

.chat-group-qr-forward-option small {
  margin-top: 3px;
  color: rgba(0, 0, 0, .46);
  font-size: 10px;
  font-weight: 400;
}

.chat-group-qr-forward-empty {
  margin: 0;
  padding: 18px 6px;
  color: rgba(0, 0, 0, .48);
  font-size: 11px;
  text-align: center;
}

.chat-record-detail-card {
  gap: 10px;
  background: #f5f5f3;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.chat-record-detail-list {
  display: grid;
  min-height: 0;
  max-height: min(58dvh, 460px);
  overflow-y: auto;
  scrollbar-width: none;
}

.chat-record-detail-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.chat-record-detail-entry {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  padding: 12px 2px;
  border-bottom: 1px solid rgba(0, 0, 0, .09);
}

.chat-record-detail-entry:last-child {
  border-bottom: 0;
}

.chat-record-detail-avatar {
  width: 34px;
  font-size: 11px;
}

.chat-record-detail-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.chat-record-detail-copy > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.chat-record-detail-copy > header strong,
.chat-record-detail-copy > header time {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-record-detail-copy > header strong {
  color: var(--chat-ink);
  font-size: 12px;
  font-weight: 650;
}

.chat-record-detail-copy > header time {
  flex: 0 0 auto;
  color: var(--chat-faint);
  font-size: 9px;
}

.chat-record-detail-copy > p {
  margin: 0;
  color: rgba(0, 0, 0, .72);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chat-record-detail-quote {
  display: flex;
  gap: 0;
  min-width: 0;
  padding: 6px 8px;
  color: rgba(0, 0, 0, .54);
  border-radius: 6px;
  background: rgba(0, 0, 0, .06);
  font-size: 10px;
  line-height: 1.35;
}

.chat-record-detail-quote strong,
.chat-record-detail-quote span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-record-detail-quote strong {
  flex: 0 1 auto;
  max-width: 42%;
}

.chat-record-detail-quote strong::after {
  content: "：";
}

.chat-record-detail-quote > span {
  flex: 1 1 auto;
}

.chat-thread-bubble.has-group-invite {
  display: grid;
  gap: 8px;
  width: min(212px, 100%);
  padding: 11px;
  white-space: normal;
}

.chat-thread-bubble.has-chat-record {
  width: min(238px, 100%);
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  white-space: normal;
}

.chat-record-message {
  display: grid;
  min-width: 0;
  text-align: left;
}

.chat-record-message > strong {
  min-width: 0;
  overflow: hidden;
  padding: 12px 13px 10px;
  color: var(--chat-ink);
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-record-message-preview {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 9px 13px;
  color: rgba(0, 0, 0, .55);
  border-top: 1px solid rgba(0, 0, 0, .07);
  border-bottom: 1px solid rgba(0, 0, 0, .07);
  font-size: 10px;
  line-height: 1.35;
}

.chat-record-message-preview > span {
  display: flex;
  min-width: 0;
}

.chat-record-message-preview b,
.chat-record-message-preview > span > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-record-message-preview b {
  flex: 0 1 auto;
  max-width: 42%;
  font-weight: 600;
}

.chat-record-message-preview > span > span {
  flex: 1 1 auto;
}

.chat-record-message-footer {
  padding: 8px 13px 9px;
  color: rgba(0, 0, 0, .38);
  font-size: 9px;
  line-height: 1;
}

.chat-group-invite-caption {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 450;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-group-invite-message {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
}

.chat-group-invite-message canvas {
  display: block;
  width: 132px;
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  background: #fff;
  image-rendering: pixelated;
}

.chat-group-invite-message strong {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 550;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-group-invite-message span {
  color: inherit;
  font-size: 10px;
  font-weight: 400;
  opacity: .72;
  font-variant-numeric: tabular-nums;
}

.chat-thread-scroll {
  position: relative;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 4px 14px 10px;
  scrollbar-width: none;
}

.chat-thread-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.chat-thread-transcript {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  padding: 10px 0 24px;
}

.chat-thread-date-separator {
  display: grid;
  grid-template-columns: minmax(18px, 1fr) auto minmax(18px, 1fr);
  align-items: center;
  gap: 10px;
  width: min(100%, 420px);
  margin: 5px auto 3px;
  color: var(--chat-faint);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.chat-thread-date-separator::before,
.chat-thread-date-separator::after {
  content: "";
  height: 1px;
  background: var(--chat-thread-border);
}

.chat-thread-date-separator time {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--chat-thread-surface);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chat-thread-load-earlier {
  justify-self: center;
  min-width: 148px;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
  color: rgba(0, 0, 0, .62);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
}

.chat-thread-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 5px;
  color: rgba(0, 0, 0, .44);
  text-align: center;
  pointer-events: none;
}

.chat-thread-empty[hidden] {
  display: none;
}

.chat-thread-empty strong {
  color: var(--chat-ink);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 15px;
  font-weight: 800;
}

.chat-thread-empty small {
  color: rgba(0, 0, 0, .42);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
}

.chat-thread-typing {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 0 2px 18px;
}

.chat-thread-typing[hidden] {
  display: none;
}

.chat-thread-typing[data-mode="notice"] {
  display: block;
  min-height: 0;
  padding-left: 50px;
}

.chat-thread-typing-bubble {
  display: inline-grid;
  grid-auto-flow: column;
  place-items: center;
  gap: 5px;
  width: 52px;
  height: 40px;
  border-radius: 18px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-thread-typing-bubble i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .32;
  animation: chat-thread-typing-dot 1.05s ease-in-out infinite;
}

.chat-thread-typing-bubble i:nth-child(2) {
  animation-delay: .14s;
}

.chat-thread-typing-bubble i:nth-child(3) {
  animation-delay: .28s;
}

.chat-thread-reply-notice {
  display: block;
  max-width: min(86%, 340px);
  padding: 6px 10px;
  color: rgba(0, 0, 0, .58);
  border-left: 2px solid rgba(0, 0, 0, .18);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chat-thread-typing[data-tone="error"] .chat-thread-reply-notice {
  color: #8a302b;
  border-left-color: #b34a42;
}

.chat-thread-bubble-row.is-arriving {
  animation: chat-thread-message-arrive 220ms ease-out both;
}

@keyframes chat-thread-typing-dot {
  0%,
  60%,
  100% {
    opacity: .32;
    transform: translateY(0);
  }

  30% {
    opacity: .78;
    transform: translateY(-3px);
  }
}

@keyframes chat-thread-message-arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-thread-typing-bubble i,
  .chat-thread-bubble-row.is-arriving {
    animation: none;
  }
}

.chat-thread-bubble-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.chat-thread-bubble-row.is-hidden-context {
  opacity: .58;
}

.chat-thread-bubble-row.is-selecting {
  cursor: pointer;
}

.chat-thread-bubble-row[aria-selected="true"] .chat-thread-bubble {
  outline: 2px solid rgba(17, 17, 17, .32);
  outline-offset: 2px;
}

.chat-message-select-control {
  flex: 0 0 auto;
  align-self: center;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  color: #fff;
  border: 1px solid rgba(0, 0, 0, .24);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.chat-message-select-control span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
}

.chat-message-select-control[aria-pressed="true"] {
  border-color: rgba(17, 17, 17, .82);
  background: rgba(17, 17, 17, .82);
}

.chat-thread-bubble-row.from-user {
  justify-content: flex-end;
}

.chat-thread-bubble-row.from-role {
  justify-content: flex-start;
}

.chat-thread-bubble-row.from-system {
  justify-content: center;
}

.chat-thread-bubble-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  margin-top: 1px;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: #dfe3eb;
  box-shadow: none;
  color: rgba(0, 0, 0, .58);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 760;
}

.chat-thread-bubble-row[data-anonymous-color="0"] {
  --chat-anonymous-accent: #2f6f73;
}

.chat-thread-bubble-row[data-anonymous-color="1"] {
  --chat-anonymous-accent: #6b5474;
}

.chat-thread-bubble-row[data-anonymous-color="2"] {
  --chat-anonymous-accent: #8a515b;
}

.chat-thread-bubble-row[data-anonymous-color="3"] {
  --chat-anonymous-accent: #66704f;
}

.chat-thread-bubble-row[data-anonymous-color="4"] {
  --chat-anonymous-accent: #4e6783;
}

.chat-thread-bubble-row[data-anonymous-color="5"] {
  --chat-anonymous-accent: #5b6168;
}

.chat-thread-bubble-row.is-anonymous-message .chat-thread-bubble-avatar {
  box-sizing: border-box;
  color: var(--chat-anonymous-accent);
  border: 1px solid color-mix(in srgb, var(--chat-anonymous-accent) 28%, transparent);
  background: color-mix(in srgb, var(--chat-anonymous-accent) 16%, #eef0ed);
}

.chat-thread-bubble-row.is-anonymous-message .chat-thread-bubble-author {
  color: var(--chat-anonymous-accent);
}
.chat-thread-bubble-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-thread-bubble-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  max-width: min(76%, 430px);
  min-width: 0;
}

.chat-thread-bubble-author {
  max-width: 100%;
  padding: 0 4px;
  overflow: hidden;
  color: rgba(0, 0, 0, .52);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-thread-bubble-row.from-user .chat-thread-bubble-stack {
  align-items: flex-end;
}
.chat-thread-bubble-stack.has-mini-theater {
  overflow: visible;
}

.chat-mini-theater-launch {
  appearance: none;
  -webkit-appearance: none;
  z-index: 2;
  align-self: flex-end;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -17px -10px -3px 0;
  padding: 0;
  color: #784542;
  border: 1px solid rgba(120, 69, 66, .14);
  border-radius: 50%;
  background: rgba(250, 247, 241, .96);
  box-shadow: 0 3px 9px rgba(53, 31, 30, .18);
  cursor: pointer;
}

.chat-mini-theater-launch svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.chat-mini-theater-launch:focus-visible {
  outline: 2px solid rgba(120, 69, 66, .52);
  outline-offset: 2px;
}

.chat-thread-bubble-row.from-system .chat-thread-bubble-stack {
  align-items: center;
  max-width: 86%;
}

.chat-thread-bubble {
  max-width: 100%;
  margin: 0;
  padding: 10px 14px;
  color: var(--chat-ink);
  border: 1px solid rgba(28, 39, 35, .055);
  border-radius: 16px;
  background: var(--chat-thread-bubble-fill);
  box-shadow:
    0 3px 12px rgba(28, 39, 35, .055),
    inset 0 1px 0 rgba(255, 255, 255, .72);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  -webkit-touch-callout: none;
  user-select: none;
}

button.chat-thread-bubble {
  appearance: none;
  -webkit-appearance: none;
  width: auto;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

button.chat-thread-bubble:focus-visible {
  outline: 1px solid rgba(0, 0, 0, .34);
  outline-offset: 3px;
}

.chat-thread-bubble-original,
.chat-thread-bubble-translation {
  display: block;
  min-width: 0;
}

.chat-thread-bubble-quote {
  display: flex;
  align-items: baseline;
  gap: 0;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 6px 9px;
  color: rgba(0, 0, 0, .58);
  border: 0;
  border-radius: 7px;
  background: rgba(0, 0, 0, .07);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
  white-space: nowrap;
}

.chat-thread-bubble-quote strong,
.chat-thread-bubble-quote span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread-bubble-quote strong {
  flex: 0 1 auto;
  max-width: 42%;
  font-weight: 650;
}

.chat-thread-bubble-quote strong::after {
  content: "：";
}

.chat-thread-bubble-quote > span {
  flex: 1 1 auto;
}

.chat-thread-bubble-translation {
  margin-top: 9px;
  padding-top: 9px;
  color: rgba(0, 0, 0, .58);
  border-top: 1px dashed rgba(0, 0, 0, .24);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.chat-thread-bubble-translation[data-tone="pending"] {
  color: rgba(0, 0, 0, .42);
}

.chat-thread-bubble-translation[data-tone="error"] {
  color: #8a302b;
}

.chat-thread-bubble.has-voice {
  width: 248px;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  white-space: normal;
}

.chat-voice-message {
  display: grid;
  min-width: 0;
}

.chat-voice-message-player {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 8px 11px;
  color: inherit;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.chat-voice-message-player:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: -3px;
}

.chat-voice-message-player:disabled {
  cursor: wait;
  opacity: .62;
}

.chat-voice-message.is-speech-fallback .chat-voice-message-player {
  opacity: 1;
}

.chat-voice-message.is-silent-user .chat-voice-message-player:disabled {
  grid-template-columns: minmax(0, 1fr) 30px;
  cursor: default;
  opacity: 1;
}

.chat-voice-message.is-silent-user .chat-voice-message-player-icon {
  display: none;
}

.chat-voice-message-player-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .88;
}

.chat-voice-message-player-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
}

.chat-voice-message-player.is-playing .chat-voice-message-player-icon::before {
  width: 7px;
  height: 8px;
  margin-left: 0;
  border: 0;
  background:
    linear-gradient(90deg, currentColor 0 2px, transparent 2px 5px, currentColor 5px 7px);
}

.chat-voice-waveform {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1px;
  min-width: 0;
  height: 30px;
  overflow: hidden;
}

.chat-voice-waveform i {
  flex: 1 1 1px;
  width: 2px;
  min-width: 1px;
  height: max(3px, var(--chat-voice-level, 12%));
  border-radius: 2px;
  background: currentColor;
  opacity: .28;
  transform-origin: center;
  transition: height 80ms linear, opacity 120ms ease, background-color 120ms ease;
}

.chat-voice-message-waveform {
  display: grid;
  grid-template-columns: repeat(28, 2px);
  justify-content: space-between;
  gap: 0;
}

.chat-voice-message-waveform i {
  width: 2px;
  min-width: 2px;
}

.chat-voice-waveform i.is-played {
  color: #7bd8ba;
  opacity: .96;
}

.chat-voice-message-player.is-playing .chat-voice-waveform i {
  animation: chat-voice-fluid-wave 980ms cubic-bezier(.45, 0, .55, 1) infinite;
  animation-delay: var(--chat-voice-delay, 0ms);
  will-change: transform;
}

.chat-voice-message-player time {
  color: inherit;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  opacity: .62;
  text-align: right;
  white-space: nowrap;
}

.chat-voice-message-tools {
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  min-height: 31px;
  padding: 3px 10px 5px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.chat-voice-message-transcript-toggle {
  display: grid;
  place-items: center;
  width: 25px;
  height: 23px;
  padding: 0;
  color: inherit;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, .10);
  cursor: pointer;
  opacity: .76;
}

.chat-voice-message-transcript-toggle[aria-expanded="true"] {
  color: #143f35;
  background: #7bd8ba;
  opacity: 1;
}

.chat-voice-message-transcript-toggle:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 1px;
}

.chat-voice-message-transcript-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.chat-voice-message-transcript {
  display: block;
  min-width: 0;
  padding: 9px 12px 11px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  text-align: left;
  white-space: pre-wrap;
}

.chat-voice-message-transcript[hidden] {
  display: none;
}

.chat-voice-message > .chat-thread-bubble-translation {
  margin: 0;
  padding: 9px 12px 11px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  overflow-wrap: anywhere;
}

@keyframes chat-voice-fluid-wave {
  0%,
  100% {
    transform: scaleY(.78);
  }

  35% {
    transform: scaleY(1.08);
  }

  68% {
    transform: scaleY(.88);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-voice-message-player.is-playing .chat-voice-waveform i {
    animation: none;
  }
}

.chat-thread-bubble-time {
  color: rgba(0, 0, 0, .42);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  padding: 0 4px;
  white-space: nowrap;
}

.chat-thread-bubble-row.from-user .chat-thread-bubble {
  color: var(--chat-thread-user-ink);
  border-color: transparent;
  background: var(--chat-thread-user-fill);
  box-shadow:
    0 5px 14px rgba(21, 36, 32, .14),
    inset 0 1px 0 rgba(255, 255, 255, .14);
}

.chat-thread-bubble-row.from-user .chat-thread-bubble.has-chat-record {
  color: var(--chat-ink);
  background: #f7f7f5;
  box-shadow:
    0 7px 18px rgba(0, 0, 0, .10),
    inset 0 0 0 1px rgba(0, 0, 0, .045);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.chat-thread-bubble-row.from-user .chat-thread-bubble-quote {
  color: rgba(0, 0, 0, .58);
  background: rgba(0, 0, 0, .07);
}

.chat-thread-bubble-row.from-system .chat-thread-bubble {
  max-width: 86%;
  padding: 7px 12px;
  color: rgba(0, 0, 0, .50);
  border: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

.chat-thread-bubble-row.from-system .chat-thread-bubble.has-system-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 6px 9px 5px;
  color: #316d63;
  border-bottom: 1px solid rgba(49, 109, 99, .34);
  border-radius: 0;
  cursor: pointer;
}

.chat-thread-bubble-row.from-system .chat-thread-bubble.has-system-action:focus-visible {
  outline: 2px solid rgba(49, 109, 99, .38);
  outline-offset: 3px;
}

.chat-system-action-arrow {
  flex: 0 0 auto;
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
}

.chat-composer {
  position: relative;
  z-index: 10;
  justify-self: center;
  display: grid;
  grid-template-columns: 42px 42px minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  min-height: 0;
  width: min(100%, var(--chat-thread-max-width));
  padding: 9px 0 0;
  border: 0;
  border-top: 1px solid var(--chat-thread-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.chat-composer-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  align-items: end;
  gap: 4px;
  min-height: 46px;
  padding: 6px;
  border: 1px solid var(--chat-thread-border);
  border-radius: 999px;
  background: var(--chat-thread-surface-strong);
  box-shadow: 0 4px 14px rgba(28, 39, 35, .07);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.chat-composer-field.has-context {
  border-radius: 18px;
}

.chat-composer-context {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 3px 4px 7px;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
}

.chat-composer-context[hidden] {
  display: none;
}

.chat-composer-context > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-left: 8px;
  border-left: 2px solid rgba(0, 0, 0, .28);
}

.chat-composer-context b,
.chat-composer-context small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-composer-context b {
  color: var(--chat-ink);
  font-size: 11px;
  font-weight: 650;
}

.chat-composer-context small {
  color: var(--chat-faint);
  font-size: 10px;
  font-weight: 500;
}

.chat-composer-context button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--chat-faint);
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.chat-composer-context button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.chat-composer-add {
  position: relative;
  display: grid;
  align-items: end;
  justify-items: start;
  width: 42px;
  min-width: 0;
}

.chat-composer-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 2;
  display: grid;
  gap: 2px;
  width: 164px;
  max-height: min(352px, calc(var(--chat-visual-height, 100dvh) - 164px));
  padding: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--chat-ink);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  background: rgba(247, 248, 245, .94);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, .18),
    inset 0 1px 0 rgba(255, 255, 255, .68);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  backdrop-filter: blur(22px) saturate(130%);
  overscroll-behavior: contain;
  scrollbar-width: none;
  transform-origin: bottom left;
  animation: chat-composer-menu-in 140ms ease-out;
}

.chat-composer-menu[hidden] {
  display: none;
}

.chat-composer-menu::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.chat-composer-menu button {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  color: rgba(16, 16, 16, .76);
  border: 0;
  border-radius: 6px;
  background: transparent;
  font: 650 13px/1.25 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
}

.chat-composer-menu button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.chat-composer-menu button span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (hover: hover) and (pointer: fine) {
  .chat-composer-menu button:hover {
    color: var(--chat-ink);
    background: rgba(16, 16, 16, .055);
  }
}

.chat-composer-menu button:active {
  color: var(--chat-ink);
  background: rgba(16, 16, 16, .08);
}

.chat-composer-menu button:focus-visible {
  outline: 2px solid rgba(16, 16, 16, .34);
  outline-offset: -2px;
}

.chat-composer-plus > svg {
  transition: transform 140ms ease-out;
}

.chat-composer-menu button[hidden] {
  display: none;
}

.chat-composer-menu button[aria-checked="true"] {
  color: #285f52;
  background: rgba(47, 111, 92, .12);
}

.chat-composer-menu button:disabled {
  color: rgba(16, 16, 16, .38);
  background: transparent;
  cursor: default;
  opacity: .74;
}

.chat-composer[data-anonymous="true"] .chat-composer-field {
  box-shadow:
    var(--chat-emboss-shadow),
    inset 0 0 0 1px rgba(47, 111, 92, .24);
}
.chat-composer-plus[aria-expanded="true"] > svg {
  transform: rotate(45deg);
}

.chat-composer-plus:focus-visible {
  outline: 2px solid rgba(16, 16, 16, .30);
  outline-offset: 2px;
}

@keyframes chat-composer-menu-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chat-composer-plus,
.chat-composer-sticker {
  width: 42px;
  height: 42px;
  color: rgba(0, 0, 0, .70);
  border: 1px solid var(--chat-thread-border);
  background: var(--chat-thread-surface);
  box-shadow: 0 3px 11px rgba(28, 39, 35, .055);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.chat-composer-button.chat-composer-sticker:disabled {
  cursor: default;
  opacity: 1;
}

.chat-composer textarea {
  display: block;
  width: 100%;
  min-width: 0;
  max-height: 96px;
  min-height: 22px;
  height: 22px;
  margin: 6px 0;
  padding: 1px 4px 0;
  overflow-x: hidden;
  overflow-y: auto;
  resize: none;
  color: var(--chat-ink);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
  font: 500 14px/20px Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  scrollbar-width: none;
}

.chat-composer textarea::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.chat-composer textarea::placeholder {
  color: rgba(0, 0, 0, .38);
}

.chat-composer textarea[hidden] {
  display: none;
}

.chat-composer textarea:focus,
.chat-composer textarea:focus-visible,
.chat-thread-back:focus-visible,
.chat-thread-action:focus-visible,
.chat-thread-settings-signature:focus-visible,
.chat-thread-settings-row:focus-visible,
.chat-thread-reply-count-control input:focus,
.chat-thread-reply-count-control input:focus-visible,
.chat-composer-button:focus-visible {
  box-shadow: none;
  outline: 0;
}

.chat-composer-send {
  color: #fff;
  background: rgba(17, 17, 17, .88);
  box-shadow:
    4px 6px 13px rgba(0, 0, 0, .13),
    inset 1px 1px 0 rgba(255, 255, 255, .20);
}

.chat-composer-send svg {
  width: 19px;
  height: 19px;
}

.chat-composer-stop-icon {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: currentColor;
}

.chat-composer-send svg[hidden],
.chat-composer-voice svg[hidden],
.chat-composer-stop-icon[hidden] {
  display: none;
}

.chat-composer-button:disabled {
  cursor: default;
  opacity: .42;
}

.chat-composer-send[data-generating="true"] {
  opacity: 1;
}

.chat-message-selection-bar {
  justify-self: stretch;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) repeat(3, 38px);
  align-items: center;
  gap: 7px;
  min-height: 50px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-message-selection-bar[hidden] {
  display: none;
}

.chat-message-selection-bar button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--chat-muted);
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.chat-message-selection-bar button.danger {
  color: #a23a34;
}

.chat-message-selection-bar button:disabled {
  cursor: default;
  opacity: .34;
}

.chat-message-selection-bar button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.chat-message-selection-bar output {
  color: var(--chat-ink);
  font-size: 13px;
  font-weight: 650;
  text-align: left;
}

.chat-sticker-topbar-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 30px;
  align-items: center;
  gap: 8px;
}

.chat-sticker-view {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
}
.chat-mini-theater-view {
  display: grid;
  align-content: start;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 2px 20px;
  scrollbar-width: none;
}

.chat-mini-theater-view::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.chat-mini-theater-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 10px 4px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
  background: rgba(246, 246, 243, .82);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
}

.chat-mini-theater-head > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.chat-mini-theater-head small {
  color: #8b4f4a;
  font: 700 9px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .08em;
}

.chat-mini-theater-head strong {
  overflow: hidden;
  color: var(--chat-ink);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 18px;
  font-weight: 760;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-mini-theater-head time {
  flex: 0 0 auto;
  padding-bottom: 2px;
  color: rgba(0, 0, 0, .46);
  font: 600 10px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
  white-space: nowrap;
}

.chat-mini-theater-scene-list {
  display: grid;
  min-width: 0;
}

.chat-mini-theater-scene {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 24px 4px 26px;
  border-bottom: 1px solid rgba(0, 0, 0, .10);
}

.chat-mini-theater-scene:last-child {
  border-bottom: 0;
}

.chat-mini-theater-scene > header {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.chat-mini-theater-scene > header small {
  color: #8b4f4a;
  font: 700 9px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .08em;
}

.chat-mini-theater-scene h2 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--chat-ink);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 16px;
  font-weight: 760;
  line-height: 1.35;
}

.chat-mini-theater-scene-body {
  min-width: 0;
  overflow-wrap: anywhere;
  color: rgba(16, 16, 16, .78);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.chat-mini-theater-scene.is-interactive {
  padding-inline: 0;
}

.chat-mini-theater-scene.is-interactive > header {
  padding-inline: 4px;
}

.chat-mini-theater-scene-body.is-interactive {
  display: block;
  overflow-wrap: normal;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: normal;
  white-space: normal;
}

.chat-mini-theater-scene-frame {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 360px;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(48, 34, 28, .08);
}

.chat-mini-theater-scene-frame:focus-visible {
  outline: 2px solid rgba(139, 79, 74, .62);
  outline-offset: 2px;
}

.chat-sticker-tabs {
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(2, minmax(86px, 1fr));
  gap: 6px;
  padding: 5px;
  border: 0;
  border-radius: 999px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-sticker-tab {
  min-height: 32px;
  padding: 0 16px;
  color: rgba(0, 0, 0, .50);
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
}

.chat-sticker-tab[aria-selected="true"] {
  color: var(--chat-ink);
  background: var(--chat-panel-fill-pressed);
  box-shadow: var(--chat-emboss-shadow);
}

.chat-sticker-owner-panel {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
}

.chat-sticker-owner-panel[hidden],
.chat-sticker-owner-list[hidden],
.chat-composer-sticker-owners[hidden] {
  display: none;
}

.chat-sticker-owner-panel > span {
  overflow: hidden;
  color: rgba(0, 0, 0, .48);
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-sticker-owner-list,
.chat-composer-sticker-owners {
  display: flex;
  gap: 6px;
  min-width: 0;
  padding: 1px 1px 3px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.chat-sticker-owner-list::-webkit-scrollbar,
.chat-composer-sticker-owners::-webkit-scrollbar {
  display: none;
}

.chat-sticker-owner-list button,
.chat-composer-sticker-owners button {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  max-width: 156px;
  min-height: 32px;
  padding: 4px 9px 4px 5px;
  color: rgba(0, 0, 0, .56);
  border: 1px solid transparent;
  border-radius: 7px;
  background: rgba(255, 255, 255, .42);
  font: 600 11px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}

.chat-sticker-owner-list button > span,
.chat-composer-sticker-owners button > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, .94);
  border-radius: 50%;
  background: rgba(33, 33, 33, .72);
  font-size: 10px;
}

.chat-sticker-owner-list button > b,
.chat-composer-sticker-owners button > b {
  min-width: 0;
  overflow: hidden;
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-sticker-owner-list button[aria-selected="true"],
.chat-composer-sticker-owners button[aria-selected="true"] {
  color: var(--chat-ink);
  border-color: rgba(0, 0, 0, .10);
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .10);
}

.chat-sticker-owner-list button:focus-visible,
.chat-composer-sticker-owners button:focus-visible {
  outline: 2px solid rgba(0, 0, 0, .34);
  outline-offset: 1px;
}
.chat-sticker-group-list {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1px 1px 10px;
  scrollbar-width: none;
}

.chat-sticker-group-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.chat-sticker-group-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 0;
  border-radius: 16px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
}

.chat-sticker-group-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.chat-sticker-group-card header > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chat-sticker-group-card strong {
  overflow: hidden;
  color: var(--chat-ink);
  font-size: 13px;
  font-weight: 450;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-sticker-group-card small {
  color: rgba(0, 0, 0, .46);
  font-size: 11px;
  font-weight: 400;
}

.chat-sticker-group-actions {
  display: grid;
  grid-auto-flow: column;
  gap: 7px;
}

.chat-sticker-group-action {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: rgba(0, 0, 0, .62);
  border: 0;
  border-radius: 50%;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  cursor: pointer;
}

.chat-sticker-group-action.danger {
  color: rgba(151, 42, 42, .72);
}

.chat-sticker-group-action svg,
.chat-sticker-topbar-actions svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.85;
}

.chat-sticker-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 9px;
  min-width: 0;
}

.chat-sticker-item {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.chat-sticker-item-preview,
.chat-sticker-preview {
  width: 100%;
  aspect-ratio: 1;
  border: 0;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
}

.chat-sticker-item-preview {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 4px;
  overflow: hidden;
  cursor: zoom-in;
}

.chat-sticker-item-preview:hover {
  background: var(--chat-panel-fill-pressed);
}

.chat-sticker-item-preview:focus-visible {
  outline: 2px solid rgba(0, 0, 0, .34);
  outline-offset: 2px;
}

.chat-sticker-item img {
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: contain;
}

.chat-sticker-item figcaption {
  overflow: hidden;
  color: rgba(0, 0, 0, .52);
  font-size: 10px;
  font-weight: 400;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-sticker-item-recognize {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 4px 6px;
  color: rgba(0, 0, 0, .64);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 6px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  font-size: 10px;
  font-weight: 450;
  line-height: 1.2;
  cursor: pointer;
}

.chat-sticker-item-recognize:hover:not(:disabled) {
  color: var(--chat-ink);
  background: var(--chat-panel-fill-pressed);
}

.chat-sticker-item-recognize:focus-visible {
  outline: 2px solid rgba(0, 0, 0, .34);
  outline-offset: 2px;
}

.chat-sticker-item-recognize:disabled {
  cursor: progress;
  opacity: .54;
}

.chat-sticker-empty,
.chat-sticker-page-empty {
  margin: 0;
  padding: 18px 8px;
  color: rgba(0, 0, 0, .46);
  font-size: 12px;
  font-weight: 400;
  text-align: center;
}

.chat-sticker-preview {
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(100%, 168px);
  overflow: hidden;
  color: rgba(0, 0, 0, .44);
  font-size: 12px;
  font-weight: 400;
}

.chat-sticker-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.chat-sticker-preview img[hidden],
.chat-sticker-preview span[hidden] {
  display: none !important;
}

.chat-sticker-upload-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.chat-sticker-upload-row button,
.chat-sticker-export-option {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  -webkit-backdrop-filter: var(--chat-glass-blur);
  backdrop-filter: var(--chat-glass-blur);
  color: rgba(0, 0, 0, .64);
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
}

.chat-sticker-upload-row span {
  overflow: hidden;
  color: rgba(0, 0, 0, .48);
  font-size: 11px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-sticker-export-list {
  display: grid;
  gap: 8px;
}

.chat-sticker-export-option {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  text-align: left;
}


.chat-message-row[aria-current="true"] {
  background: var(--chat-panel-fill-pressed);
}

.chat-composer-voice {
  color: rgba(0, 0, 0, .62);
  border-radius: 50%;
  transition: color 140ms ease, background-color 140ms ease;
}

.chat-composer-voice[aria-pressed="true"] {
  color: #285f52;
  background: rgba(47, 111, 92, .12);
}

.chat-composer[data-voice-mode="true"] .chat-composer-field {
  box-shadow:
    var(--chat-emboss-shadow),
    inset 0 0 0 1px rgba(47, 111, 92, .24);
}

html.night-mode .screen.chat-open .status-bar,
html.night-mode .chat-thread-copy strong,
html.night-mode .chat-thread-empty strong,
html.night-mode .chat-composer textarea {
  color: #f5efe5;
}

html.night-mode .chat-thread-copy small,
html.night-mode .chat-mini-theater-launch {
  color: #e3aaa4;
  border-color: rgba(227, 170, 164, .18);
  background: rgba(39, 32, 33, .96);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .34);
}

html.night-mode .chat-mini-theater-head {
  border-bottom-color: rgba(255, 255, 255, .12);
  background: rgba(25, 25, 26, .82);
}

html.night-mode .chat-mini-theater-head small,
html.night-mode .chat-mini-theater-scene > header small {
  color: #e3aaa4;
}

html.night-mode .chat-mini-theater-head strong,
html.night-mode .chat-mini-theater-scene h2 {
  color: rgba(255, 255, 255, .90);
}

html.night-mode .chat-mini-theater-head time,
html.night-mode .chat-mini-theater-scene-body {
  color: rgba(255, 255, 255, .64);
}

html.night-mode .chat-mini-theater-scene-frame {
  border-color: rgba(255, 255, 255, .14);
  background: #171715;
}

html.night-mode .chat-mini-theater-scene {
  border-bottom-color: rgba(255, 255, 255, .10);
}
html.night-mode .chat-thread-bubble-time,
html.night-mode .chat-thread-bubble-author,
html.night-mode .chat-thread-empty,
html.night-mode .chat-thread-empty small,
html.night-mode .chat-thread-reply-notice,
html.night-mode .chat-composer textarea::placeholder,
html.night-mode .chat-composer-plus,
html.night-mode .chat-composer-sticker,
html.night-mode .chat-composer-voice {
  color: rgba(245, 239, 229, .52);
}

html.night-mode .chat-composer-voice[aria-pressed="true"] {
  color: #e3aaa4;
  background: rgba(227, 170, 164, .12);
}

html.night-mode .chat-composer[data-voice-mode="true"] .chat-composer-field {
  box-shadow:
    var(--chat-emboss-shadow),
    inset 0 0 0 1px rgba(227, 170, 164, .24);
}

html.night-mode .chat-thread-load-earlier {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  color: rgba(245, 239, 229, .68);
}

html.night-mode .chat-thread-typing-bubble {
  color: rgba(245, 239, 229, .62);
}

html.night-mode .chat-thread-reply-notice {
  border-left-color: rgba(245, 239, 229, .22);
}

html.night-mode .chat-thread-typing[data-tone="error"] .chat-thread-reply-notice {
  color: #ef9b95;
  border-left-color: #c96760;
}

html.night-mode .chat-thread-avatar {
  color: rgba(245, 239, 229, .72);
}

html.night-mode .chat-thread-bubble-avatar {
  color: rgba(245, 239, 229, .72);
  background: rgba(245, 239, 229, .16);
  box-shadow: none;
}

html.night-mode .chat-thread-bubble-row.from-user .chat-thread-bubble,
html.night-mode .chat-composer-send {
  color: #111;
  background: rgba(245, 239, 229, .90);
}

html.night-mode .chat-thread-bubble-row.from-user .chat-voice-message-transcript {
  border-top-color: rgba(0, 0, 0, .13);
}

html.night-mode .chat-thread-bubble-row.from-user .chat-voice-message-tools {
  border-top-color: rgba(0, 0, 0, .12);
}

html.night-mode .chat-thread-bubble-row.from-user .chat-voice-message-transcript-toggle {
  background: rgba(0, 0, 0, .07);
}

html.night-mode .chat-thread-bubble-row.from-user .chat-voice-message-transcript-toggle[aria-expanded="true"] {
  color: #143f35;
  background: #64c7a7;
}

html.night-mode .chat-thread-bubble-row.from-system .chat-thread-bubble {
  color: rgba(245, 239, 229, .52);
  background: transparent;
  box-shadow: none;
}

html.night-mode button.chat-thread-bubble:focus-visible {
  outline-color: rgba(245, 239, 229, .42);
}

html.night-mode .chat-thread-bubble-translation {
  color: rgba(245, 239, 229, .62);
  border-top-color: rgba(245, 239, 229, .24);
}

html.night-mode .chat-thread-bubble-translation[data-tone="pending"] {
  color: rgba(245, 239, 229, .44);
}

html.night-mode .chat-thread-bubble-translation[data-tone="error"] {
  color: #ef9b95;
}

html.night-mode .chat-thread-bubble-quote,
html.night-mode .chat-thread-bubble-row.from-user .chat-thread-bubble-quote {
  color: rgba(245, 239, 229, .66);
  background: rgba(245, 239, 229, .10);
}

html.night-mode .chat-thread-bubble-row[aria-selected="true"] .chat-thread-bubble {
  outline-color: rgba(245, 239, 229, .48);
}

html.night-mode .chat-message-select-control {
  border-color: rgba(245, 239, 229, .32);
}

html.night-mode .chat-message-select-control[aria-pressed="true"] {
  color: #111;
  border-color: rgba(245, 239, 229, .88);
  background: rgba(245, 239, 229, .88);
}

html.night-mode .chat-composer-menu {
  border-color: rgba(245, 239, 229, .11);
  background: rgba(28, 29, 28, .94);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, .38),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}

html.night-mode .chat-composer-menu button {
  color: rgba(245, 239, 229, .76);
}

html.night-mode .chat-composer-menu button:hover,
html.night-mode .chat-composer-menu button:active {
  color: #f5efe5;
  background: rgba(245, 239, 229, .09);
}

html.night-mode .chat-composer-menu button:focus-visible,
html.night-mode .chat-composer-plus:focus-visible {
  outline-color: rgba(245, 239, 229, .42);
}

html.night-mode .chat-composer-menu button[aria-checked="true"] {
  color: #a9d7ca;
  background: rgba(83, 153, 132, .16);
}

html.night-mode .chat-composer-menu button:disabled {
  color: rgba(245, 239, 229, .36);
  background: transparent;
}

html.night-mode .chat-thread-bubble-row[data-anonymous-color="0"] {
  --chat-anonymous-accent: #79b8b5;
}

html.night-mode .chat-thread-bubble-row[data-anonymous-color="1"] {
  --chat-anonymous-accent: #b69bc0;
}

html.night-mode .chat-thread-bubble-row[data-anonymous-color="2"] {
  --chat-anonymous-accent: #d28f9a;
}

html.night-mode .chat-thread-bubble-row[data-anonymous-color="3"] {
  --chat-anonymous-accent: #aab68b;
}

html.night-mode .chat-thread-bubble-row[data-anonymous-color="4"] {
  --chat-anonymous-accent: #92acd0;
}

html.night-mode .chat-thread-bubble-row[data-anonymous-color="5"] {
  --chat-anonymous-accent: #a6adb4;
}

html.night-mode .chat-thread-bubble-row.is-anonymous-message .chat-thread-bubble-avatar {
  background: color-mix(in srgb, var(--chat-anonymous-accent) 28%, #252726);
}
html.night-mode .chat-composer-context {
  border-bottom-color: rgba(245, 239, 229, .14);
}

html.night-mode .chat-composer-context > span {
  border-left-color: rgba(245, 239, 229, .30);
}

html.night-mode .chat-composer-context b,
html.night-mode .chat-message-selection-bar output,
html.night-mode .chat-favorite-item strong,
html.night-mode .chat-favorite-item > p,
html.night-mode .chat-favorites-head strong,
html.night-mode .chat-favorites-empty strong,
html.night-mode .chat-message-forward-option strong {
  color: #f5efe5;
}

html.night-mode .chat-composer-context small,
html.night-mode .chat-composer-context button,
html.night-mode .chat-message-selection-bar button,
html.night-mode .chat-favorite-item small,
html.night-mode .chat-favorite-item time,
html.night-mode .chat-favorite-remove,
html.night-mode .chat-favorites-head > span,
html.night-mode .chat-favorites-empty,
html.night-mode .chat-message-forward-option small {
  color: rgba(245, 239, 229, .52);
}

html.night-mode .chat-favorite-quote {
  color: rgba(245, 239, 229, .58);
  border-left-color: rgba(245, 239, 229, .22);
}

html.night-mode .chat-message-action-card {
  background: rgba(28, 29, 31, .95);
}

html.night-mode .chat-message-action-card button {
  color: rgba(245, 239, 229, .76);
}

html.night-mode .chat-message-action-card button:active {
  background: rgba(245, 239, 229, .07);
}

html.night-mode .chat-message-action-card button.danger,
html.night-mode .chat-message-selection-bar button.danger {
  color: #ef9b95;
}

html.night-mode .chat-message-forward-card,
html.night-mode .chat-record-detail-card {
  background: #202123;
}

html.night-mode .chat-message-forward-option {
  background: #2a2b2e;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .065),
    0 5px 14px rgba(0, 0, 0, .16);
}

html.night-mode .chat-thread-bubble-row.from-user .chat-thread-bubble.has-chat-record {
  color: #f5efe5;
  background: #292a2d;
  box-shadow:
    0 7px 18px rgba(0, 0, 0, .22),
    inset 0 0 0 1px rgba(255, 255, 255, .06);
}

html.night-mode .chat-record-message > strong,
html.night-mode .chat-record-detail-copy > header strong,
html.night-mode .chat-record-detail-copy > p {
  color: #f5efe5;
}

html.night-mode .chat-record-message-preview,
html.night-mode .chat-record-detail-quote {
  color: rgba(245, 239, 229, .58);
  background: rgba(245, 239, 229, .07);
}

html.night-mode .chat-record-message-preview {
  border-color: rgba(245, 239, 229, .09);
}

html.night-mode .chat-record-message-footer,
html.night-mode .chat-record-detail-copy > header time {
  color: rgba(245, 239, 229, .42);
}

html.night-mode .chat-record-detail-entry {
  border-bottom-color: rgba(245, 239, 229, .10);
}

html.night-mode .chat-message-edit-card textarea {
  color: #f5efe5;
}

html.night-mode .chat-message-edit-card,
html.night-mode .chat-message-edit-card .chat-dialog-actions {
  background: #202123;
}

html.night-mode .chat-message-edit-field > span,
html.night-mode .chat-message-edit-attachment {
  color: rgba(245, 239, 229, .62);
}

html.night-mode .chat-message-edit-attachment {
  background: rgba(245, 239, 229, .08);
}

html.night-mode .chat-message-edit-attachment strong {
  color: #f5efe5;
}

html.night-mode .chat-message-edit-card textarea:focus-visible {
  box-shadow:
    var(--chat-emboss-shadow),
    0 0 0 1px rgba(245, 239, 229, .22);
}

html.night-mode .chat-thread-placeholder strong {
  color: #f5efe5;
}

html.night-mode .chat-thread-placeholder,
html.night-mode .chat-thread-placeholder small,
html.night-mode .chat-thread-arc-button {
  color: rgba(245, 239, 229, .56);
}

html.night-mode .chat-thread-settings-profile,
html.night-mode .chat-thread-settings-avatar {
  color: rgba(245, 239, 229, .78);
}

html.night-mode .chat-thread-settings-profile-copy strong,
html.night-mode .chat-thread-settings-row b,
html.night-mode .chat-thread-voice-parameter b,
html.night-mode .chat-group-settings-name,
html.night-mode .chat-group-qr-preview strong,
html.night-mode .chat-group-qr-forward-option strong {
  color: #f5efe5;
}

html.night-mode .chat-thread-settings-signature,
html.night-mode .chat-thread-settings-section h2,
html.night-mode .chat-thread-settings-row small,
html.night-mode .chat-thread-settings-range output,
html.night-mode .chat-thread-reply-count-control label span,
html.night-mode .chat-thread-reply-count-separator,
html.night-mode .chat-group-settings-number,
html.night-mode .chat-group-settings-section-head span,
html.night-mode .chat-group-settings-member-name,
html.night-mode .chat-group-settings-member-role,
html.night-mode .chat-group-settings-member-identity,
html.night-mode .chat-group-settings-member-action small,
html.night-mode .chat-group-qr-preview span,
html.night-mode .chat-group-qr-forward-option small,
html.night-mode .chat-group-qr-forward-empty {
  color: rgba(245, 239, 229, .52);
}

html.night-mode .chat-thread-settings-section > .chat-thread-settings-row:not(:last-child) {
  border-bottom-color: rgba(245, 239, 229, .11);
}

html.night-mode .chat-thread-settings-inline-value,
html.night-mode .chat-thread-settings-inline-input,
html.night-mode .chat-thread-reply-count-control input,
html.night-mode .chat-thread-language-control select,
html.night-mode .chat-thread-voice-parameter output {
  color: rgba(245, 239, 229, .58);
}

html.night-mode .chat-thread-minimax-controls {
  border-bottom-color: rgba(245, 239, 229, .11);
}

html.night-mode .chat-thread-voice-parameter input[type="range"]::-webkit-slider-runnable-track {
  background: rgba(245, 239, 229, .20);
}

html.night-mode .chat-thread-voice-parameter input[type="range"]::-webkit-slider-thumb {
  border-color: rgba(245, 239, 229, .14);
  background: rgba(245, 239, 229, .92);
}

html.night-mode .chat-thread-voice-parameter input[type="range"]::-moz-range-track {
  background: rgba(245, 239, 229, .20);
}

html.night-mode .chat-thread-voice-parameter input[type="range"]::-moz-range-thumb {
  border-color: rgba(245, 239, 229, .14);
  background: rgba(245, 239, 229, .92);
}

html.night-mode .chat-thread-voice-parameter input[type="range"]:focus-visible,
html.night-mode .chat-thread-voice-preview-button:focus-visible {
  outline-color: rgba(245, 239, 229, .48);
}

html.night-mode .chat-thread-voice-preview-button {
  color: rgba(245, 239, 229, .78);
}

html.night-mode .chat-thread-exclusive-api-panel {
  border-bottom-color: rgba(245, 239, 229, .11);
}

html.night-mode .chat-thread-exclusive-field span,
html.night-mode .chat-thread-exclusive-temperature-field output,
html.night-mode .chat-sticker-group-card small,
html.night-mode .chat-sticker-item figcaption,
html.night-mode .chat-sticker-empty,
html.night-mode .chat-sticker-page-empty,
html.night-mode .chat-dialog-check-option small,
html.night-mode .chat-sticker-export-option small,
html.night-mode .chat-dialog-empty,
html.night-mode .chat-sticker-upload-row span {
  color: rgba(245, 239, 229, .52);
}

html.night-mode .chat-thread-exclusive-field input,
html.night-mode .chat-thread-exclusive-field select,
html.night-mode .chat-thread-exclusive-secondary,
html.night-mode .chat-dialog-check-option,
html.night-mode .chat-sticker-tabs,
html.night-mode .chat-sticker-group-card,
html.night-mode .chat-sticker-group-action,
html.night-mode .chat-sticker-item img,
html.night-mode .chat-sticker-item-recognize,
html.night-mode .chat-sticker-preview,
html.night-mode .chat-sticker-upload-row button,
html.night-mode .chat-sticker-export-option {
  color: rgba(245, 239, 229, .72);
}

html.night-mode .chat-sticker-owner-panel,
html.night-mode .chat-sticker-owner-list button,
html.night-mode .chat-composer-sticker-owners button {
  color: rgba(245, 239, 229, .66);
}

html.night-mode .chat-sticker-owner-panel > span {
  color: rgba(245, 239, 229, .52);
}

html.night-mode .chat-sticker-owner-list button,
html.night-mode .chat-composer-sticker-owners button {
  background: rgba(255, 255, 255, .055);
}

html.night-mode .chat-sticker-owner-list button[aria-selected="true"],
html.night-mode .chat-composer-sticker-owners button[aria-selected="true"] {
  color: #f5efe5;
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .12);
}

html.night-mode .chat-sticker-owner-list button:focus-visible,
html.night-mode .chat-composer-sticker-owners button:focus-visible,
html.night-mode .chat-sticker-item-preview:focus-visible {
  outline-color: rgba(245, 239, 229, .48);
}
html.night-mode .chat-sticker-item-recognize {
  border-color: rgba(245, 239, 229, .10);
}

html.night-mode .chat-sticker-item-recognize:hover:not(:disabled) {
  color: #f5efe5;
}

html.night-mode .chat-sticker-item-recognize:focus-visible {
  outline-color: rgba(245, 239, 229, .48);
}

html.night-mode .chat-thread-exclusive-primary {
  color: #111;
  background: rgba(245, 239, 229, .90);
}

html.night-mode .chat-sticker-tab[aria-selected="true"] {
  color: #f5efe5;
  background: var(--chat-panel-fill-pressed);
}

html.night-mode .chat-dialog-check-option strong,
html.night-mode .chat-sticker-export-option strong,
html.night-mode .chat-sticker-group-card strong {
  color: #f5efe5;
}

html.night-mode .chat-sticker-group-action.danger {
  color: rgba(255, 131, 131, .72);
}


html.night-mode .chat-chain-panel {
  border-bottom-color: rgba(245, 239, 229, .11);
}

html.night-mode .chat-chain-panel-head strong,
html.night-mode .chat-chain-entry-copy strong,
html.night-mode .chat-chain-preset-select strong {
  color: #f5efe5;
}

html.night-mode .chat-chain-panel-head small,
html.night-mode .chat-chain-entry-copy small,
html.night-mode .chat-chain-entry-preview,
html.night-mode .chat-chain-depth-position,
html.night-mode .chat-chain-preset-select small,
html.night-mode .chat-chain-empty,
html.night-mode .chat-chain-preset-empty {
  color: rgba(245, 239, 229, .52);
}

html.night-mode .chat-chain-toolbar button,
html.night-mode .chat-chain-icon-button {
  color: rgba(245, 239, 229, .68);
}

html.night-mode .chat-chain-icon-button.danger {
  color: rgba(255, 131, 131, .78);
}

html.night-mode .chat-chain-entry,
html.night-mode .chat-chain-preset-item,
html.night-mode .chat-reasoning-content {
  border-color: rgba(245, 239, 229, .11);
  background: rgba(245, 239, 229, .045);
}

html.night-mode .chat-chain-preset-item.is-active {
  border-color: rgba(245, 239, 229, .26);
  background: rgba(245, 239, 229, .09);
}

html.night-mode .chat-chain-empty,
html.night-mode .chat-chain-preset-empty {
  border-color: rgba(245, 239, 229, .14);
}

html.night-mode .chat-chain-entry-chevron {
  stroke: rgba(245, 239, 229, .54);
}

html.night-mode .chat-chain-entry-preview {
  border-top-color: rgba(245, 239, 229, .11);
}

html.night-mode #chatChainEntryDialog .chat-field input,
html.night-mode #chatChainEntryDialog .chat-field textarea,
html.night-mode #chatChainEntryDialog .chat-field select,
html.night-mode #chatChainPresetNameDialog .chat-field input {
  border-color: rgba(245, 239, 229, .20);
}

html.night-mode #chatChainEntryDialog .chat-field input:focus,
html.night-mode #chatChainEntryDialog .chat-field textarea:focus,
html.night-mode #chatChainEntryDialog .chat-field select:focus-visible,
html.night-mode #chatChainPresetNameDialog .chat-field input:focus {
  border-color: rgba(245, 239, 229, .48);
}

html.night-mode .chat-chain-entry-toggle i {
  background: rgba(245, 239, 229, .16);
}

html.night-mode .chat-chain-entry-toggle input:checked + i {
  background: rgba(245, 239, 229, .82);
}

html.night-mode .chat-chain-entry-toggle input:checked + i::after {
  background: rgba(20, 20, 20, .82);
}

html.night-mode .chat-reasoning-content {
  color: rgba(245, 239, 229, .76);
}

html.night-mode .chat-thread-settings-toggle i {
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
}

html.night-mode .chat-thread-settings-toggle i::after {
  background: rgba(245, 239, 229, .68);
}

html.night-mode .chat-thread-settings-toggle input:checked + i {
  background: rgba(245, 239, 229, .82);
}

html.night-mode .chat-thread-settings-toggle input:checked + i::after {
  background: rgba(20, 20, 20, .82);
}

html.night-mode .chat-thread-settings-toggle input:focus-visible + i {
  outline-color: rgba(245, 239, 229, .48);
}

html.night-mode .chat-group-settings-profile,
html.night-mode .chat-group-settings-avatar,
html.night-mode .chat-group-settings-name-input,
html.night-mode .chat-group-settings-qr-button,
html.night-mode .chat-group-settings-member-avatar,
html.night-mode .chat-group-settings-member-action button,
html.night-mode .chat-group-qr-forward-option {
  color: rgba(245, 239, 229, .72);
}

html.night-mode .chat-group-settings-number b {
  color: rgba(245, 239, 229, .62);
}

html.night-mode .chat-group-settings-member-actions {
  border-top-color: rgba(245, 239, 229, .11);
}

html.night-mode .chat-group-qr-preview b {
  color: rgba(245, 239, 229, .68);
}

html.night-mode .chat-group-qr-forward {
  color: #111;
  background: rgba(245, 239, 229, .90);
}

html.night-mode .chat-thread-arc-nav::before {
  background: linear-gradient(90deg, transparent, rgba(245, 239, 229, .20), transparent);
}


html.night-mode .chat-thread-arc-button {
  background: transparent;
}

html.night-mode .chat-thread-arc-button[aria-selected="true"] {
  color: #f5efe5;
  background: rgba(255, 255, 255, .09);
}

html.night-mode .chat-thread-star {
  color: #edf0f7;
}

html.low-performance-mode .chat-thread-avatar,
html.low-performance-mode .chat-thread-bubble-avatar,
html.low-performance-mode .chat-thread-bubble,
html.low-performance-mode .chat-thread-typing-bubble,
html.low-performance-mode .chat-thread-arc-nav,
html.low-performance-mode .chat-thread-settings-profile,
html.low-performance-mode .chat-group-settings-profile,
html.low-performance-mode .chat-group-settings-avatar,
html.low-performance-mode .chat-composer-field,
html.low-performance-mode .chat-composer-plus,
html.low-performance-mode .chat-composer-sticker,
html.low-performance-mode .chat-composer-menu {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html.low-performance-mode .chat-thread-typing-bubble i,
html.low-performance-mode .chat-thread-bubble-row.is-arriving,
html.low-performance-mode .chat-voice-waveform i {
  animation: none !important;
}

@media (max-width: 460px) {
  .chat-page.thread-mode {
    gap: 10px;
    padding:
      max(50px, calc(env(safe-area-inset-top) + 36px))
      max(16px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
  }

  .chat-thread-topbar {
    gap: 8px;
  }

  .chat-thread-peer {
    grid-template-columns: 30px 32px minmax(0, 1fr);
    gap: 7px;
  }

  .chat-thread-avatar,
  .chat-thread-back {
    width: 32px;
    height: 32px;
  }

  .chat-thread-actions {
    grid-auto-columns: 28px;
    gap: 5px;
  }

  .chat-thread-action {
    width: 28px;
    height: 30px;
  }

  .chat-thread-action svg {
    width: 18px;
    height: 18px;
  }

  .chat-thread-star {
    top: 40px;
    right: 2px;
    width: 38px;
  }

  .chat-thread-arc-nav {
    top: 54px;
    width: min(246px, calc(100vw - 44px));
    height: 118px;
  }

  .chat-thread-arc-button {
    width: 44px;
    height: 44px;
  }

  .chat-thread-arc-button:nth-child(1) {
    left: 36px;
    top: 28px;
  }

  .chat-thread-arc-button:nth-child(2) {
    left: calc(50% - 22px);
    top: 63px;
  }

  .chat-thread-arc-button:nth-child(3) {
    right: 36px;
    top: 28px;
  }

  .chat-thread-copy strong {
    font-size: 12px;
  }

  .chat-composer {
    grid-template-columns: 40px 40px minmax(0, 1fr);
    gap: 7px;
  }

  .chat-composer-add {
    width: 40px;
  }

  .chat-composer-plus,
  .chat-composer-sticker {
    width: 40px;
    height: 40px;
  }

  .chat-composer-field {
    grid-template-columns: minmax(0, 1fr) 32px 32px;
    min-height: 44px;
    padding: 5px;
  }

}

.chat-message-trailing {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 6px;
  min-width: 28px;
}

.chat-unread-badge {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding-inline: 5px;
  color: #fff;
  border-radius: 9px;
  background: #d9473f;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.chat-message-notification {
  position: absolute;
  top: max(44px, calc(env(safe-area-inset-top) + 34px));
  left: 50%;
  z-index: 40;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(calc(100% - 24px), 420px);
  min-height: 58px;
  padding: 9px 11px;
  color: #171717;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  background: rgba(250, 250, 248, .95);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
  -webkit-backdrop-filter: blur(18px) saturate(118%);
  backdrop-filter: blur(18px) saturate(118%);
  font: inherit;
  text-align: left;
  cursor: pointer;
  animation: chat-message-notification-in 180ms ease-out both;
}

.chat-message-notification[hidden] {
  display: none;
}

.chat-message-notification-avatar {
  width: 40px;
}

.chat-message-notification-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chat-message-notification-copy strong,
.chat-message-notification-copy small,
.chat-message-notification time {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-message-notification-copy strong {
  font-size: 14px;
  font-weight: 760;
}

.chat-message-notification-copy small {
  color: rgba(0, 0, 0, .62);
  font-size: 12px;
}

.chat-message-notification time {
  align-self: start;
  padding-top: 2px;
  color: rgba(0, 0, 0, .42);
  font-size: 10px;
  font-weight: 700;
}

.chat-message-notification:focus-visible {
  outline: 2px solid rgba(0, 0, 0, .52);
  outline-offset: 2px;
}

html.night-mode .chat-unread-badge {
  color: #fff;
  background: #e55a52;
}

html.night-mode .chat-message-notification {
  color: #f5efe5;
  border-color: rgba(255, 255, 255, .1);
  background: rgba(29, 29, 28, .95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .42);
}

html.night-mode .chat-message-notification-copy small {
  color: rgba(245, 239, 229, .68);
}

html.night-mode .chat-message-notification time {
  color: rgba(245, 239, 229, .48);
}

html.low-performance-mode .chat-message-notification {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.chat-session-action[hidden],
.chat-composer-locked[hidden] {
  display: none !important;
}

.chat-session-action:disabled {
  cursor: default;
  opacity: .46;
}

.chat-session-action:disabled:active {
  transform: none;
}

.chat-session-danger,
.chat-session-danger b {
  color: #963e39;
}

.chat-session-settings-status:empty,
.chat-session-confirm-card .chat-status:empty {
  display: none;
}

.chat-composer-locked {
  justify-self: stretch;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 14px;
  color: rgba(0, 0, 0, .52);
  border: 1px solid rgba(0, 0, 0, .065);
  border-radius: 8px;
  background: rgba(247, 247, 245, .82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.chat-composer-locked svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.chat-session-confirm-card {
  width: min(100%, 390px);
}

.chat-session-confirm-message {
  margin: 0;
  color: rgba(0, 0, 0, .62);
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.chat-session-confirm-submit.is-danger {
  color: #fff;
  background: #9b403a;
}

html.night-mode .chat-session-danger,
html.night-mode .chat-session-danger b {
  color: #ef8f88;
}

html.night-mode .chat-composer-locked {
  color: rgba(245, 239, 229, .62);
  border-color: rgba(245, 239, 229, .09);
  background: rgba(29, 29, 28, .82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
}

html.night-mode .chat-session-confirm-message {
  color: rgba(245, 239, 229, .66);
}

html.night-mode .chat-verification-summary {
  border-bottom-color: rgba(245, 239, 229, .11);
}

html.night-mode .chat-verification-summary small,
html.night-mode .chat-verification-summary output,
html.night-mode .chat-verification-copy small,
html.night-mode .chat-verification-item time,
html.night-mode .chat-verification-state,
html.night-mode .chat-group-membership-empty {
  color: rgba(245, 239, 229, .48);
}

html.night-mode .chat-verification-item {
  border-color: rgba(245, 239, 229, .075);
  background: rgba(31, 31, 30, .72);
  box-shadow: 0 7px 20px rgba(0, 0, 0, .20);
}

html.night-mode .chat-verification-item.is-focused {
  border-color: rgba(104, 177, 162, .38);
  box-shadow:
    0 7px 20px rgba(0, 0, 0, .20),
    inset 3px 0 0 #68b1a2;
}

html.night-mode .chat-verification-avatar {
  color: rgba(245, 239, 229, .64);
  background: #343b39;
}

html.night-mode .chat-verification-resolver {
  color: rgba(245, 239, 229, .76);
  border-color: rgba(245, 239, 229, .13);
  background: rgba(245, 239, 229, .07);
}

html.night-mode .chat-verification-reject {
  color: rgba(245, 239, 229, .68);
  background: rgba(245, 239, 229, .09);
}

html.night-mode .chat-verification-approve {
  background: #4f9487;
}

html.night-mode .chat-verification-state.status-approved,
html.night-mode .chat-thread-bubble-row.from-system .chat-thread-bubble.has-system-action {
  color: #72bdad;
}

html.night-mode .chat-verification-state.status-rejected {
  color: #e0928a;
}

html.night-mode .chat-thread-bubble-row.from-system .chat-thread-bubble.has-system-action {
  border-bottom-color: rgba(114, 189, 173, .34);
}

html.low-performance-mode .chat-composer-locked {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

@keyframes chat-message-notification-in {
  from {
    opacity: 0;
    transform: translate(-50%, -10px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-composer-menu {
    animation: none;
  }

  .chat-composer-plus > svg,
  .chat-composer-voice {
    transition: none;
  }

  .chat-message-notification {
    animation: none;
    transform: translateX(-50%);
  }

  .chat-thread-voice-preview-spinner {
    animation: none;
    border-right-color: currentColor;
    opacity: .62;
  }
}

@media (max-width: 420px) {
  .chat-verification-item {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 6px 9px;
    padding: 10px;
  }

  .chat-verification-avatar {
    width: 42px;
  }

  .chat-verification-resolver {
    flex-basis: 100%;
    width: 100%;
    max-width: 100%;
  }

  .chat-verification-actions button {
    min-width: 54px;
    padding-inline: 10px;
  }
}


.chat-reply-console-card {
  position: relative;
  gap: 0;
  width: min(100%, 720px);
  max-height: min(88dvh, 760px);
  padding: 0;
  overflow: hidden;
}

.chat-reply-console-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, .075);
}

.chat-reply-console-head > span {
  min-width: 0;
}

.chat-reply-console-head h2,
.chat-reply-console-head p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-reply-console-head button {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  color: rgba(0, 0, 0, .56);
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, .34);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .07);
  cursor: pointer;
}

.chat-reply-console-head button:focus-visible {
  outline: 2px solid rgba(0, 0, 0, .42);
  outline-offset: 2px;
}

.chat-reply-console-head button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.chat-reply-console-status {
  position: absolute;
  top: 58px;
  right: 58px;
  padding: 3px 7px;
  color: rgba(0, 0, 0, .54);
  border: 1px solid rgba(0, 0, 0, .11);
  border-radius: 4px;
  background: rgba(255, 255, 255, .38);
  font-size: 9px;
  font-weight: 720;
  line-height: 1.2;
}

.chat-reply-console-status[data-tone="success"] {
  color: #24684f;
  border-color: rgba(63, 143, 115, .28);
  background: rgba(63, 143, 115, .09);
}

.chat-reply-console-status[data-tone="error"] {
  color: #a13f35;
  border-color: rgba(211, 109, 93, .32);
  background: rgba(211, 109, 93, .10);
}

.chat-reply-console-empty {
  display: grid;
  min-height: 270px;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 32px;
  color: rgba(0, 0, 0, .42);
  text-align: center;
}

.chat-reply-console-empty[hidden],
.chat-reply-console-content[hidden],
.chat-reply-console-issue-section[hidden],
.chat-reply-console-request-section[hidden],
.chat-reply-console-detail-panel[hidden],
.chat-reply-console-request-error[hidden],
.chat-reply-console-output[hidden],
.chat-reply-console-detail-empty[hidden],
.chat-reply-console-truncated[hidden] {
  display: none !important;
}

.chat-reply-console-empty svg {
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-reply-console-empty strong {
  color: rgba(0, 0, 0, .62);
  font-size: 13px;
}

.chat-reply-console-empty span {
  font-size: 9px;
  letter-spacing: 0;
}

.chat-reply-console-content {
  max-height: calc(min(88dvh, 760px) - 75px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-reply-console-content::-webkit-scrollbar {
  width: 4px;
}

.chat-reply-console-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .18);
}

.chat-reply-console-model-section,
.chat-reply-console-request-section,
.chat-reply-console-breakdown,
.chat-reply-console-hit-section,
.chat-reply-console-issue-section {
  display: grid;
  gap: 10px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, .075);
}

.chat-reply-console-issue-section {
  border-bottom: 0;
}

.chat-reply-console-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.chat-reply-console-section-title strong {
  color: var(--chat-ink);
  font-size: 11px;
  font-weight: 760;
}

.chat-reply-console-section-title span {
  color: rgba(0, 0, 0, .44);
  font-size: 9px;
}

.chat-reply-console-models {
  display: grid;
  gap: 7px;
}

.chat-reply-console-model {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 7px 0;
}

.chat-reply-console-model + .chat-reply-console-model {
  border-top: 1px dashed rgba(0, 0, 0, .08);
}

.chat-reply-console-model > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.chat-reply-console-model strong,
.chat-reply-console-model small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-reply-console-model strong {
  color: var(--chat-ink);
  font-size: 12px;
  font-weight: 720;
}

.chat-reply-console-model small,
.chat-reply-console-model-empty {
  color: rgba(0, 0, 0, .46);
  font-size: 9px;
}

.chat-reply-console-model em {
  flex: 0 0 auto;
  padding: 3px 6px;
  color: rgba(0, 0, 0, .52);
  border: 1px solid rgba(0, 0, 0, .10);
  border-radius: 4px;
  font-size: 8px;
  font-style: normal;
}

.chat-reply-console-phase-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  min-width: 0;
  padding: 3px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .05);
}

.chat-reply-console-phase-tabs[hidden] {
  display: none;
}

.chat-reply-console-phase-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 30px;
  padding: 0 7px;
  overflow: hidden;
  color: rgba(0, 0, 0, .52);
  border: 0;
  border-radius: 4px;
  background: transparent;
  font: 650 9px/1 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}

.chat-reply-console-phase-tabs button:disabled {
  cursor: default;
  opacity: .38;
}

.chat-reply-console-phase-tabs button[aria-selected="true"] {
  color: var(--chat-ink);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .09);
}

.chat-reply-console-phase-tabs button:focus-visible,
.chat-reply-console-detail-tabs button:focus-visible,
button.chat-reply-console-model:focus-visible {
  outline: 2px solid rgba(49, 95, 149, .5);
  outline-offset: 1px;
}

.chat-reply-console-phase-tabs button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-reply-console-phase-tabs button b {
  flex: 0 0 auto;
  min-width: 15px;
  padding: 2px 3px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .06);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  font-weight: 720;
  text-align: center;
}

button.chat-reply-console-model {
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.chat-reply-console-model:hover {
  background: rgba(255, 255, 255, .34);
}

button.chat-reply-console-model[aria-pressed="true"] {
  background: rgba(49, 95, 149, .075);
  box-shadow: inset 0 0 0 1px rgba(49, 95, 149, .17);
}

.chat-reply-console-model-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.chat-reply-console-model > .chat-reply-console-model-badges {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

.chat-reply-console-model-badges i {
  color: #24684f;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.chat-reply-console-model[data-status="error"] .chat-reply-console-model-badges i {
  color: #a13f35;
}

.chat-reply-console-model[data-status="unavailable"] .chat-reply-console-model-badges i {
  color: rgba(0, 0, 0, .42);
}

.chat-reply-console-request-section {
  gap: 11px;
}

.chat-reply-console-request-heading,
.chat-reply-console-request-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.chat-reply-console-request-heading > span,
.chat-reply-console-request-summary {
  min-width: 0;
}

.chat-reply-console-request-heading > span {
  display: grid;
  gap: 2px;
}

.chat-reply-console-request-heading strong,
.chat-reply-console-request-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--chat-ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-reply-console-request-heading strong {
  font-size: 11px;
  font-weight: 760;
}

.chat-reply-console-request-heading small,
.chat-reply-console-request-summary span {
  color: rgba(0, 0, 0, .45);
  font-size: 9px;
}

.chat-reply-console-request-heading em {
  flex: 0 0 auto;
  padding: 3px 6px;
  color: #24684f;
  border: 1px solid rgba(63, 143, 115, .25);
  border-radius: 4px;
  background: rgba(63, 143, 115, .08);
  font-size: 8px;
  font-style: normal;
  font-weight: 720;
}

.chat-reply-console-request-heading em[data-tone="error"] {
  color: #a13f35;
  border-color: rgba(211, 109, 93, .28);
  background: rgba(211, 109, 93, .09);
}

.chat-reply-console-request-heading em[data-tone="unavailable"] {
  color: rgba(0, 0, 0, .48);
  border-color: rgba(0, 0, 0, .10);
  background: rgba(0, 0, 0, .035);
}

.chat-reply-console-request-summary {
  align-items: baseline;
  padding-bottom: 2px;
}

.chat-reply-console-request-summary strong {
  font-size: 12px;
  font-weight: 720;
}

.chat-reply-console-request-summary span {
  flex: 0 1 auto;
  overflow-wrap: anywhere;
  text-align: right;
}

.chat-reply-console-detail-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(210px, 100%);
  padding: 3px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .05);
}

.chat-reply-console-detail-tabs button {
  min-height: 29px;
  padding: 0 14px;
  color: rgba(0, 0, 0, .52);
  border: 0;
  border-radius: 4px;
  background: transparent;
  font: 680 9px/1 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}

.chat-reply-console-detail-tabs button[aria-selected="true"] {
  color: var(--chat-ink);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .09);
}

.chat-reply-console-detail-panel,
.chat-reply-console-prompt {
  display: grid;
  min-width: 0;
}

.chat-reply-console-prompt-entry {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px 0;
  border-top: 1px dashed rgba(0, 0, 0, .09);
}

.chat-reply-console-prompt-entry:first-child {
  padding-top: 1px;
  border-top: 0;
}

.chat-reply-console-prompt-entry > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-reply-console-prompt-entry > header strong {
  color: rgba(0, 0, 0, .68);
  font-size: 9px;
  font-weight: 720;
}

.chat-reply-console-prompt-entry > header span {
  flex: 0 0 auto;
  color: rgba(0, 0, 0, .46);
  font-size: 8px;
  font-weight: 690;
}

.chat-reply-console-prompt-entry[data-role="user"] > header span {
  color: #315f95;
}

.chat-reply-console-prompt-entry[data-role="assistant"] > header span,
.chat-reply-console-prompt-entry[data-role="model"] > header span {
  color: #24684f;
}

.chat-reply-console-prompt-entry pre,
.chat-reply-console-output {
  max-height: 240px;
  margin: 0;
  padding: 9px 10px;
  overflow: auto;
  color: rgba(0, 0, 0, .72);
  border: 1px solid rgba(0, 0, 0, .075);
  border-radius: 5px;
  background: rgba(255, 255, 255, .30);
  font: 10px/1.58 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
  tab-size: 2;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-reply-console-output {
  max-height: 320px;
}

.chat-reply-console-request-error {
  margin: 0 0 9px;
  padding: 8px 9px;
  color: #8f3730;
  border-left: 3px solid #d36d5d;
  background: rgba(211, 109, 93, .09);
  font-size: 9px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.chat-reply-console-detail-empty,
.chat-reply-console-truncated {
  margin: 0;
  color: rgba(0, 0, 0, .43);
  font-size: 9px;
  line-height: 1.5;
}

.chat-reply-console-detail-empty {
  padding: 14px 0 4px;
}

.chat-reply-console-truncated {
  padding-top: 1px;
  color: #76551d;
}

.chat-reply-console-token-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, .075);
}

.chat-reply-console-token-grid > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 0 12px;
  border-right: 1px solid rgba(0, 0, 0, .075);
}

.chat-reply-console-token-grid > div:first-child {
  padding-left: 0;
}

.chat-reply-console-token-grid > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.chat-reply-console-token-grid dt {
  color: rgba(0, 0, 0, .46);
  font-size: 9px;
}

.chat-reply-console-token-grid dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--chat-ink);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  line-height: 1.1;
  text-overflow: ellipsis;
}

.chat-reply-console-token-grid .is-total dd {
  color: #315f95;
}

.chat-reply-console-token-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  padding: 9px 18px 11px;
  color: rgba(0, 0, 0, .44);
  border-bottom: 1px solid rgba(0, 0, 0, .075);
  font-size: 9px;
}

.chat-reply-console-token-meta b {
  color: rgba(0, 0, 0, .66);
  font-variant-numeric: tabular-nums;
}

.chat-reply-console-chart-layout {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.chat-reply-console-chart {
  position: relative;
  display: grid;
  width: 126px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
}

.chat-reply-console-chart::after {
  position: absolute;
  width: 72px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--chat-panel-fill);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .045);
  content: "";
}

.chat-reply-console-chart > span {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: 64px;
  justify-items: center;
  gap: 1px;
}

.chat-reply-console-chart strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--chat-ink);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.chat-reply-console-chart small {
  color: rgba(0, 0, 0, .44);
  font-size: 8px;
}

.chat-reply-console-legend {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.chat-reply-console-legend-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: rgba(0, 0, 0, .62);
  font-size: 9px;
}

.chat-reply-console-legend-row i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.chat-reply-console-legend-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-reply-console-legend-row strong {
  color: var(--chat-ink);
  font-variant-numeric: tabular-nums;
  font-weight: 690;
}

.chat-reply-console-hits {
  display: grid;
  gap: 11px;
}

.chat-reply-console-hit-group {
  display: grid;
  gap: 6px;
}

.chat-reply-console-hit-group > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.chat-reply-console-hit-group > header strong {
  color: rgba(0, 0, 0, .68);
  font-size: 10px;
}

.chat-reply-console-hit-group > header span {
  color: rgba(0, 0, 0, .40);
  font-size: 8px;
}

.chat-reply-console-hit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chat-reply-console-hit-list span {
  max-width: 100%;
  padding: 4px 6px;
  overflow: hidden;
  color: rgba(0, 0, 0, .64);
  border: 1px solid rgba(0, 0, 0, .09);
  border-radius: 4px;
  background: rgba(255, 255, 255, .28);
  font-size: 9px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-reply-console-empty-line {
  margin: 0;
  color: rgba(0, 0, 0, .42);
  font-size: 10px;
}

.chat-reply-console-issues {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chat-reply-console-issues li {
  padding: 8px 9px;
  color: #76551d;
  border-left: 3px solid #d29a38;
  background: rgba(210, 154, 56, .08);
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.chat-reply-console-issues li[data-tone="error"] {
  color: #8f3730;
  border-left-color: #d36d5d;
  background: rgba(211, 109, 93, .09);
}

html.night-mode .chat-reply-console-head,
html.night-mode .chat-reply-console-model-section,
html.night-mode .chat-reply-console-request-section,
html.night-mode .chat-reply-console-breakdown,
html.night-mode .chat-reply-console-hit-section,
html.night-mode .chat-reply-console-token-grid,
html.night-mode .chat-reply-console-token-meta {
  border-color: rgba(245, 239, 229, .10);
}

html.night-mode .chat-reply-console-head button,
html.night-mode .chat-reply-console-status,
html.night-mode .chat-reply-console-hit-list span {
  color: rgba(245, 239, 229, .66);
  border-color: rgba(245, 239, 229, .12);
  background: rgba(245, 239, 229, .06);
}

html.night-mode .chat-reply-console-status[data-tone="success"] {
  color: #83c8ad;
  border-color: rgba(131, 200, 173, .28);
  background: rgba(63, 143, 115, .13);
}

html.night-mode .chat-reply-console-status[data-tone="error"] {
  color: #ef9b95;
  border-color: rgba(239, 155, 149, .28);
  background: rgba(211, 109, 93, .13);
}

html.night-mode .chat-reply-console-empty,
html.night-mode .chat-reply-console-empty span,
html.night-mode .chat-reply-console-section-title span,
html.night-mode .chat-reply-console-model small,
html.night-mode .chat-reply-console-model-empty,
html.night-mode .chat-reply-console-token-grid dt,
html.night-mode .chat-reply-console-token-meta,
html.night-mode .chat-reply-console-chart small,
html.night-mode .chat-reply-console-hit-group > header span,
html.night-mode .chat-reply-console-empty-line {
  color: rgba(245, 239, 229, .46);
}

html.night-mode .chat-reply-console-empty strong,
html.night-mode .chat-reply-console-model strong,
html.night-mode .chat-reply-console-token-grid dd,
html.night-mode .chat-reply-console-token-meta b,
html.night-mode .chat-reply-console-chart strong,
html.night-mode .chat-reply-console-legend-row strong,
html.night-mode .chat-reply-console-hit-group > header strong {
  color: #f5efe5;
}

html.night-mode .chat-reply-console-model + .chat-reply-console-model,
html.night-mode .chat-reply-console-token-grid > div {
  border-color: rgba(245, 239, 229, .10);
}

html.night-mode .chat-reply-console-model em {
  color: rgba(245, 239, 229, .58);
  border-color: rgba(245, 239, 229, .13);
}

html.night-mode .chat-reply-console-token-grid .is-total dd {
  color: #91b7e4;
}

html.night-mode .chat-reply-console-chart::after {
  box-shadow: 0 0 0 1px rgba(245, 239, 229, .06);
}

html.night-mode .chat-reply-console-legend-row,
html.night-mode .chat-reply-console-hit-list span {
  color: rgba(245, 239, 229, .66);
}

html.night-mode .chat-reply-console-issues li {
  color: #e0bc78;
  background: rgba(210, 154, 56, .11);
}

html.night-mode .chat-reply-console-issues li[data-tone="error"] {
  color: #efaaa4;
  background: rgba(211, 109, 93, .12);
}

html.night-mode .chat-reply-console-phase-tabs,
html.night-mode .chat-reply-console-detail-tabs {
  background: rgba(245, 239, 229, .07);
}

html.night-mode .chat-reply-console-phase-tabs button,
html.night-mode .chat-reply-console-detail-tabs button,
html.night-mode .chat-reply-console-request-heading small,
html.night-mode .chat-reply-console-request-summary span,
html.night-mode .chat-reply-console-prompt-entry > header span,
html.night-mode .chat-reply-console-detail-empty {
  color: rgba(245, 239, 229, .48);
}

html.night-mode .chat-reply-console-phase-tabs button[aria-selected="true"],
html.night-mode .chat-reply-console-detail-tabs button[aria-selected="true"] {
  color: #f5efe5;
  background: rgba(245, 239, 229, .11);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
}

html.night-mode button.chat-reply-console-model:hover {
  background: rgba(245, 239, 229, .045);
}

html.night-mode button.chat-reply-console-model[aria-pressed="true"] {
  background: rgba(116, 161, 211, .11);
  box-shadow: inset 0 0 0 1px rgba(145, 183, 228, .22);
}

html.night-mode .chat-reply-console-model-badges i {
  color: #83c8ad;
}

html.night-mode .chat-reply-console-model[data-status="error"] .chat-reply-console-model-badges i {
  color: #ef9b95;
}

html.night-mode .chat-reply-console-model[data-status="unavailable"] .chat-reply-console-model-badges i,
html.night-mode .chat-reply-console-request-heading em[data-tone="unavailable"] {
  color: rgba(245, 239, 229, .46);
}

html.night-mode .chat-reply-console-request-heading strong,
html.night-mode .chat-reply-console-request-summary strong,
html.night-mode .chat-reply-console-prompt-entry > header strong {
  color: #f5efe5;
}

html.night-mode .chat-reply-console-prompt-entry[data-role="user"] > header span {
  color: #91b7e4;
}

html.night-mode .chat-reply-console-prompt-entry[data-role="assistant"] > header span,
html.night-mode .chat-reply-console-prompt-entry[data-role="model"] > header span {
  color: #83c8ad;
}

html.night-mode .chat-reply-console-request-heading em {
  color: #83c8ad;
  border-color: rgba(131, 200, 173, .25);
  background: rgba(63, 143, 115, .13);
}

html.night-mode .chat-reply-console-request-heading em[data-tone="error"] {
  color: #ef9b95;
  border-color: rgba(239, 155, 149, .28);
  background: rgba(211, 109, 93, .13);
}

html.night-mode .chat-reply-console-prompt-entry {
  border-color: rgba(245, 239, 229, .10);
}

html.night-mode .chat-reply-console-prompt-entry pre,
html.night-mode .chat-reply-console-output {
  color: rgba(245, 239, 229, .78);
  border-color: rgba(245, 239, 229, .09);
  background: rgba(245, 239, 229, .045);
}

html.night-mode .chat-reply-console-request-error {
  color: #efaaa4;
  background: rgba(211, 109, 93, .12);
}

html.night-mode .chat-reply-console-truncated {
  color: #e0bc78;
}

html.low-performance-mode .chat-reply-console-card,
html.low-performance-mode .chat-reply-console-chart {
  transition: none;
}

@media (max-width: 520px) {
  .chat-reply-console-dialog {
    padding-right: 10px;
    padding-left: 10px;
  }

  .chat-reply-console-card {
    max-height: min(90dvh, 760px);
  }

  .chat-reply-console-content {
    max-height: calc(min(90dvh, 760px) - 75px);
  }

  .chat-reply-console-chart-layout {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 14px;
  }

  .chat-reply-console-chart {
    width: 108px;
  }

  .chat-reply-console-chart::after {
    width: 62px;
  }

  .chat-reply-console-token-grid dd {
    font-size: 18px;
  }

  .chat-reply-console-request-heading,
  .chat-reply-console-request-summary {
    align-items: flex-start;
  }

  .chat-reply-console-request-summary {
    display: grid;
    gap: 3px;
  }

  .chat-reply-console-request-summary span {
    text-align: left;
  }

  .chat-reply-console-prompt-entry pre,
  .chat-reply-console-output {
    max-height: 210px;
    font-size: 9px;
  }
}

@media (max-width: 360px) {
  .chat-reply-console-phase-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Chat stickers and per-thread vision */
.chat-thread-vision-row {
  align-items: start;
}

.chat-thread-vision-row small {
  overflow: visible;
  line-height: 1.45;
  text-overflow: clip;
  white-space: normal;
}

.chat-thread-vision-status:empty {
  display: none;
}

.chat-composer-sticker-picker {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  width: 100%;
  max-height: min(270px, calc(var(--chat-visual-height, 100dvh) - 190px));
  min-height: 150px;
  padding: 9px;
  overflow: hidden;
  color: var(--chat-ink);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  background: rgba(247, 248, 245, .96);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  backdrop-filter: blur(22px) saturate(130%);
}

.chat-composer-sticker-picker[hidden] {
  display: none;
}

.chat-composer-sticker-picker > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-composer-sticker-picker nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(68px, 1fr));
  gap: 2px;
  width: min(210px, calc(100% - 78px));
  padding: 3px;
  border-radius: 7px;
  background: rgba(0, 0, 0, .055);
}

.chat-composer-sticker-picker nav button,
.chat-composer-sticker-manage,
.chat-composer-sticker-close {
  min-height: 30px;
  padding: 0 10px;
  color: rgba(0, 0, 0, .56);
  border: 0;
  border-radius: 5px;
  background: transparent;
  font: 600 12px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}

.chat-composer-sticker-picker nav button[aria-selected="true"] {
  color: rgba(0, 0, 0, .84);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .10);
}

.chat-composer-sticker-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-composer-sticker-manage,
.chat-composer-sticker-close {
  display: grid;
  place-items: center;
  width: 30px;
  padding: 0;
}

.chat-composer-sticker-manage svg,
.chat-composer-sticker-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.chat-composer-sticker-groups {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.chat-composer-sticker-groups::-webkit-scrollbar {
  width: 0;
}

.chat-composer-sticker-picker-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.chat-composer-sticker-picker-group > h3 {
  margin: 0 2px;
  overflow: hidden;
  color: rgba(0, 0, 0, .48);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-composer-sticker-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 6px;
}

.chat-composer-sticker-option {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  padding: 4px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 7px;
  background: rgba(255, 255, 255, .62);
  cursor: pointer;
}

.chat-composer-sticker-option:disabled {
  cursor: wait;
  opacity: .48;
}

.chat-composer-sticker-option img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.chat-composer-sticker-empty {
  display: grid;
  place-items: center;
  min-height: 94px;
  margin: 0;
  color: rgba(0, 0, 0, .42);
  font-size: 11px;
  text-align: center;
}

.chat-composer-sticker-status {
  min-height: 14px;
  margin: 0;
  font-size: 10px;
}

.chat-composer-sticker-status:empty {
  display: none;
}

.chat-composer-sticker[aria-expanded="true"] {
  color: #fff;
  background: rgba(17, 17, 17, .82);
}

.chat-thread-bubble-row .chat-thread-bubble.has-sticker {
  width: auto;
  max-width: 168px;
  padding: 0;
  overflow: visible;
  color: inherit;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  white-space: normal;
}

.chat-thread-sticker-message {
  display: block;
  width: min(42vw, 156px);
  min-width: 72px;
  max-width: 156px;
  max-height: 190px;
  object-fit: contain;
  border-radius: 7px;
}

html.night-mode .chat-composer-sticker-picker {
  color: rgba(245, 245, 242, .92);
  border-color: rgba(255, 255, 255, .10);
  background: rgba(29, 30, 31, .96);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .07);
}

html.night-mode .chat-composer-sticker-picker nav {
  background: rgba(255, 255, 255, .07);
}

html.night-mode .chat-composer-sticker-picker nav button,
html.night-mode .chat-composer-sticker-manage,
html.night-mode .chat-composer-sticker-close,
html.night-mode .chat-composer-sticker-picker-group > h3,
html.night-mode .chat-composer-sticker-empty {
  color: rgba(245, 245, 242, .56);
}

html.night-mode .chat-composer-sticker-picker nav button[aria-selected="true"] {
  color: rgba(255, 255, 255, .92);
  background: rgba(255, 255, 255, .12);
}

html.night-mode .chat-composer-sticker-option {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .055);
}

@media (max-width: 460px) {
  .chat-sticker-owner-panel {
    padding-right: 8px;
    padding-left: 8px;
  }

  .chat-sticker-owner-list button,
  .chat-composer-sticker-owners button {
    max-width: 128px;
  }

  .chat-sticker-group-card {
    padding: 9px;
  }

  .chat-sticker-group-actions {
    gap: 4px;
  }

  .chat-sticker-group-action {
    width: 30px;
    height: 30px;
  }

  .chat-composer-sticker-picker nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
html.low-performance-mode .chat-composer-sticker-picker {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* Character transfer cards and receipt dialog */
.chat-thread-bubble-row .chat-thread-bubble.has-transfer {
  width: min(119px, 100%);
  padding: 0;
  overflow: visible;
  color: #171817;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  white-space: normal;
}

.chat-transfer-card {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  width: 119px;
  max-width: 100%;
  min-height: 63px;
  padding: 0;
  overflow: hidden;
  color: #171817;
  border: 1px solid rgba(20, 21, 20, .10);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 3px 8px rgba(24, 25, 24, .12);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
  backdrop-filter: blur(18px) saturate(112%);
  font: inherit;
  letter-spacing: 0;
  text-align: left;
}

button.chat-transfer-card {
  cursor: pointer;
}

button.chat-transfer-card:active {
  transform: translateY(1px);
}

button.chat-transfer-card:focus-visible {
  outline: 2px solid rgba(17, 18, 17, .54);
  outline-offset: 2px;
}

.chat-transfer-card-top {
  display: grid;
  align-content: space-between;
  gap: 3px;
  min-height: 34px;
  padding: 4px 7px;
}

.chat-transfer-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  font-size: 8px;
  font-weight: 720;
  line-height: 1.1;
}

.chat-transfer-card-heading > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-transfer-card-heading small {
  flex: 0 0 auto;
  color: rgba(23, 24, 23, .48);
  font-size: 6px;
  font-weight: 650;
  letter-spacing: 0;
}

.chat-transfer-card-amount {
  min-width: 0;
  overflow: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-transfer-card-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  height: 9px;
  padding: 0 4px;
  overflow: hidden;
  color: rgba(255, 255, 255, .92);
  background: #111211;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 5px;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.chat-transfer-card-ribbon span {
  flex: 0 0 auto;
}

.chat-transfer-card-bottom {
  display: grid;
  align-content: center;
  gap: 1px;
  min-height: 20px;
  padding: 2px 7px 3px;
}

.chat-transfer-card-bottom small {
  color: rgba(23, 24, 23, .46);
  font-size: 5.5px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
}

.chat-transfer-card-bottom strong {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  font-size: 7px;
  font-weight: 620;
  line-height: 1.05;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.chat-transfer-card.is-receipt {
  color: rgba(35, 36, 35, .68);
  border-color: rgba(32, 33, 32, .08);
  background: rgba(210, 212, 209, .88);
  box-shadow: 0 3px 6px rgba(24, 25, 24, .09);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.chat-transfer-card.is-receipt .chat-transfer-card-ribbon {
  color: rgba(255, 255, 255, .72);
  background: #484a48;
}

.chat-transfer-card.is-receipt .chat-transfer-card-heading small,
.chat-transfer-card.is-receipt .chat-transfer-card-bottom small {
  color: rgba(35, 36, 35, .46);
}

.chat-transfer-card.is-resolved:not(.is-receipt) .chat-transfer-card-heading small {
  color: #35655d;
}

.chat-transfer-dialog {
  place-items: center;
  padding: 18px;
}

.chat-transfer-dialog-card {
  position: relative;
  justify-items: center;
  gap: 0;
  width: min(100%, 318px);
  padding: 28px 24px 22px;
  overflow: visible;
  border-radius: 8px;
  background: rgba(250, 250, 248, .94);
  box-shadow: 0 22px 54px rgba(20, 21, 20, .20);
  text-align: center;
}

.chat-transfer-dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: rgba(20, 21, 20, .52);
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.chat-transfer-dialog-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.chat-transfer-dialog-close:focus-visible {
  outline: 2px solid rgba(20, 21, 20, .38);
  outline-offset: 1px;
}

.chat-transfer-dialog-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 9px;
}

.chat-transfer-dialog-avatar-image {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  color: rgba(20, 21, 20, .58);
  border: 3px solid rgba(255, 255, 255, .88);
  border-radius: 50%;
  background: #dfe3eb;
  box-shadow: 0 7px 18px rgba(20, 21, 20, .14);
  font-size: 22px;
  font-weight: 760;
}

.chat-transfer-dialog-avatar-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-transfer-dialog-role {
  max-width: 100%;
  overflow: hidden;
  color: rgba(20, 21, 20, .52);
  font-size: 11px;
  font-weight: 680;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-transfer-dialog-amount {
  max-width: 100%;
  margin-top: 5px;
  overflow: hidden;
  color: #171817;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 27px;
  font-variant-numeric: tabular-nums;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-transfer-dialog-remark {
  width: 100%;
  min-height: 36px;
  margin: 13px 0 0;
  padding: 11px 12px;
  color: rgba(20, 21, 20, .62);
  border-top: 1px solid rgba(20, 21, 20, .08);
  border-bottom: 1px solid rgba(20, 21, 20, .08);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chat-transfer-dialog-status {
  width: 100%;
  min-height: 18px;
  margin: 7px 0 5px;
  font-size: 10px;
  text-align: center;
}

.chat-transfer-dialog-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 9px;
  width: 100%;
}

.chat-transfer-dialog-actions button {
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
}

.chat-transfer-dialog-actions button:first-child {
  color: rgba(20, 21, 20, .64);
  background: #e3e4e1;
}

.chat-transfer-dialog-actions button:last-child {
  color: #f9f9f7;
  background: #171817;
}

.chat-transfer-dialog-actions button:disabled {
  cursor: wait;
  opacity: .52;
}

.chat-transfer-dialog-actions button:focus-visible {
  outline: 2px solid rgba(20, 21, 20, .42);
  outline-offset: 2px;
}

html.night-mode .chat-thread-bubble-row .chat-thread-bubble.has-transfer {
  color: #171817;
  background: transparent;
}

html.night-mode .chat-transfer-card:not(.is-receipt) {
  color: #171817;
  border-color: rgba(255, 255, 255, .14);
  background: rgba(248, 248, 245, .90);
}

html.night-mode .chat-transfer-card.is-receipt {
  color: rgba(29, 30, 29, .68);
  background: rgba(190, 193, 189, .92);
}

html.night-mode .chat-transfer-dialog-card {
  color: #171817;
  background: rgba(239, 240, 236, .97);
}

html.night-mode .chat-transfer-dialog-close,
html.night-mode .chat-transfer-dialog-role,
html.night-mode .chat-transfer-dialog-remark {
  color: rgba(20, 21, 20, .60);
}

html.low-performance-mode .chat-transfer-card,
html.low-performance-mode .chat-transfer-dialog-card {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

@media (max-width: 380px) {
  .chat-transfer-card {
    width: min(112px, 100%);
  }

  .chat-transfer-dialog-card {
    width: min(100%, 294px);
    padding-right: 20px;
    padding-left: 20px;
  }
}

/* Asset wallet */
.chat-assets-view {
  display: grid;
  align-content: start;
  gap: 16px;
  width: min(100%, 760px);
  min-height: 100%;
  margin-inline: auto;
  padding: 4px 2px 22px;
  container-type: inline-size;
}

.chat-assets-view[hidden],
.chat-assets-empty[hidden],
.chat-asset-account[hidden],
.chat-asset-carousel[hidden],
.chat-asset-dots[hidden],
.chat-asset-add[hidden],
.chat-assets-button[hidden] {
  display: none;
}

.chat-assets-overview {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 4px 4px 14px;
  border-bottom: 1px solid rgba(20, 29, 27, .12);
}

.chat-assets-overview > span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.chat-assets-overview small {
  overflow: hidden;
  color: var(--chat-faint);
  font: 700 10px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.chat-assets-overview strong {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 15px;
  font-weight: 700;
}

.chat-assets-overview > b {
  flex: 0 0 auto;
  color: var(--chat-ink);
  font: 700 22px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.chat-asset-carousel {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.chat-asset-viewport {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 0 18px;
  scroll-behavior: smooth;
  scroll-padding-inline: 50%;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
}

.chat-asset-viewport::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.chat-asset-track {
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  min-width: 100%;
  padding-inline: max(0px, calc((100% - min(520px, 100%)) / 2));
}

.chat-asset-carousel-arrow {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: rgba(16, 16, 16, .64);
  border: 0;
  border-radius: 50%;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  cursor: pointer;
}

.chat-asset-carousel-arrow svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.chat-asset-carousel-arrow:disabled {
  opacity: .24;
  cursor: default;
}

.chat-bank-card {
  position: relative;
  flex: 0 0 min(520px, calc(100cqw - 80px));
  aspect-ratio: 1.586 / 1;
  min-width: 258px;
  overflow: hidden;
  padding: 0;
  color: #f8f7f2;
  border: 0;
  border-radius: 8px;
  background: #26302e;
  box-shadow:
    0 18px 30px rgba(22, 30, 28, .22),
    0 4px 8px rgba(22, 30, 28, .13),
    inset 0 1px 0 rgba(255, 255, 255, .32),
    inset 0 -1px 0 rgba(0, 0, 0, .34);
  cursor: pointer;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  transform: perspective(1000px) rotateX(0deg) translateY(0);
  transition: transform .24s ease, box-shadow .24s ease, filter .24s ease;
}

.chat-bank-card:hover,
.chat-bank-card.is-active {
  transform: perspective(1000px) rotateX(1.5deg) translateY(-2px);
  box-shadow:
    0 24px 40px rgba(22, 30, 28, .26),
    0 5px 10px rgba(22, 30, 28, .16),
    inset 0 1px 0 rgba(255, 255, 255, .34),
    inset 0 -1px 0 rgba(0, 0, 0, .34);
}

.chat-bank-card:not(.is-active) {
  filter: saturate(.82) brightness(.96);
}

.chat-bank-card::before {
  position: absolute;
  inset: -20% -10% auto 34%;
  z-index: 1;
  height: 160%;
  content: "";
  pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .18) 49%, transparent 58%);
  transform: rotate(10deg);
}

.chat-bank-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(132deg, transparent 0 54%, rgba(255, 255, 255, .08) 54.2% 54.5%, transparent 54.8%),
    linear-gradient(28deg, transparent 0 71%, rgba(255, 255, 255, .07) 71.2% 71.5%, transparent 71.8%);
  mix-blend-mode: screen;
  opacity: .8;
}

.chat-bank-card[data-card-style="graphite"] {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .12), transparent 42%),
    linear-gradient(125deg, #17211f 0%, #3b4946 53%, #18211f 100%);
}

.chat-bank-card[data-card-style="jade"] {
  background:
    linear-gradient(145deg, rgba(255, 245, 192, .22), transparent 44%),
    linear-gradient(125deg, #183d39 0%, #4e766a 52%, #132d2d 100%);
}

.chat-bank-card[data-card-style="silver"] {
  color: #202a28;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .8), transparent 46%),
    linear-gradient(125deg, #b8c2bf 0%, #edf0e8 52%, #86928e 100%);
}

.chat-bank-card[data-card-style="burgundy"] {
  background:
    linear-gradient(145deg, rgba(255, 224, 212, .18), transparent 42%),
    linear-gradient(125deg, #4a202a 0%, #853e4d 52%, #291a26 100%);
}

.chat-bank-card[data-card-style="cobalt"] {
  background:
    linear-gradient(145deg, rgba(214, 239, 255, .2), transparent 42%),
    linear-gradient(125deg, #17395c 0%, #3d6e99 52%, #162844 100%);
}

.chat-bank-card-background,
.chat-bank-card-surface {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.chat-bank-card-background {
  z-index: 0;
  object-fit: cover;
  opacity: .94;
}

.chat-bank-card.has-custom-background .chat-bank-card-surface {
  background: linear-gradient(180deg, rgba(4, 9, 8, .3), rgba(4, 9, 8, .08) 48%, rgba(4, 9, 8, .5));
}

.chat-bank-card-surface {
  z-index: 2;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0;
  padding: 7.8% 8.3% 7.1%;
  text-align: left;
}

.chat-bank-card-head,
.chat-bank-card-brand,
.chat-bank-card-foot,
.chat-bank-card-holder,
.chat-bank-card-valid {
  display: flex;
  align-items: center;
}

.chat-bank-card-head {
  justify-content: space-between;
  gap: 12px;
}

.chat-bank-card-brand {
  min-width: 0;
  gap: 8px;
}

.chat-bank-card-brand strong {
  overflow: hidden;
  font: 800 12px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-bank-card-mark {
  position: relative;
  display: inline-block;
  flex: 0 0 24px;
  width: 24px;
  height: 16px;
}

.chat-bank-card-mark i {
  position: absolute;
  top: 1px;
  width: 14px;
  height: 14px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .86;
}

.chat-bank-card-mark i:first-child { left: 0; }
.chat-bank-card-mark i:last-child { right: 0; opacity: .48; }

.chat-bank-card-kind {
  color: currentColor;
  font: 750 9px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
  opacity: .72;
}

.chat-bank-card-hardware {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10%;
}

.chat-bank-card-chip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 42px;
  height: 31px;
  overflow: hidden;
  border: 1px solid rgba(54, 55, 46, .42);
  border-radius: 5px;
  background:
    linear-gradient(90deg, transparent 47%, rgba(81, 77, 57, .72) 48% 51%, transparent 52%),
    linear-gradient(180deg, transparent 46%, rgba(81, 77, 57, .72) 47% 51%, transparent 52%),
    linear-gradient(135deg, #f5e3a4 0%, #aa8b42 48%, #f9e9b4 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .72),
    0 2px 3px rgba(0, 0, 0, .26);
}

.chat-bank-card-chip::after {
  position: absolute;
  inset: 5px 10px;
  content: "";
  border: 1px solid rgba(81, 77, 57, .58);
  border-radius: 3px;
}

.chat-bank-card-contactless {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  opacity: .68;
}

.chat-bank-card-contactless svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.35;
  transform: rotate(45deg);
}

.chat-bank-card-number {
  align-self: center;
  margin-top: 3%;
  color: currentColor;
  font: 650 22px/1.15 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  word-spacing: .28em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .32), 0 2px 2px rgba(0, 0, 0, .32);
  white-space: nowrap;
}

.chat-bank-card-foot {
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.chat-bank-card-holder,
.chat-bank-card-valid {
  align-items: start;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.chat-bank-card-valid {
  flex: 0 0 auto;
  align-items: end;
}

.chat-bank-card-holder small,
.chat-bank-card-valid small {
  color: currentColor;
  font: 700 7px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
  opacity: .66;
}

.chat-bank-card-holder strong,
.chat-bank-card-valid strong {
  overflow: hidden;
  color: currentColor;
  font: 750 10px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.chat-bank-card[data-card-style="silver"] .chat-bank-card-chip {
  filter: saturate(.75) brightness(.96);
}

.chat-bank-card-preview {
  width: 100%;
}
.chat-bank-card:focus-visible,
.chat-asset-carousel-arrow:focus-visible,
.chat-asset-dots button:focus-visible,
.chat-asset-source-button:focus-visible {
  outline: 2px solid rgba(17, 111, 91, .9);
  outline-offset: 3px;
}


.chat-asset-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  min-height: 10px;
}

.chat-asset-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(16, 16, 16, .2);
  cursor: pointer;
}

.chat-asset-dots button[aria-current="true"] {
  width: 20px;
  border-radius: 999px;
  background: rgba(16, 16, 16, .68);
}

.chat-assets-empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 11px;
  min-height: 250px;
  padding: 28px 18px;
  border-top: 1px solid rgba(20, 29, 27, .1);
  border-bottom: 1px solid rgba(20, 29, 27, .1);
  text-align: center;
}

.chat-assets-empty > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: rgba(16, 16, 16, .5);
  border: 1px solid rgba(16, 16, 16, .12);
  border-radius: 50%;
}

.chat-assets-empty svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.chat-assets-empty strong {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 15px;
}

.chat-assets-empty button {
  min-height: 38px;
  padding: 0 16px;
  color: var(--chat-ink);
  border: 0;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  cursor: pointer;
  font: 650 13px/1 "Noto Serif SC", "Songti SC", serif;
}

.chat-asset-account {
  display: grid;
  gap: 14px;
  padding: 2px 4px 0;
}

.chat-asset-balance {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 18px;
  border-top: 1px solid rgba(20, 29, 27, .12);
  border-bottom: 1px solid rgba(20, 29, 27, .12);
}

.chat-asset-balance > span {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.chat-asset-balance > span:last-child {
  justify-items: end;
}

.chat-asset-balance small,
.chat-asset-detail-head span,
.chat-asset-detail-empty {
  color: var(--chat-faint);
  font: 700 10px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

.chat-asset-balance strong {
  font: 750 25px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.chat-asset-balance b {
  color: var(--chat-muted);
  font: 700 13px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.chat-asset-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 3px;
}

.chat-asset-detail-head strong {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 15px;
}

.chat-asset-detail-list {
  display: grid;
  gap: 1px;
  min-height: 44px;
}

.chat-asset-detail-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(20, 29, 27, .08);
}

.chat-asset-detail-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #2f715c;
  border-radius: 50%;
  background: rgba(47, 113, 92, .1);
}

.chat-asset-detail-item[data-direction="out"] .chat-asset-detail-icon {
  color: #a23a34;
  background: rgba(162, 58, 52, .1);
}

.chat-asset-detail-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.chat-asset-detail-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.chat-asset-detail-copy strong,
.chat-asset-detail-copy time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-asset-detail-copy strong {
  color: var(--chat-ink);
  font-size: 13px;
  font-weight: 650;
}

.chat-asset-detail-copy time {
  color: var(--chat-faint);
  font: 11px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.chat-asset-detail-item > b {
  color: #2f715c;
  font: 700 13px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chat-asset-detail-item[data-direction="out"] > b {
  color: #a23a34;
}

.chat-asset-detail-empty {
  padding: 12px 0;
  text-align: center;
}

.chat-asset-card-dialog {
  place-items: end center;
}

.chat-asset-card-form {
  width: min(100%, 480px);
  max-height: min(88dvh, 760px);
  gap: 13px;
}

.chat-asset-card-preview {
  width: min(100%, 420px);
  margin-inline: auto;
}

.chat-asset-card-form .chat-bank-card {
  width: 100%;
  min-width: 0;
  flex: none;
  cursor: default;
}

  filter: none;
  transform: none;
.chat-asset-background-fieldset {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.chat-asset-background-fieldset legend {
  margin-bottom: 1px;
  color: var(--chat-muted);
  font-size: 12px;
  font-weight: 650;
}

.chat-asset-background-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.chat-asset-source-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 10px;
  color: var(--chat-ink);
  border: 0;
  border-radius: 8px;
  background: var(--chat-panel-fill);
  box-shadow: var(--chat-emboss-shadow);
  cursor: pointer;
  font: 650 12px/1 "Noto Serif SC", "Songti SC", serif;
}

.chat-asset-source-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.chat-asset-source-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.chat-asset-card-actions {
  position: sticky;
  bottom: -18px;
  z-index: 2;
  padding-top: 8px;
  background: var(--chat-panel-fill);
}

.chat-asset-card-actions .chat-dialog-danger {
  justify-self: start;
}

.chat-page.assets-mode .chat-content {
  padding-bottom: 4px;
}

@media (max-width: 460px) {
  .chat-asset-carousel {
    grid-template-columns: 26px minmax(0, 1fr) 26px;
    gap: 2px;
  }

  .chat-asset-carousel-arrow {
    width: 28px;
    height: 28px;
  }

  .chat-bank-card {
    flex-basis: calc(100cqw - 72px);
    min-width: 240px;
  }

  .chat-bank-card-number {
    font-size: 17px;
    word-spacing: .2em;
  }

  .chat-bank-card-brand strong {
    font-size: 10px;
  }

  .chat-bank-card-chip {
    width: 36px;
    height: 27px;
  }

  .chat-asset-balance {
    align-items: start;
    flex-direction: column;
    gap: 13px;
  }

  .chat-asset-balance > span:last-child {
    justify-items: start;
  }

  .chat-asset-card-form {
    max-height: min(90dvh, 760px);
  }
}

html.night-mode .chat-assets-overview,
html.night-mode .chat-assets-empty,
html.night-mode .chat-asset-balance,
html.night-mode .chat-asset-detail-item {
  border-color: rgba(245, 239, 229, .14);
}

html.night-mode .chat-assets-overview > b,
html.night-mode .chat-assets-overview strong,
html.night-mode .chat-asset-balance strong,
html.night-mode .chat-asset-detail-copy strong,
html.night-mode .chat-asset-detail-head strong,
html.night-mode .chat-assets-empty strong {
  color: #f5efe5;
}

html.night-mode .chat-asset-carousel-arrow,
html.night-mode .chat-assets-empty > span,
html.night-mode .chat-assets-empty button,
html.night-mode .chat-asset-source-button {
  color: rgba(245, 239, 229, .8);
}

html.night-mode .chat-asset-dots button {
  background: rgba(245, 239, 229, .22);
}

html.night-mode .chat-asset-dots button[aria-current="true"] {
  background: rgba(245, 239, 229, .74);
}

