:root {
  color: #1f2937;
  background: #f5f7fa;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100svh;
  background: #f5f7fa;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
}

button:disabled {
  cursor: default;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  position: relative;
  width: min(100%, 540px);
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 25% at 50% -10%, rgba(224, 237, 255, 0.54), transparent 72%),
    #f5f7fa;
}

.app-page {
  min-block-size: 100svh;
}

.app-page[hidden] {
  display: none !important;
}

.chat-page,
.history-chat-page {
  display: grid;
  position: relative;
  block-size: 100svh;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.home-page {
  display: flex;
  flex-direction: column;
}

.home-header {
  flex: 0 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 20px 0;
}

.home-identity {
  display: grid;
  align-content: center;
  justify-items: center;
  min-block-size: 144px;
  row-gap: 10px;
}

.home-identity h1 {
  margin: 0;
  color: #1f2937;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 23px;
}

.home-content {
  flex: 1;
  display: grid;
  grid-template-rows: repeat(4, auto);
  align-content: space-evenly;
  row-gap: clamp(14px, 2.4svh, 28px);
  min-height: 0;
  padding: 10px 16px max(env(safe-area-inset-bottom), clamp(64px, calc(14.4svh - 58px), 144px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.home-content::-webkit-scrollbar {
  display: none;
}

.home-status-copy {
  margin: 9px 0 0;
  color: rgba(103, 116, 132, 0.58);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.006em;
  line-height: 19px;
  text-align: center;
}

.codex-usage {
  display: grid;
  gap: 9px;
  margin: 0 3px;
  padding: 12px 13px 11px;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 17px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64), 0 5px 18px rgba(96, 119, 148, 0.026);
  -webkit-backdrop-filter: blur(10px) saturate(1.03);
  backdrop-filter: blur(10px) saturate(1.03);
}

.codex-usage__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.codex-usage h2,
.codex-usage p {
  margin: 0;
}

.codex-usage h2 {
  color: rgba(70, 85, 102, 0.76);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 18px;
}

.codex-usage__heading p,
.codex-usage__short-window {
  color: rgba(110, 126, 144, 0.61);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.003em;
  line-height: 16px;
  text-align: right;
}

.codex-usage__track {
  width: 100%;
  height: 7px;
  padding: 2px;
  overflow: hidden;
  background: rgba(224, 232, 242, 0.68);
  border: 1px solid rgba(173, 190, 210, 0.18);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(114, 134, 157, 0.045);
}

.codex-usage__fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(136, 169, 204, 0.82), rgba(173, 199, 225, 0.72));
  border-radius: inherit;
  box-shadow: 0 0 6px rgba(142, 176, 212, 0.18);
  transition: width 380ms ease;
}

.codex-usage[data-availability="unavailable"] .codex-usage__track {
  background: rgba(225, 233, 242, 0.54);
}

.codex-usage__short-window {
  margin-top: -2px !important;
}

.memory-content {
  display: grid;
  gap: 18px;
  width: min(100%, 620px);
  margin: 0 auto;
  padding: 4px 18px 34px;
}

.memory-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
  background: rgba(218, 228, 239, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 13px;
}

.memory-tab {
  min-height: 31px;
  padding: 5px 8px;
  color: rgba(88, 104, 121, 0.64);
  font: inherit;
  font-size: 12px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.memory-tab[aria-selected="true"] {
  color: rgba(63, 79, 97, 0.82);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 1px 5px rgba(91, 112, 137, 0.1);
}

.memory-panel {
  min-width: 0;
}

.memory-search {
  display: block;
  margin-bottom: 15px;
}

.memory-search input {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  color: rgba(61, 78, 96, 0.88);
  font: inherit;
  font-size: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 15px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.75);
}

.memory-search input:focus {
  border-color: rgba(145, 176, 207, 0.52);
  box-shadow: 0 0 0 3px rgba(157, 187, 216, 0.14);
}

.museum-status,
.museum-section-title,
.museum-reader__date {
  margin: 0;
  color: rgba(105, 121, 140, 0.6);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 19px;
}

.museum-section-title {
  margin: 2px 2px 9px;
  color: rgba(83, 99, 117, 0.7);
  font-weight: 500;
}

.museum-list {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 10px 0 0;
  list-style: none;
}

.museum-item {
  position: relative;
  width: 100%;
  padding: 14px 15px;
  color: inherit;
  text-align: left;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 17px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66), 0 5px 16px rgba(96, 119, 148, 0.027);
}

.museum-item__menu {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  width: 32px;
  height: 32px;
  padding: 0;
  color: rgba(103, 120, 139, 0.6);
  font: inherit;
  font-size: 17px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.42);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.museum-item__menu-panel {
  position: absolute;
  top: 37px;
  right: 8px;
  z-index: 2;
  display: grid;
  min-width: 88px;
  padding: 4px;
  background: rgba(250, 252, 255, 0.95);
  border: 1px solid rgba(226, 235, 244, 0.94);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(69, 89, 111, 0.14);
}

.museum-item__menu-panel[hidden],
.museum-editor[hidden] {
  display: none;
}

.museum-item__menu-panel button {
  min-height: 32px;
  padding: 5px 9px;
  color: rgba(75, 92, 111, 0.8);
  font: inherit;
  font-size: 12px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.museum-item__menu-panel button:last-child {
  color: rgba(172, 91, 94, 0.82);
}

button.museum-item {
  cursor: pointer;
}

.museum-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin: 0 0 6px;
  color: rgba(105, 121, 140, 0.56);
  font-size: 11px;
  line-height: 16px;
}

