:root {
  --ink: #112a30;
  --ink-soft: #26464c;
  --peacock: #123f47;
  --peacock-deep: #0c3037;
  --mint: #75d7a7;
  --mint-bright: #a9efc9;
  --paper: #f5f7f2;
  --paper-warm: #eef2ea;
  --surface: #ffffff;
  --line: #d7dfd6;
  --muted: #70817e;
  --danger: #a53f4b;
  --shadow: 0 24px 70px rgba(14, 48, 55, 0.14);
  --body-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display-font: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --mono-font: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  color: var(--ink);
  font-family: var(--body-font);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

:focus-visible {
  outline: 3px solid rgba(117, 215, 167, 0.75);
  outline-offset: 3px;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.brand-stem {
  position: absolute;
  left: 16px;
  top: 9px;
  width: 2px;
  height: 23px;
  border-radius: 3px;
  background: currentColor;
  transform: rotate(14deg);
  transform-origin: bottom;
}

.brand-leaf {
  position: absolute;
  left: 12px;
  top: 2px;
  width: 18px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 100% 0 100% 0;
  transform: rotate(-12deg);
}

.brand-mark--large {
  width: 72px;
  height: 72px;
  color: var(--mint-bright);
}

.brand-mark--large .brand-stem {
  left: 33px;
  top: 19px;
  width: 3px;
  height: 48px;
}

.brand-mark--large .brand-leaf {
  left: 22px;
  top: 5px;
  width: 39px;
  height: 29px;
  border-width: 3px;
}

/* Authentication */

.auth-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 85%, rgba(117, 215, 167, 0.11), transparent 28rem),
    var(--paper);
}

.auth-page::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(17, 42, 48, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 42, 48, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  mask-image: linear-gradient(90deg, #000, transparent 72%);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(370px, 0.8fr);
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  align-items: center;
  gap: clamp(48px, 8vw, 130px);
  padding: 64px 0;
}

.auth-brand {
  position: relative;
  min-height: 560px;
  padding: 78px clamp(34px, 5vw, 76px);
  overflow: hidden;
  border-radius: 3px 88px 3px 3px;
  color: #ecf7f0;
  background:
    linear-gradient(135deg, rgba(117, 215, 167, 0.08), transparent 54%),
    var(--peacock);
  box-shadow: var(--shadow);
}

.auth-brand::after {
  position: absolute;
  right: -118px;
  bottom: -152px;
  width: 410px;
  height: 410px;
  border: 1px solid rgba(169, 239, 201, 0.22);
  border-radius: 48% 52% 63% 37% / 42% 36% 64% 58%;
  content: "";
  transform: rotate(18deg);
}

.auth-brand .eyebrow {
  margin-top: 52px;
  color: var(--mint-bright);
}

.auth-brand h1 {
  max-width: 640px;
  margin: 22px 0 24px;
  font-family: var(--display-font);
  font-size: clamp(2.65rem, 5vw, 4.7rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.auth-brand__copy {
  max-width: 450px;
  margin: 0;
  color: rgba(236, 247, 240, 0.72);
  font-size: 1rem;
  line-height: 1.85;
}

.specimen-label {
  position: absolute;
  right: 48px;
  bottom: 38px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: right;
  font-family: var(--mono-font);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
}

.specimen-label span {
  color: rgba(236, 247, 240, 0.48);
}

.specimen-label strong {
  color: var(--mint-bright);
}

.auth-card {
  width: 100%;
  padding: 32px 4px;
}

.auth-card__header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 40px;
}

.auth-index {
  padding-top: 5px;
  color: var(--mint);
  font-family: var(--mono-font);
  font-size: 0.72rem;
  font-weight: 700;
}

.auth-card h2 {
  margin: 8px 0 0;
  font-family: var(--display-font);
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form > label,
.password-panel label,
.data-label {
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 650;
}

.auth-form input,
.password-panel input,
.copy-field input {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-form input:focus,
.password-panel input:focus,
.copy-field input:focus {
  border-color: var(--peacock);
  outline: none;
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(117, 215, 167, 0.17);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 64px;
}

.password-toggle {
  position: absolute;
  top: 0;
  right: 3px;
  min-width: 54px;
  min-height: 52px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.76rem;
}

.form-error {
  min-height: 20px;
  margin: 4px 0 0;
  color: var(--danger);
  font-size: 0.78rem;
  line-height: 1.5;
}

.primary-action,
.secondary-action {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 0 19px;
  border: 1px solid var(--peacock);
  border-radius: 4px;
  color: white;
  background: var(--peacock);
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.primary-action:hover:not(:disabled),
.secondary-action:hover:not(:disabled) {
  background: var(--peacock-deep);
  box-shadow: 0 12px 24px rgba(18, 63, 71, 0.17);
  transform: translateY(-1px);
}

.auth-switch {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.auth-switch a {
  color: var(--peacock);
  font-weight: 700;
  text-underline-offset: 4px;
}

/* Chat shell */

.chat-page {
  height: 100vh;
  overflow: hidden;
  background: var(--paper);
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  height: 100vh;
}

.sidebar {
  position: relative;
  z-index: 20;
  display: flex;
  min-height: 0;
  flex-direction: column;
  color: #ecf7f0;
  background:
    linear-gradient(165deg, rgba(117, 215, 167, 0.065), transparent 38%),
    var(--peacock-deep);
}

.sidebar::after {
  position: absolute;
  top: 178px;
  bottom: 106px;
  left: 31px;
  width: 1px;
  background: linear-gradient(var(--mint), rgba(117, 215, 167, 0.04));
  content: "";
  pointer-events: none;
}

.sidebar__header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid rgba(236, 247, 240, 0.09);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.wordmark .brand-mark {
  color: var(--mint-bright);
}

.wordmark > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.wordmark strong {
  font-family: var(--display-font);
  font-size: 1.08rem;
  font-weight: 600;
}

.wordmark small {
  color: rgba(236, 247, 240, 0.46);
  font-family: var(--mono-font);
  font-size: 0.56rem;
  letter-spacing: 0.18em;
}

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 1.25rem;
}

.sidebar-close {
  display: none;
  color: white;
}

.new-chat-button {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  margin: 20px 18px 10px;
  padding: 0 14px;
  border: 1px solid rgba(169, 239, 201, 0.35);
  border-radius: 4px 18px 4px 4px;
  color: var(--mint-bright);
  background: rgba(117, 215, 167, 0.08);
  font-weight: 700;
  transition: background 160ms ease, border-color 160ms ease;
}

.new-chat-button:hover {
  border-color: rgba(169, 239, 201, 0.7);
  background: rgba(117, 215, 167, 0.14);
}

.new-chat-button kbd {
  margin-left: auto;
  color: rgba(236, 247, 240, 0.4);
  font-family: var(--mono-font);
  font-size: 0.62rem;
}

.conversation-section {
  min-height: 0;
  flex: 1;
  padding: 14px 15px 20px;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 12px 29px;
  color: rgba(236, 247, 240, 0.42);
  font-family: var(--mono-font);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.conversation-list {
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(169, 239, 201, 0.18) transparent;
}

.conversation-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 34px;
  min-height: 54px;
  align-items: center;
  margin: 1px 0;
  padding: 7px 4px 7px 28px;
  border-radius: 4px 14px 4px 4px;
}

.conversation-item::before {
  position: absolute;
  z-index: 1;
  top: 24px;
  left: 12px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--peacock-deep);
  border-radius: 100% 0 100% 0;
  background: rgba(169, 239, 201, 0.45);
  content: "";
  transform: rotate(45deg);
}

.conversation-item.is-active {
  background: rgba(117, 215, 167, 0.12);
}

.conversation-item.is-active::before {
  background: var(--mint-bright);
  box-shadow: 0 0 0 4px rgba(117, 215, 167, 0.1);
}

.conversation-select,
.conversation-delete {
  border: 0;
  color: inherit;
  background: transparent;
}

.conversation-select {
  min-width: 0;
  padding: 8px 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.83rem;
}

.conversation-delete {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  opacity: 0;
}

.conversation-item:hover .conversation-delete,
.conversation-delete:focus-visible {
  opacity: 0.68;
}

.conversation-delete:hover {
  color: #ffb1b8;
  background: rgba(255, 177, 184, 0.09);
  opacity: 1;
}

.sidebar__footer {
  padding: 12px 14px 16px;
  border-top: 1px solid rgba(236, 247, 240, 0.09);
}

.user-chip {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 0;
  border-radius: 4px 15px 4px 4px;
  color: inherit;
  background: transparent;
  text-align: left;
}

.user-chip:hover {
  background: rgba(236, 247, 240, 0.07);
}

.user-avatar {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(169, 239, 201, 0.35);
  border-radius: 50% 50% 50% 8px;
  color: var(--mint-bright);
  background: rgba(117, 215, 167, 0.1);
  font-family: var(--display-font);
  font-weight: 700;
}

.user-avatar--large {
  width: 52px;
  height: 52px;
  color: var(--peacock);
  background: var(--paper-warm);
}

.user-chip__text {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.user-chip__text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}

.user-chip__text small {
  margin-top: 2px;
  color: rgba(236, 247, 240, 0.42);
  font-size: 0.68rem;
}

.chat-workspace {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 72px minmax(0, 1fr) auto;
  background:
    linear-gradient(90deg, rgba(17, 42, 48, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 88px 100%;
}

.workspace-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 247, 242, 0.91);
  backdrop-filter: blur(16px);
}

.conversation-heading {
  display: flex;
  align-items: center;
  gap: 11px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(117, 215, 167, 0.13);
}

.conversation-heading p {
  max-width: min(48vw, 560px);
  margin: 0 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 750;
}

.conversation-heading span:last-child {
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 0.59rem;
  letter-spacing: 0.04em;
}

.quiet-button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-size: 0.76rem;
}

.quiet-button:hover:not(:disabled) {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface);
}

.mobile-only {
  display: none;
}

.message-area {
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.empty-state {
  display: flex;
  width: min(780px, calc(100% - 48px));
  min-height: 100%;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
  padding: 60px 0 88px;
}

.growth-orbit {
  position: relative;
  width: 76px;
  height: 76px;
  margin-bottom: 25px;
}

.growth-orbit__ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(18, 63, 71, 0.2);
  border-radius: 47% 53% 44% 56% / 58% 46% 54% 42%;
  animation: orbit-breathe 6s ease-in-out infinite;
}

.growth-orbit__leaf {
  position: absolute;
  z-index: 1;
  top: 23px;
  left: 23px;
  width: 31px;
  height: 23px;
  border: 2px solid var(--peacock);
  border-radius: 100% 0 100% 0;
  background: rgba(117, 215, 167, 0.22);
  transform: rotate(-18deg);
}

.empty-state h1 {
  margin: 12px 0 13px;
  font-family: var(--display-font);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.045em;
}

.empty-state > p:not(.eyebrow) {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.9;
}

.prompt-seeds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 35px;
}

.prompt-seeds button {
  display: flex;
  min-height: 82px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 3px 21px 3px 3px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.54);
  text-align: left;
  font-size: 0.78rem;
  line-height: 1.5;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.prompt-seeds button:hover {
  border-color: rgba(18, 63, 71, 0.42);
  background: white;
  transform: translateY(-2px);
}

.message-list {
  width: min(820px, calc(100% - 48px));
  margin: 0 auto;
  padding: 58px 0 56px;
}

.message {
  position: relative;
  margin-bottom: 31px;
  animation: message-arrive 240ms ease-out both;
}

.message__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message__content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.78;
}