.museum-item__title {
  margin: 0 0 6px;
  color: rgba(65, 81, 99, 0.82);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.museum-item__content {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: rgba(80, 96, 114, 0.72);
  font-size: 13px;
  line-height: 20px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.museum-item.is-expanded .museum-item__content {
  display: block;
  overflow: visible;
}

.museum-reader {
  padding: 4px 3px 20px;
}

.museum-reader__back {
  padding: 4px 0 12px;
  color: rgba(96, 126, 156, 0.75);
  font: inherit;
  font-size: 13px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.museum-add,
.museum-reader__actions button,
.museum-editor__actions button {
  min-height: 34px;
  padding: 6px 11px;
  color: rgba(77, 102, 127, 0.82);
  font: inherit;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 11px;
  cursor: pointer;
}

.museum-add {
  margin: 0;
}

.protocol-library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.protocol-library-heading p {
  margin: 0;
  color: rgba(83, 99, 117, 0.7);
  font-size: 12px;
  font-weight: 500;
}

.museum-reader__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.museum-editor {
  display: grid;
  gap: 10px;
  margin-top: 13px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 17px;
}

.museum-editor__title {
  margin: 0;
  color: rgba(67, 84, 102, 0.82);
  font-size: 14px;
  font-weight: 500;
}

.museum-editor__note {
  margin: -2px 0 0;
  color: rgba(108, 123, 140, 0.62);
  font-size: 11px;
  line-height: 17px;
}

.museum-editor label {
  display: grid;
  gap: 5px;
  color: rgba(87, 103, 121, 0.71);
  font-size: 12px;
}

.museum-editor input,
.museum-editor select,
.museum-editor textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 9px 10px;
  color: rgba(61, 77, 95, 0.86);
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  background: rgba(255, 255, 255, 0.67);
  border: 1px solid rgba(218, 230, 241, 0.88);
  border-radius: 10px;
}

.museum-editor__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.museum-reader h2 {
  margin: 5px 0 16px;
  color: rgba(59, 75, 93, 0.88);
  font-size: 20px;
  font-weight: 500;
  line-height: 29px;
}

.museum-reader__content {
  color: rgba(65, 80, 98, 0.78);
  font-size: 14px;
  line-height: 1.85;
}

.museum-reader__content h2,
.museum-reader__content h3 {
  margin: 23px 0 9px;
  color: rgba(61, 77, 95, 0.86);
  font-size: 16px;
  font-weight: 500;
  line-height: 25px;
}

.museum-reader__content h3 {
  font-size: 14px;
}

.museum-reader__content p {
  margin: 0 0 13px;
  white-space: pre-wrap;
}

.continue-conversation {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 112px;
  padding: 17px 18px 16px;
  overflow: hidden;
  color: #1f2937;
  text-align: left;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 21px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 8px 24px rgba(96, 119, 148, 0.035);
  -webkit-backdrop-filter: blur(12px) saturate(1.04);
  backdrop-filter: blur(12px) saturate(1.04);
}

.continue-conversation::after {
  position: absolute;
  inset: auto -18px -24px 38%;
  height: 70px;
  content: "";
  pointer-events: none;
  background: radial-gradient(ellipse, rgba(209, 226, 247, 0.42), transparent 70%);
}

.continue-conversation__title,
.continue-conversation__preview,
.continue-conversation__time {
  position: relative;
  z-index: 1;
}

.continue-conversation__title {
  align-self: start;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 20px;
}

.continue-conversation__preview {
  align-self: center;
  padding-right: 8px;
  color: #5f6d7d;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 20px;
}

.continue-conversation__time {
  justify-self: end;
  align-self: end;
  color: rgba(118, 132, 149, 0.68);
  font-size: 11px;
  line-height: 16px;
}

.recent-activity {
  margin: 0 5px;
  transform: translateY(clamp(-18px, -1.7svh, -12px));
}

.recent-activity h2,
.conversation-list-section h2 {
  margin: 0;
  color: rgba(70, 85, 102, 0.76);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 18px;
}

.recent-activity__list {
  display: grid;
  gap: 2px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.recent-activity__empty {
  margin: 9px 0 0;
  color: rgba(112, 127, 143, 0.55);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.004em;
  line-height: 18px;
}

.recent-activity__item {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  column-gap: 10px;
  min-height: 28px;
  align-items: center;
  color: rgba(77, 93, 110, 0.8);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.004em;
  line-height: 18px;
}

.recent-activity__item time {
  color: rgba(121, 136, 152, 0.58);
  font-size: 11px;
  letter-spacing: 0;
}

.home-shortcuts {
  margin-top: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(10px) saturate(1.03);
  backdrop-filter: blur(10px) saturate(1.03);
}

.home-shortcut {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  width: 100%;
  min-height: 51px;
  padding: 0 14px 0 17px;
  color: #3d4b5b;
  text-align: left;
  background: transparent;
  border: 0;
}

.home-shortcut + .home-shortcut {
  border-top: 1px solid rgba(122, 132, 146, 0.095);
}

.home-shortcut span {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.006em;
  line-height: 20px;
}

.home-shortcut svg {
  width: 16px;
  height: 16px;
  color: rgba(118, 134, 151, 0.64);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.conversations-page {
  display: flex;
  flex-direction: column;
}

.conversations-header {
  display: grid;
  grid-template-columns: minmax(76px, 1fr) auto minmax(76px, 1fr);
  align-items: end;
  min-block-size: calc(max(16px, env(safe-area-inset-top)) + 55px);
  padding: max(16px, env(safe-area-inset-top)) 16px 10px;
}

.conversations-header h1 {
  grid-column: 2;
  margin: 0;
  color: #273443;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 22px;
}

.conversations-header__back,
.conversations-header__new {
  min-height: 32px;
  padding: 0;
  color: rgba(83, 102, 123, 0.82);
  background: transparent;
  border: 0;
}

.conversations-header__back {
  display: inline-flex;
  grid-column: 1;
  align-items: center;
  justify-self: start;
  gap: 1px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 20px;
}

.conversations-header__back svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.conversations-header__new {
  display: grid;
  grid-column: 3;
  width: 32px;
  place-items: center;
  justify-self: end;
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
}

.conversations-header__new:disabled {
  color: rgba(118, 134, 151, 0.42);
}

.conversations-content {
  flex: 1;
  min-height: 0;
  padding: 22px 20px max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.conversations-content::-webkit-scrollbar {
  display: none;
}

.conversation-list-status {
  min-height: 16px;
  margin: -7px 3px 13px;
  color: rgba(106, 121, 138, 0.58);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.003em;
  line-height: 16px;
}

.conversation-list-section--history {
  margin-top: 31px;
}

.conversation-list {
  margin-top: 8px;
  border-top: 1px solid rgba(122, 132, 146, 0.09);
}

.conversation-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  padding: 11px 2px 10px 3px;
  color: #273443;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(122, 132, 146, 0.09);
}

.conversation-row__open {
  display: block;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
}

.conversation-row__body {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.conversation-row__title {
  color: #354252;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.006em;
  line-height: 19px;
}

.conversation-row__preview {
  overflow: hidden;
  color: rgba(93, 108, 124, 0.77);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.004em;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-row__time,
.conversation-row__meta time {
  align-self: start;
  padding-top: 2px;
  color: rgba(121, 136, 152, 0.62);
  font-size: 11px;
  font-weight: 400;
  line-height: 16px;
  white-space: nowrap;
}

.conversation-row__meta {
  display: grid;
  min-height: 46px;
  gap: 1px;
  align-content: space-between;
  justify-items: end;
  align-self: stretch;
}

.conversation-row__current-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: end;
  color: rgba(112, 139, 170, 0.82);
  font-size: 10px;
  font-weight: 400;
  line-height: 14px;
}

.conversation-row__current-mark i {
  display: block;
  width: 5px;
  height: 5px;
  background: #a9bdd7;
  border-radius: 50%;
}

.conversation-row__actions {
  position: relative;
  display: grid;
  min-width: 31px;
  min-height: 26px;
  place-items: center end;
}

.conversation-row__more {
  width: 32px;
  min-height: 28px;
  padding: 0 1px 4px;
  color: rgba(104, 120, 138, 0.62);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 17px;
  background: transparent;
  border: 0;
  border-radius: 11px;
}

.conversation-row__more:hover,
.conversation-row__more[aria-expanded="true"] {
  color: rgba(77, 101, 128, 0.84);
  background: rgba(255, 255, 255, 0.34);
}

.conversation-row__menu {
  position: absolute;
  z-index: 4;
  top: calc(100% + 2px);
  right: 0;
  min-width: 124px;
  padding: 4px;
  background: rgba(249, 251, 253, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 11px;
  box-shadow: 0 8px 20px rgba(67, 84, 105, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.74);
  -webkit-backdrop-filter: blur(12px) saturate(1.04);
  backdrop-filter: blur(12px) saturate(1.04);
}

.conversation-row__menu[hidden] {
  display: none;
}

.conversation-row__menu button {
  width: 100%;
  min-height: 29px;
  padding: 0 8px;
  color: #526578;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.003em;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.conversation-row__menu button:hover {
  background: rgba(218, 230, 244, 0.52);
}

.conversation-row__menu button:disabled {
  color: rgba(107, 122, 139, 0.45);
  cursor: not-allowed;
}

.conversation-list__empty {
  margin: 0;
  padding: 14px 3px 13px;
  color: rgba(104, 119, 135, 0.6);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  border-bottom: 1px solid rgba(122, 132, 146, 0.09);
}

.conversation-title-editor {
  display: grid;
  gap: 9px;
  margin: 19px 0 0;
  padding: 12px 13px 11px;
  color: #4b5d70;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.conversation-title-editor[hidden] {
  display: none;
}

.conversation-title-editor__title {
  margin: 0;
  color: rgba(72, 88, 106, 0.82);
  font-size: 12px;
  font-weight: 500;
  line-height: 17px;
}

.conversation-title-editor input,
.assistant-name-editor input {
  width: 100%;
  min-height: 34px;
  box-sizing: border-box;
  padding: 6px 9px;
  color: #324154;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(191, 204, 218, 0.6);
  border-radius: 10px;
  outline: 0;
}

.conversation-title-editor input:focus,
.assistant-name-editor input:focus {
  border-color: rgba(126, 164, 207, 0.74);
  box-shadow: 0 0 0 2px rgba(174, 203, 233, 0.27);
}

.conversation-title-editor__actions,
.assistant-name-editor__actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  justify-content: end;
  gap: 6px;
}

.conversation-title-editor__actions button,
.assistant-name-editor__actions button {
  min-height: 28px;
  padding: 0 8px;
  color: rgba(87, 104, 123, 0.8);
  font-size: 12px;
  font-weight: 500;
  line-height: 17px;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.conversation-title-editor__actions button[type="submit"],
.assistant-name-editor__save {
  color: #5e84ab;
  background: rgba(220, 233, 247, 0.58);
}

.conversation-maintenance-panel {
  display: grid;
  gap: 9px;
  margin: 10px 0 0;
  padding: 12px 13px 11px;
  color: #4b5d70;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.conversation-maintenance-panel[hidden] {
  display: none;
}

.conversation-maintenance-panel__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.conversation-maintenance-panel__heading button {
  min-height: 26px;
  padding: 0 6px;
  color: rgba(87, 104, 123, 0.76);
  font: inherit;
  font-size: 12px;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.conversation-maintenance-panel__copy,
.conversation-maintenance-panel__note {
  margin: 0;
  color: rgba(84, 101, 120, 0.76);
  font-size: 12px;
  line-height: 18px;
  white-space: pre-line;
}

.conversation-maintenance-panel__note {
  color: rgba(95, 122, 151, 0.8);
}

.conversation-migration-editor label {
  display: grid;
  gap: 5px;
  color: rgba(72, 88, 106, 0.82);
  font-size: 12px;
  line-height: 17px;
}

.conversation-migration-editor input,
.conversation-migration-editor textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 9px;
  color: #324154;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(191, 204, 218, 0.6);
  border-radius: 10px;
  outline: 0;
  resize: vertical;
}

.conversation-migration-editor input:focus,
.conversation-migration-editor textarea:focus {
  border-color: rgba(126, 164, 207, 0.74);
  box-shadow: 0 0 0 2px rgba(174, 203, 233, 0.27);
}

.placeholder-page,
.new-conversation-page,
.activity-page,
.more-page {
  display: flex;
  flex-direction: column;
}

.placeholder-header {
  position: relative;
  display: grid;
  min-block-size: calc(max(16px, env(safe-area-inset-top)) + 51px);
  padding: max(16px, env(safe-area-inset-top)) 20px 10px;
  place-items: end center;
}

.placeholder-header h1 {
  margin: 0;
  color: #273443;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 21px;
}

.placeholder-content {
  flex: 1;
  display: flex;
  align-items: flex-start;
  min-height: 0;
  padding: 42px 22px max(24px, env(safe-area-inset-bottom));
}

.placeholder-content p {
  max-width: 250px;
  margin: 0;
  color: rgba(103, 116, 132, 0.7);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.006em;
  line-height: 1.65;
}

.activity-content,
.more-content {
  flex: 1;
  min-height: 0;
  padding: 22px 20px max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.activity-content::-webkit-scrollbar,
.more-content::-webkit-scrollbar {
  display: none;
}

.activity-empty {
  margin: 2px 3px 0;
  color: rgba(103, 116, 132, 0.65);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 20px;
}

.activity-groups {
  display: grid;
  gap: 27px;
}

.activity-group {
  display: grid;
  gap: 8px;
}

.activity-group__title {
  margin: 0 3px;
  color: rgba(70, 85, 102, 0.76);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 18px;
}

.activity-records {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 17px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
  -webkit-backdrop-filter: blur(9px) saturate(1.03);
  backdrop-filter: blur(9px) saturate(1.03);
}

.activity-record + .activity-record {
  border-top: 1px solid rgba(122, 132, 146, 0.09);
}

.activity-record__trigger {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  width: 100%;
  min-height: 62px;
  padding: 10px 12px 10px 13px;
  column-gap: 8px;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
}

.activity-record__time {
  padding-top: 2px;
  color: rgba(111, 127, 144, 0.59);
  font-size: 11px;
  font-weight: 400;
  line-height: 16px;
}

.activity-record__body {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.activity-record__title {
  overflow: hidden;
  color: #405061;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.004em;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-record__meta {
  overflow: hidden;
  color: rgba(98, 113, 129, 0.66);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.003em;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-record__state {
  align-self: center;
  color: rgba(102, 127, 155, 0.76);
  font-size: 10px;
  font-weight: 500;
  line-height: 15px;
  text-align: right;
  white-space: nowrap;
}

.activity-record[data-status="failed"] .activity-record__state {
  color: rgba(112, 121, 131, 0.72);
}

.activity-record__details {
  display: grid;
  gap: 3px;
  margin: -2px 13px 11px 77px;
  color: rgba(100, 115, 131, 0.68);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.003em;
  line-height: 16px;
}

.activity-record__details[hidden] {
  display: none;
}

.settings-list {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(10px) saturate(1.03);
  backdrop-filter: blur(10px) saturate(1.03);
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  min-height: 58px;
  padding: 9px 13px 9px 16px;
  column-gap: 8px;
}

.settings-row + .settings-row {
  border-top: 1px solid rgba(122, 132, 146, 0.09);
}

.settings-row--button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.settings-row--button:active {
  background: rgba(117, 143, 166, 0.08);
}

.settings-row__body {
  display: grid;
  min-width: 0;
  gap: 2px;
  color: #3d4b5b;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 19px;
}

.settings-row__summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: rgba(103, 119, 136, 0.66);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.003em;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subsystem-status-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(157, 169, 181, 0.42);
}

.subsystem-status-dot[data-status="healthy"] {
  background: rgba(113, 151, 187, 0.84);
  box-shadow: 0 0 0 2px rgba(161, 190, 217, 0.15);
}

.subsystem-status-dot[data-status="unavailable"] {
  background: rgba(103, 115, 129, 0.58);
}

.settings-row svg {
  width: 16px;
  height: 16px;
  color: rgba(118, 134, 151, 0.54);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.subsystem-detail-content {
  display: grid;
  align-content: start;
  gap: 14px;
  padding-top: 16px;
}

.subsystem-detail__status {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 28px;
  margin: 0 0 2px;
  padding: 5px 10px;
  color: rgba(85, 106, 128, 0.8);
  font-size: 12px;
  line-height: 18px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(194, 207, 220, 0.45);
  border-radius: 999px;
}

.subsystem-detail__status > span:not(.subsystem-status-dot) {
  margin-left: 6px;
}

.subsystem-detail__group {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(10px) saturate(1.03);
  backdrop-filter: blur(10px) saturate(1.03);
}

.subsystem-detail__group h2 {
  margin: 0;
  padding: 12px 16px 7px;
  color: rgba(97, 114, 132, 0.64);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.subsystem-detail__rows {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  margin: 0;
}

.subsystem-detail__rows dt,
.subsystem-detail__rows dd {
  min-width: 0;
  margin: 0;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 19px;
}

.subsystem-detail__rows dt {
  color: #3d4b5b;
  border-top: 1px solid rgba(122, 132, 146, 0.09);
}

.subsystem-detail__rows dd {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  color: rgba(103, 119, 136, 0.72);
  text-align: right;
  border-top: 1px solid rgba(122, 132, 146, 0.09);
}

.subsystem-detail__rows dt:first-child,
.subsystem-detail__rows dt:first-child + dd {
  border-top: 0;
}

.subsystem-detail__rows dd > span:not(.subsystem-status-dot):not(.subsystem-detail__latency) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subsystem-detail__latency {
  flex: 0 0 auto;
  color: rgba(119, 135, 151, 0.55);
  font-size: 11px;
}

.subsystem-detail__refresh {
  justify-self: center;
  min-height: 36px;
  padding: 7px 15px;
  color: rgba(75, 102, 128, 0.82);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(174, 197, 216, 0.56);
  border-radius: 999px;
}

.subsystem-detail__refresh:active {
  background: rgba(168, 194, 218, 0.2);
}

.conversation-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(10px, env(safe-area-inset-top)) 20px 11px;
  background: rgba(245, 247, 250, 0.7);
  border-bottom: 1px solid rgba(122, 132, 146, 0.11);
  -webkit-backdrop-filter: blur(10px) saturate(1.04);
  backdrop-filter: blur(10px) saturate(1.04);
}

.model-picker-trigger {
  position: absolute;
  top: 50%;
  right: max(12px, env(safe-area-inset-right));
  z-index: 1;
  display: inline-flex;
  min-height: 30px;
  padding: 0 8px 0 10px;
  align-items: center;
  gap: 3px;
  color: rgba(76, 96, 118, 0.84);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 16px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
  -webkit-backdrop-filter: blur(8px) saturate(1.03);
  backdrop-filter: blur(8px) saturate(1.03);
  transform: translateY(-50%);
}

.model-picker-trigger svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.model-picker-trigger[data-state="runtime"] {
  color: #607f9f;
}

.model-sheet {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  grid-template: minmax(0, 1fr) auto / minmax(0, 1fr);
}

.model-sheet[hidden] {
  display: none;
}

.model-sheet__backdrop {
  grid-area: 1 / 1 / -1 / -1;
  padding: 0;
  background: rgba(83, 99, 118, 0.14);
  border: 0;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.model-sheet__panel {
  position: relative;
  z-index: 1;
  grid-area: 2 / 1;
  max-block-size: min(78svh, 610px);
  padding: 10px 16px max(22px, env(safe-area-inset-bottom));
  overflow-y: auto;
  color: #334150;
  background: rgba(247, 249, 252, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 34px rgba(68, 86, 108, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  backdrop-filter: blur(18px) saturate(1.05);
  scrollbar-width: none;
}

.model-sheet__panel::-webkit-scrollbar {
  display: none;
}

.model-sheet__handle {
  width: 34px;
  height: 4px;
  margin: 0 auto 7px;
  background: rgba(124, 137, 153, 0.28);
  border-radius: 999px;
}

.model-sheet__header {
  display: grid;
  grid-template-columns: minmax(48px, 1fr) auto minmax(48px, 1fr);
  align-items: center;
  min-height: 34px;
}

.model-sheet__header h2 {
  margin: 0;
  color: #2d3a49;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 22px;
}

.model-sheet__close {
  grid-column: 3;
  min-height: 30px;
  padding: 0;
  justify-self: end;
  color: #6683a3;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.005em;
  background: transparent;
  border: 0;
}

.model-sheet__runtime {
  margin: 12px 0 19px;
  padding: 10px 12px;
  color: rgba(80, 98, 117, 0.8);
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.model-sheet__runtime p {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.004em;
  line-height: 18px;
}

.model-sheet__runtime p + p {
  margin-top: 3px;
  color: #6f8cae;
}

.model-sheet__runtime[data-state="unavailable"] {
  color: rgba(103, 116, 132, 0.67);
}

.model-sheet__section + .model-sheet__section {
  margin-top: 18px;
}

.model-sheet__section h3 {
  margin: 0 3px 7px;
  color: rgba(83, 99, 117, 0.73);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 18px;
}

.model-option-list {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.model-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 17px;
  min-height: 45px;
  width: 100%;
  padding: 0 13px 0 15px;
  align-items: center;
  column-gap: 8px;
  color: #3c4b5b;
  text-align: left;
  background: transparent;
  border: 0;
}

.model-option + .model-option {
  border-top: 1px solid rgba(122, 132, 146, 0.09);
}

.model-option > span:first-child {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.004em;
  line-height: 20px;
}

.model-option:disabled:not(.is-current):not(.is-pending) {
  color: rgba(102, 116, 132, 0.53);
}

.model-option.is-current,
.model-option.is-pending {
  color: #587a9f;
  background: rgba(214, 229, 247, 0.42);
}

.model-option.is-pending:not(.is-current) {
  background: rgba(222, 233, 247, 0.26);
}

.model-option__meta {
  color: rgba(100, 128, 160, 0.8);
  font-size: 10px;
  font-weight: 400;
  line-height: 14px;
}

.model-option__copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.model-option__copy strong,
.model-option__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-option__copy strong {
  font-size: 13px;
  font-weight: 400;
}

.model-option__copy small {
  color: rgba(103, 119, 136, 0.66);
  font-size: 10px;
}

.model-option > button {
  min-height: 30px;
  padding: 4px 8px;
  border: 0;
  border-radius: 9px;
  background: rgba(214, 229, 247, 0.44);
  color: #587a9f;
  font: inherit;
  font-size: 12px;
}

.model-option__check {
  color: #7193b9;
  font-size: 15px;
  font-weight: 600;
  line-height: 16px;
  opacity: 0;
  text-align: right;
}

.model-option.is-current .model-option__check {
  opacity: 1;
}

.model-sheet__note {
  margin: 17px 3px 0;
  color: rgba(105, 119, 135, 0.6);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.003em;
  line-height: 17px;
}

.model-picker-trigger:focus-visible,
.model-sheet__backdrop:focus-visible,
.model-sheet__close:focus-visible,
.model-option:focus-visible,
.turn-process__actions button:focus-visible,
.message-process-trigger:focus-visible,
.activity-record__trigger:focus-visible,
.contact-summary__name-trigger:focus-visible,
.conversation-row__open:focus-visible,
.conversation-row__more:focus-visible,
.conversation-row__menu button:focus-visible,
.conversation-title-editor__actions button:focus-visible,
.assistant-name-editor__actions button:focus-visible {
  outline: 2px solid rgba(126, 164, 207, 0.62);
  outline-offset: 2px;
}

.page-back-button {
  position: absolute;
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: rgba(89, 105, 123, 0.76);
  background: rgba(255, 255, 255, 0.22);
  border: 0;
  border-radius: 50%;
}

.conversation-header .page-back-button {
  top: 50%;
  left: max(12px, env(safe-area-inset-left));
  transform: translateY(-50%);
}

.placeholder-header .page-back-button {
  bottom: 4px;
  left: max(12px, env(safe-area-inset-left));
}

.page-back-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.contact-summary {
  display: grid;
  align-content: center;
  justify-items: center;
  min-block-size: 71px;
  gap: 7px;
  min-width: 130px;
}

.contact-summary h1,
.contact-summary__name-trigger {
  margin: 0;
  padding: 0;
  color: #1f2937;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 21px;
  background: transparent;
  border: 0;
}

.contact-summary__name-trigger {
  min-height: 21px;
  border-radius: 0;
}

.conversation-header__context {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: max(54px, calc(env(safe-area-inset-left) + 42px));
  max-width: 96px;
  margin: 0;
  overflow: hidden;
  color: rgba(101, 117, 135, 0.66);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(-50%);
}

.history-chat-subtitle {
  min-height: 16px;
  margin: 0;
  color: #7a8492;
  font-size: 11px;
  font-weight: 400;
  line-height: 16px;
}

.assistant-name-editor {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  left: 50%;
  display: grid;
  width: min(276px, calc(100vw - 32px));
  gap: 9px;
  padding: 12px;
  color: #4d5e71;
  background: rgba(249, 251, 253, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(68, 86, 108, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(15px) saturate(1.05);
  backdrop-filter: blur(15px) saturate(1.05);
  transform: translateX(-50%);
}

.assistant-name-editor[hidden] {
  display: none;
}

.assistant-name-editor__title {
  margin: 0;
  color: rgba(72, 88, 106, 0.84);
  font-size: 12px;
  font-weight: 500;
  line-height: 17px;
}

.assistant-name-editor__actions {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  grid-auto-flow: unset;
}

.assistant-name-editor__restore {
  justify-self: start;
  color: rgba(98, 125, 154, 0.82) !important;
}

.history-thread-note {
  max-width: min(74%, 290px);
  margin: 27px auto 0;
  padding: 10px 12px;
  color: rgba(89, 105, 123, 0.72);
  background: rgba(255, 255, 255, 0.31);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.57);
}

.history-thread-note p {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.003em;
  line-height: 18px;
}

.conversation-message-status {
  align-self: center;
  margin: auto 0;
  color: rgba(104, 119, 135, 0.7);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.connection-status {
  display: inline-grid;
  grid-template-columns: 7px auto;
  align-items: center;
  justify-content: center;
  column-gap: 7px;
  min-height: 16px;
  margin: 0;
  color: #7a8492;
  font-size: 11px;
  font-weight: 400;
  line-height: 16px;
}

.connection-status__text {
  min-width: 0;
}

.activity-dot {
  position: relative;
  display: block;
  width: 7px;
  height: 7px;
  background: #b8c4d1;
  border-radius: 50%;
  opacity: 0.86;
  transform: scale(1);
}

.activity-dot::after {
  position: absolute;
  inset: -8px;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle, rgba(208, 225, 246, 0.4) 0%, rgba(182, 207, 237, 0.16) 42%, transparent 72%);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.82);
}

.connection-status:is([data-state="stale"], [data-state="offline"], [data-state="error"]) .activity-dot {
  background: #b6bbc2;
  opacity: 0.8;
}

.is-working .activity-dot {
  background: #90accd;
  animation: gentle-breathe 2.3s ease-in-out infinite;
}

.is-working .activity-dot::after {
  animation: activity-halo-breathe 2.3s ease-in-out infinite;
}

.is-working .connection-status {
  color: #77899b;
}

@keyframes gentle-breathe {
  0%,
  100% {
    opacity: 0.56;
    box-shadow: 0 0 0 0 rgba(147, 177, 213, 0);
    transform: scale(0.85);
  }

  50% {
    opacity: 0.96;
    box-shadow: 0 0 7px 1.5px rgba(147, 177, 213, 0.24);
    transform: scale(1.08);
  }
}

@keyframes activity-halo-breathe {
  0%,
  100% {
    opacity: 0.08;
    transform: scale(0.82);
  }

  50% {
    opacity: 0.52;
    transform: scale(1.2);
  }
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 20px 16px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.messages::-webkit-scrollbar {
  display: none;
}

.time-marker {
  align-self: center;
  margin: 1px 0 6px;
  color: rgba(122, 132, 146, 0.72);
  font-size: 11px;
  line-height: 16px;
}

.message {
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  padding: 10px 13px;
  color: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.message p {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.message__attachments {
  display: grid;
  gap: 7px;
}

.message p + .message__attachments {
  margin-top: 8px;
}

.message__attachment-image {
  display: block;
  width: min(100%, 246px);
  max-height: 320px;
  object-fit: cover;
  background: rgba(230, 237, 245, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 13px;
}

.message__attachment-image-trigger {
  display: block;
  width: min(100%, 246px);
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 13px;
}

.message__attachment-image-trigger:focus-visible {
  outline: 2px solid rgba(109, 145, 184, 0.72);
  outline-offset: 2px;
}

.message__attachment {
  display: inline-flex;
  width: fit-content;
  min-height: 29px;
  align-items: center;
  padding: 0 10px;
  color: rgba(73, 101, 130, 0.84);
  font-size: 12px;
  line-height: 16px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 10px;
}

.message__attachment--unavailable {
  color: rgba(104, 116, 128, 0.68);
}

.message-item {
  display: grid;
  width: fit-content;
  max-width: 100%;
  align-items: end;
  column-gap: clamp(8px, 1.4vw, 12px);
  margin-bottom: 2px;
}

.message-item--other {
  grid-template-columns: minmax(0, auto) auto;
  align-self: flex-start;
}

.message-item--self {
  grid-template-columns: auto minmax(0, auto);
  align-self: flex-end;
}

.message-item--handoff {
  width: min(100%, 520px);
  align-self: center;
  margin: 8px auto 12px;
}

.message-item .message {
  max-inline-size: min(72vw, 348px);
}

.message-item--other .message {
  grid-column: 1;
  grid-row: 1;
}

.message-item--self .message {
  grid-column: 2;
  grid-row: 1;
}

.message__time {
  display: inline-flex;
  min-height: 17px;
  align-items: center;
  padding: 1px 6px;
  margin-bottom: 1px;
  color: rgba(102, 117, 134, 0.56);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 14px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
  -webkit-backdrop-filter: blur(7px) saturate(1.02);
  backdrop-filter: blur(7px) saturate(1.02);
}

.message-item--other .message__time {
  grid-column: 2;
  grid-row: 1;
}

.message-item--self .message__time {
  grid-column: 1;
  grid-row: 1;
}

.message--other {
  position: relative;
  background: rgba(255, 255, 255, 0.72);
  border-bottom-left-radius: 7px;
}

.message--self {
  background: rgba(220, 235, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.7);
  border-bottom-right-radius: 7px;
}

.message--failed {
  border-color: rgba(201, 136, 136, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 0 0 1px rgba(203, 145, 145, 0.08);
}

.message__retry {
  justify-self: end;
  min-height: 25px;
  padding: 0 7px;
  color: rgba(151, 94, 94, 0.84);
  font: inherit;
  font-size: 11px;
  line-height: 16px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(210, 159, 159, 0.3);
  border-radius: 8px;
}

.message--handoff {
  width: 100%;
  box-sizing: border-box;
  color: rgba(72, 88, 106, 0.88);
  background: rgba(237, 244, 250, 0.68);
  border-color: rgba(255, 255, 255, 0.76);
  border-radius: 15px;
}

.message--handoff .message__handoff-label {
  margin-bottom: 5px;
  color: rgba(93, 121, 149, 0.78);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.turn-process {
  align-self: flex-start;
  max-width: min(74%, 300px);
  margin: 1px 0;
}

.turn-process[hidden] {
  display: none;
}

.turn-process__list {
  display: grid;
  gap: 5px;
}

.turn-process__group {
  display: grid;
  gap: 4px;
}

.turn-process__narration {
  max-width: 100%;
  margin: 0 2px;
  color: rgba(103, 120, 138, 0.58);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.004em;
  line-height: 16px;
}

.turn-process__item {
  width: fit-content;
  min-height: 31px;
  max-width: 100%;
  margin: 0;
  padding: 6px 10px;
  color: rgba(88, 108, 130, 0.82);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.003em;
  line-height: 18px;
  text-align: left;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.57);
  -webkit-backdrop-filter: blur(7px) saturate(1.02);
  backdrop-filter: blur(7px) saturate(1.02);
}

.turn-process__item[data-phase="completed"] {
  color: rgba(94, 123, 108, 0.75);
  background: rgba(247, 252, 248, 0.42);
}

.turn-process__item[data-phase="failed"] {
  color: rgba(143, 93, 98, 0.74);
  background: rgba(255, 248, 249, 0.4);
}

.turn-process__item[data-phase="waiting"],
.turn-process__item--transient {
  color: rgba(104, 119, 135, 0.68);
}

.turn-process__interaction {
  display: flex;
  width: fit-content;
  min-height: 31px;
  max-width: 100%;
  padding: 4px 5px 4px 11px;
  align-items: center;
  gap: 8px;
  color: rgba(104, 119, 135, 0.72);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.004em;
  line-height: 18px;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.57);
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
  -webkit-backdrop-filter: blur(7px) saturate(1.02);
  backdrop-filter: blur(7px) saturate(1.02);
}

.turn-process__actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.turn-process__actions button {
  min-width: 42px;
  min-height: 25px;
  padding: 0 8px;
  color: rgba(93, 120, 151, 0.9);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.005em;
  background: rgba(232, 241, 251, 0.62);
  border: 1px solid rgba(180, 202, 226, 0.34);
  border-radius: 10px;
}

.turn-process__actions button[data-decision="reject"] {
  color: rgba(124, 111, 118, 0.76);
  background: rgba(249, 246, 247, 0.54);
  border-color: rgba(204, 194, 199, 0.29);
}

.turn-process__actions button:active {
  transform: scale(0.97);
}

.message-process-attachment {
  position: absolute;
  z-index: 3;
  top: -15px;
  right: -16px;
}

.message-process-trigger {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: rgba(106, 121, 139, 0.52);
  background: transparent;
  border: 0;
  border-radius: 999px;
  opacity: 0.82;
}

.message-process-icon {
  display: block;
  width: 19px;
  height: 19px;
  overflow: visible;
}

.message-process-trigger:hover,
.message-process-trigger[aria-expanded="true"] {
  color: rgba(91, 112, 136, 0.78);
  background: rgba(255, 255, 255, 0.42);
  opacity: 1;
}

.message-process-details {
  position: absolute;
  z-index: 4;
  top: 31px;
  right: -2px;
  display: grid;
  width: max-content;
  max-width: min(72vw, 250px);
  gap: 4px;
  padding: 8px 10px;
  color: rgba(89, 107, 125, 0.76);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.003em;
  line-height: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 12px;
  box-shadow: 0 7px 18px rgba(75, 95, 117, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(10px) saturate(1.03);
  backdrop-filter: blur(10px) saturate(1.03);
}

/* This panel is appended to body and positioned from its rabbit trigger, so
   subsequent message cards and the scrolling conversation viewport cannot
   clip it. */
.message-process-details--portal {
  position: fixed;
  z-index: 1000;
}

.message-process-details[hidden] {
  display: none;
}

.message-process-details__item {
  margin: 0;
  word-break: break-word;
}

.message-process-details__group {
  display: grid;
  gap: 3px;
}

.message-process-details__narration {
  margin: 0;
  color: rgba(102, 119, 137, 0.62);
  font-size: 10px;
  line-height: 15px;
}

.message-process-details__item[data-phase="failed"] {
  color: rgba(143, 93, 98, 0.82);
}

.message--typing > p {
  visibility: hidden;
}

.message--typing.message--typing-paused .message__typing-dots i {
  animation-play-state: paused;
  opacity: 0.62;
  transform: none;
}

.message__typing {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  pointer-events: none;
}

.message__typing[hidden] {
  display: none;
}

.message__typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 16px;
}

.message__typing-dots i {
  display: block;
  width: 3px;
  height: 3px;
  background: rgba(116, 145, 177, 0.72);
  border-radius: 50%;
  animation: typing-dot 1.35s ease-in-out infinite;
}

.message__typing-dots i:nth-child(2) {
  animation-delay: 150ms;
}

.message__typing-dots i:nth-child(3) {
  animation-delay: 300ms;
}

@keyframes typing-dot {
  0%,
  100% {
    opacity: 0.34;
    transform: translateY(1px);
  }

  50% {
    opacity: 0.95;
    transform: translateY(-1px);
  }
}

.composer {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  padding: 9px 14px max(11px, env(safe-area-inset-bottom));
  background: rgba(245, 247, 250, 0.78);
  border-top: 1px solid rgba(122, 132, 146, 0.11);
  -webkit-backdrop-filter: blur(10px) saturate(1.04);
  backdrop-filter: blur(10px) saturate(1.04);
}

.composer-active-turn-note {
  grid-column: 1 / -1;
  margin: -1px 2px 1px;
  color: rgba(108, 124, 142, 0.7);
  font-size: 11px;
  line-height: 16px;
}

.composer-active-turn-note[hidden] {
  display: none;
}

.composer-attachments {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  max-width: 100%;
  padding: 0 1px 2px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.composer-attachments[hidden] {
  display: none;
}

.composer-attachment {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(72px, 1fr) auto;
  min-width: 156px;
  max-width: 220px;
  min-height: 48px;
  gap: 7px;
  align-items: center;
  padding: 4px 7px 4px 4px;
  color: rgba(67, 84, 104, 0.84);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 12px;
}

.composer-attachment img {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 9px;
}

.composer-attachment span,
.composer-attachment small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-attachment span {
  font-size: 12px;
}

.composer-attachment small {
  color: rgba(101, 116, 132, 0.64);
  font-size: 10px;
}

.composer-attachment button {
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  padding: 0;
  color: rgba(99, 113, 129, 0.72);
  font-size: 20px;
  line-height: 1;
  background: transparent;
  border: 0;
}

.composer-attachments__note {
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
  color: rgba(131, 93, 93, 0.82);
  font-size: 11px;
  line-height: 16px;
}

.composer-attachment-sheet,
.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.composer-attachment-sheet[hidden],
.image-viewer[hidden] {
  display: none;
}

.composer-attachment-sheet {
  display: grid;
  grid-template: minmax(0, 1fr) auto / minmax(0, 1fr);
}

.composer-attachment-sheet__backdrop,
.image-viewer__backdrop {
  grid-area: 1 / 1 / -1 / -1;
  padding: 0;
  background: rgba(46, 59, 75, 0.2);
  border: 0;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.composer-attachment-sheet__panel {
  z-index: 1;
  display: grid;
  gap: 7px;
  padding: 12px 16px max(22px, env(safe-area-inset-bottom));
  color: rgba(58, 74, 92, 0.9);
  background: rgba(247, 249, 252, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  -webkit-backdrop-filter: blur(14px) saturate(1.04);
  backdrop-filter: blur(14px) saturate(1.04);
}

.composer-attachment-sheet__panel button {
  min-height: 46px;
  color: inherit;
  font: inherit;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 13px;
}

.composer-attachment-sheet__panel button:disabled {
  color: rgba(111, 123, 136, 0.54);
}

.composer-attachment-sheet__panel p {
  margin: 0 5px 2px;
  color: rgba(103, 116, 130, 0.62);
  font-size: 11px;
  line-height: 16px;
}

.composer-attachment-sheet__cancel {
  margin-top: 4px;
}

.image-viewer {
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.image-viewer__backdrop {
  background: rgba(30, 38, 50, 0.8);
}

.image-viewer__content {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 760px);
  max-height: 100%;
  place-items: center;
}

.image-viewer__content img {
  display: block;
  max-width: 100%;
  max-height: calc(100svh - max(32px, env(safe-area-inset-top)) - max(32px, env(safe-area-inset-bottom)));
  object-fit: contain;
  border-radius: 12px;
}

.image-viewer__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  padding: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 25px;
  line-height: 1;
  background: rgba(36, 46, 60, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
}

.composer-action {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  color: #8d9aaa;
  background: transparent;
  border: 0;
}

.composer-action svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.composer-action--add {
  color: #8996a5;
}

.composer-action--send {
  color: #9fb4ce;
}

.composer-action--send:not(:disabled) {
  color: #7896bb;
}

.composer-action:disabled {
  opacity: 0.48;
}

.composer-action--send svg {
  width: 20px;
  height: 20px;
}

.composer-field {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  color: #98a1ad;
  font-size: 15px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(122, 132, 146, 0.13);
  border-radius: 19px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.72);
}

.composer-field textarea {
  width: 100%;
  min-height: 20px;
  max-height: 112px;
  padding: 0;
  color: #263446;
  font: inherit;
  line-height: 20px;
  resize: none;
  background: transparent;
  border: 0;
  outline: 0;
}

.composer-field textarea::placeholder {
  color: #98a1ad;
}

.composer-field textarea:disabled {
  cursor: not-allowed;
}

.scroll-latest {
  position: absolute;
  z-index: 6;
  right: max(17px, calc(env(safe-area-inset-right) + 12px));
  bottom: calc(max(11px, env(safe-area-inset-bottom)) + 55px);
  display: inline-flex;
  min-width: 34px;
  min-height: 34px;
  padding: 0 9px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: rgba(91, 116, 143, 0.78);
  font-size: 17px;
  line-height: 1;
  background: rgba(249, 251, 253, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 17px;
  box-shadow: 0 5px 16px rgba(73, 92, 114, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: blur(11px) saturate(1.04);
  backdrop-filter: blur(11px) saturate(1.04);
}

.scroll-latest[hidden] {
  display: none;
}

.scroll-latest__count {
  min-width: 12px;
  color: rgba(91, 116, 143, 0.7);
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
}

@media (min-width: 541px) {
  .model-sheet {
    display: block;
    pointer-events: none;
  }

  .model-sheet__backdrop {
    pointer-events: auto;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .model-sheet__panel {
    position: absolute;
    top: max(58px, env(safe-area-inset-top));
    right: max(12px, calc((100vw - 540px) / 2 + 12px));
    width: min(384px, calc(100vw - 32px));
    max-block-size: min(72svh, 610px);
    pointer-events: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 21px;
    box-shadow: 0 12px 34px rgba(68, 86, 108, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  }

  .model-sheet__handle {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-working .activity-dot,
  .is-working .activity-dot::after {
    animation: none;
  }

  .is-working .activity-dot {
    opacity: 0.82;
    transform: scale(1);
  }

  .is-working .activity-dot::after {
    opacity: 0.2;
    transform: scale(1);
  }

  .message__typing-dots i {
    animation: none;
    opacity: 0.72;
    transform: none;
  }
}

@media (min-width: 541px) {
  .app-shell {
    border-right: 1px solid rgba(122, 132, 146, 0.08);
    border-left: 1px solid rgba(122, 132, 146, 0.08);
  }
}