.message--user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.message--user .message__content {
  max-width: min(78%, 620px);
  padding: 13px 16px;
  border-radius: 18px 4px 18px 18px;
  color: #f3fbf6;
  background: var(--peacock);
  font-size: 0.92rem;
}

.message--assistant {
  padding-left: 28px;
}

.message--assistant::before {
  position: absolute;
  top: 2px;
  bottom: -18px;
  left: 5px;
  width: 1px;
  background: linear-gradient(var(--mint), rgba(117, 215, 167, 0.08));
  content: "";
}

.message--assistant::after {
  position: absolute;
  top: 5px;
  left: 1px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--paper);
  border-radius: 100% 0 100% 0;
  background: var(--mint);
  content: "";
  transform: rotate(45deg);
}

.message--assistant .message__content {
  max-width: 780px;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.message--pending .message__content {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
}

.thinking-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  animation: thinking 1.2s ease-in-out infinite;
}

.thinking-dot:nth-child(2) {
  animation-delay: 120ms;
}

.thinking-dot:nth-child(3) {
  animation-delay: 240ms;
}

.composer-zone {
  position: relative;
  z-index: 4;
  padding: 10px 24px 13px;
  background: linear-gradient(transparent, var(--paper) 26%);
}

.composer {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: 10px 12px 9px;
  border: 1px solid #c9d5cb;
  border-radius: 6px 24px 6px 6px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 35px rgba(14, 48, 55, 0.09);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.composer:focus-within {
  border-color: rgba(18, 63, 71, 0.58);
  box-shadow: 0 14px 38px rgba(14, 48, 55, 0.12), 0 0 0 4px rgba(117, 215, 167, 0.12);
}

.composer textarea {
  display: block;
  width: 100%;
  max-height: 190px;
  min-height: 42px;
  padding: 8px 9px;
  resize: none;
  overflow-y: auto;
  border: 0;
  outline: 0;
  background: transparent;
  line-height: 1.6;
}

.composer textarea::placeholder {
  color: #9aa7a2;
}

.composer__footer {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  padding-left: 9px;
}

.composer__footer > span {
  color: #96a39e;
  font-family: var(--mono-font);
  font-size: 0.57rem;
}

.send-button {
  display: flex;
  min-width: 78px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 4px 16px 4px 4px;
  color: white;
  background: var(--peacock);
  font-size: 0.76rem;
  font-weight: 700;
}

.send-button:hover:not(:disabled) {
  background: var(--peacock-deep);
}

.model-note {
  margin: 7px auto 0;
  color: #99a59f;
  text-align: center;
  font-size: 0.62rem;
}

.chat-error {
  display: none;
  width: min(820px, 100%);
  margin: 0 auto 8px;
  padding: 9px 12px;
  border: 1px solid rgba(165, 63, 75, 0.22);
  border-radius: 4px;
  color: var(--danger);
  background: #fff3f3;
  font-size: 0.76rem;
}

.chat-error:not(:empty) {
  display: block;
}

/* Account dialog */

.user-dialog {
  width: min(430px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 5px 34px 5px 5px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.user-dialog::backdrop {
  background: rgba(8, 30, 35, 0.48);
  backdrop-filter: blur(5px);
}

.dialog-close-row {
  display: flex;
  justify-content: flex-end;
  margin: -13px -13px 2px 0;
}

.user-dialog h2 {
  margin: 7px 0 22px;
  font-family: var(--display-font);
  font-size: 2rem;
  font-weight: 600;
}

.identity-card {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px 20px 4px 4px;
  background: var(--paper);
}

.identity-card > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.identity-card span:last-child {
  color: var(--muted);
  font-size: 0.72rem;
}

.data-label {
  display: block;
  margin: 0 0 7px;
}

.copy-field {
  display: grid;
  grid-template-columns: 1fr 62px;
  margin-bottom: 19px;
}

.copy-field input {
  min-width: 0;
  border-radius: 4px 0 0 4px;
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 0.68rem;
}

.copy-field button {
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 4px 4px 0;
  background: var(--paper);
  font-size: 0.72rem;
}

.password-panel {
  margin: 8px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.password-panel summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  list-style: none;
}

.password-panel summary::-webkit-details-marker {
  display: none;
}

.password-panel form {
  display: grid;
  gap: 8px;
  padding-bottom: 18px;
}

.secondary-action {
  justify-content: center;
  min-height: 46px;
  margin-top: 4px;
}

.danger-action {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(165, 63, 75, 0.25);
  border-radius: 4px;
  color: var(--danger);
  background: #fff8f8;
  font-weight: 700;
}

.danger-action:hover {
  background: #fff0f0;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100% - 48px));
  padding: 11px 15px;
  border-radius: 4px 16px 4px 4px;
  color: #effaf3;
  background: var(--peacock);
  box-shadow: var(--shadow);
  font-size: 0.78rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes orbit-breathe {
  0%,
  100% {
    border-radius: 47% 53% 44% 56% / 58% 46% 54% 42%;
    transform: rotate(0deg);
  }
  50% {
    border-radius: 61% 39% 57% 43% / 40% 61% 39% 60%;
    transform: rotate(12deg);
  }
}

@keyframes message-arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes thinking {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    width: min(680px, calc(100% - 36px));
    gap: 0;
  }

  .auth-brand {
    min-height: 410px;
    padding: 50px;
  }

  .auth-brand .eyebrow {
    margin-top: 30px;
  }

  .auth-card {
    padding: 54px 22px 20px;
  }
}

@media (max-width: 800px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(320px, 86vw);
    transform: translateX(-102%);
    transition: transform 220ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: 22px 0 60px rgba(8, 30, 35, 0.28);
  }

  .sidebar-close,
  .mobile-only {
    display: inline-grid;
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 15;
    inset: 0;
    background: rgba(8, 30, 35, 0.38);
  }

  .sidebar-backdrop:not([hidden]) {
    display: block;
  }

  .chat-workspace {
    height: 100vh;
    grid-template-rows: 64px minmax(0, 1fr) auto;
  }

  .workspace-header {
    padding: 0 13px;
  }

  .conversation-heading {
    margin-right: auto;
    margin-left: 4px;
  }

  .conversation-heading span:last-child {
    display: none;
  }

  .quiet-button {
    width: 44px;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0;
  }

  .quiet-button span {
    font-size: 1.15rem;
  }

  .message-list,
  .empty-state {
    width: calc(100% - 30px);
  }

  .prompt-seeds {
    grid-template-columns: 1fr;
  }

  .prompt-seeds button {
    min-height: 58px;
  }

  .composer-zone {
    padding: 8px 10px 9px;
  }

  .composer {
    border-radius: 5px 20px 5px 5px;
  }

  .composer__footer > span {
    display: none;
  }

  .composer__footer {
    justify-content: flex-end;
  }

  .message--user .message__content {
    max-width: 90%;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    width: 100%;
    padding: 0;
  }

  .auth-brand {
    min-height: 330px;
    padding: 36px 27px;
    border-radius: 0 0 48px 0;
  }

  .brand-mark--large {
    transform: scale(0.72);
    transform-origin: left top;
  }

  .auth-brand .eyebrow {
    margin-top: 6px;
  }

  .auth-brand h1 {
    margin-top: 15px;
    font-size: 2.3rem;
  }

  .auth-brand__copy {
    font-size: 0.86rem;
  }

  .specimen-label {
    display: none;
  }

  .auth-card {
    padding: 42px 25px 54px;
  }

  .empty-state {
    justify-content: flex-start;
    padding-top: 74px;
  }

  .growth-orbit {
    width: 60px;
    height: 60px;
  }

  .growth-orbit__leaf {
    top: 18px;
    left: 18px;
    width: 25px;
    height: 19px;
  }

  .empty-state h1 {
    font-size: 2rem;
  }
}

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