:root {
  color-scheme: dark;
  --bg-dark: #0b0b10;
  --glass: rgba(255, 255, 255, 0.16);
  --glass-strong: rgba(255, 255, 255, 0.2);
  --glass-dark: rgba(10, 10, 12, 0.7);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --border: rgba(255, 255, 255, 0.18);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #faf9f5;
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  overscroll-behavior: none;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: calc(24px + var(--safe-top)) 22px calc(24px + var(--safe-bottom));
  overflow: auto;
  background:
    radial-gradient(circle at 18% 12%, rgba(222, 212, 235, 0.72), transparent 34%),
    radial-gradient(circle at 82% 88%, rgba(216, 227, 238, 0.78), transparent 38%),
    #faf9f5;
  color: #17161a;
}

.auth-gate[hidden],
.app-shell[hidden],
.auth-form[hidden] {
  display: none;
}

.auth-card {
  width: min(100%, 390px);
  padding: 36px 28px 30px;
  border: 1px solid rgba(20, 20, 19, 0.08);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 28px 80px rgba(30, 27, 38, 0.14);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.auth-logo {
  display: block;
  width: 66px;
  height: 66px;
  margin-bottom: 24px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 14px 30px rgba(24, 22, 30, 0.16);
}

.auth-kicker {
  margin: 0 0 8px;
  color: rgba(23, 22, 26, 0.5);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.auth-card h1 {
  margin: 0;
  font-size: clamp(28px, 8vw, 38px);
  line-height: 1.15;
}

.auth-hint {
  margin: 14px 0 24px;
  color: rgba(23, 22, 26, 0.62);
  font-size: 14px;
  line-height: 1.65;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-form label {
  color: rgba(23, 22, 26, 0.72);
  font-size: 13px;
  font-weight: 650;
}

.auth-form input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid rgba(20, 20, 19, 0.12);
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.86);
  color: #17161a;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-form input:focus {
  border-color: rgba(34, 31, 42, 0.42);
  box-shadow: 0 0 0 4px rgba(66, 59, 82, 0.08);
}

.auth-form button {
  min-height: 50px;
  margin-top: 4px;
  border-radius: 16px;
  background: #17161a;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(23, 22, 26, 0.18);
}

.auth-form button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.auth-status {
  min-height: 21px;
  margin: 16px 0 0;
  color: rgba(23, 22, 26, 0.62);
  font-size: 13px;
  line-height: 1.55;
}

.auth-status.error {
  color: #a33131;
}

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

button,
.tool-item,
.bubble-wrap,
.bubble,
.thinking-trigger,
.message-action-btn,
.message-select-toggle,
.circle-action,
.tool-icon-box,
.tool-label {
  -webkit-tap-highlight-color: transparent;
}

button,
.tool-item,
.bubble-wrap,
.thinking-trigger,
.message-action-btn,
.message-select-toggle,
.circle-action {
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

button {
  cursor: pointer;
  border: 0;
}

.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: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y;
}

#shader-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms ease;
  z-index: 1;
}

.panel-track {
  position: relative;
  z-index: 1;
  width: 200%;
  height: 100%;
  display: flex;
  transform: translateX(-50%);
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.panel-track.show-toolbox {
  transform: translateX(0%);
}

.panel {
  width: 50%;
  height: 100%;
}

.toolbox-panel {
  background: #faf9f5;
  color: #141413;
  padding: calc(18px + var(--safe-top)) 18px calc(18px + var(--safe-bottom));
  overflow: auto;
}

.toolbox-header {
  padding: 8px 2px 24px;
}

.toolbox-kicker,
.chat-kicker,
.sheet-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.toolbox-header h1,
.chat-title-wrap h2 {
  margin: 0;
  font-size: clamp(24px, 6vw, 32px);
  font-weight: 700;
}

.toolbox-hint {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(20, 20, 19, 0.7);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 14px;
}

.tool-item {
  background: transparent;
  color: #141413;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
  outline: none;
}

.tool-icon-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  display: grid;
  place-items: center;
  box-shadow: 0 18px 40px rgba(50, 45, 30, 0.1);
}

.tool-icon-box svg {
  width: 28px;
  height: 28px;
}

.tool-label {
  font-size: 14px;
}

.chat-panel {
  position: relative;
  padding: calc(16px + var(--safe-top)) 14px calc(18px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  background: #faf9f5;
  color: #141413;
  overflow: hidden;
}

.chat-background-photo,
.chat-background-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.chat-background-photo {
  z-index: 0;
  opacity: 0;
  background-image:
    linear-gradient(180deg, rgba(20, 24, 35, 0.12), rgba(14, 16, 23, 0.46)),
    url("https://img.cdn1.vip/i/6a2fe492e2e9d_1781523602.webp");
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: opacity 260ms ease, transform 260ms ease;
}

.chat-background-overlay {
  z-index: 0;
  opacity: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.24), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(214, 226, 255, 0.18), transparent 22%),
    linear-gradient(180deg, rgba(10, 14, 22, 0.08), rgba(7, 10, 16, 0.48));
  mix-blend-mode: screen;
  transition: opacity 260ms ease;
}

.top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 4px 12px;
  position: relative;
  z-index: 3;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logout-action {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: rgba(20, 20, 19, 0.72);
  font-size: 12px;
  font-weight: 650;
  box-shadow: 0 10px 24px rgba(20, 20, 19, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.chat-title-wrap {
  min-width: 0;
}

.chat-kicker {
  color: rgba(20, 20, 19, 0.56);
}

.chat-title-wrap h2 {
  font-size: clamp(22px, 6vw, 28px);
  color: #141413;
  text-shadow: none;
}

.circle-action {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.messages {
  flex: 1;
  overflow: auto;
  padding: 8px 4px 132px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
  z-index: 3;
  transition: transform 180ms ease;
  will-change: transform;
}

.messages::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.message-pull-indicator {
  height: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 12px;
  color: rgba(20, 20, 19, 0.56);
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  transition: height 180ms ease, opacity 180ms ease;
  position: relative;
  z-index: 3;
  pointer-events: none;
}

.message-pull-indicator.visible {
  opacity: 1;
}

.message-pull-indicator.ready,
.message-pull-indicator.loading {
  color: rgba(20, 20, 19, 0.82);
}

.chat-panel.rain-theme .message-pull-indicator,
.chat-panel.snow-theme .message-pull-indicator {
  color: rgba(246, 250, 255, 0.76);
}

.chat-panel.rain-theme .message-pull-indicator.ready,
.chat-panel.rain-theme .message-pull-indicator.loading,
.chat-panel.snow-theme .message-pull-indicator.ready,
.chat-panel.snow-theme .message-pull-indicator.loading {
  color: rgba(255, 255, 255, 0.95);
}

.bulk-select-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 4px 8px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #fff;
  color: #141413;
  box-shadow: 0 8px 24px rgba(20, 20, 19, 0.08);
  position: relative;
  z-index: 3;
}

.bulk-select-bar[hidden] {
  display: none;
}

.bulk-select-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bulk-delete-btn {
  width: auto;
  margin-top: 0;
  padding-left: 18px;
  padding-right: 18px;
}

.chat-status {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(90px + var(--safe-bottom));
  min-height: 20px;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(20, 20, 19, 0.64);
  pointer-events: none;
  z-index: 3;
}

.empty-state {
  align-self: center;
  margin: auto 12px;
  max-width: 280px;
  text-align: center;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  padding: 18px 20px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.empty-state p {
  margin: 0;
  line-height: 1.6;
}

.empty-state p + p {
  margin-top: 8px;
}

.message-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.message-row.selected .bubble {
  outline: 2px solid rgba(20, 20, 19, 0.18);
  outline-offset: 2px;
}

.message-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 2px;
  min-height: 30px;
}

.message-row.user .message-head {
  justify-content: flex-end;
}

.message-row.ai .message-head {
  justify-content: flex-start;
  padding-left: 40px;
}

.thinking-trigger {
  background: rgba(255, 255, 255, 0.14);
  color: #141413;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.message-action-menu {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(20, 20, 19, 0.08);
  box-shadow: 0 10px 24px rgba(20, 20, 19, 0.08);
}

.message-action-btn {
  min-width: 54px;
  padding: 7px 12px;
  border-radius: 999px;
  background: transparent;
  color: #141413;
  font-size: 13px;
  line-height: 1;
}

.message-action-btn:active {
  background: rgba(20, 20, 19, 0.08);
}

.message-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.message-row.user .message-main {
  justify-content: flex-end;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-position: center;
  background-size: cover;
  box-shadow: 0 4px 12px #fffbed;
  overflow: hidden;
  clip-path: circle(50%);
  -webkit-clip-path: circle(50%);
  cursor: pointer;
  touch-action: manipulation;
}

.avatar.avatar-poke-shake {
  animation: avatar-poke-shake 360ms ease-in-out;
  transform-origin: center;
}

@keyframes avatar-poke-shake {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }

  20% {
    transform: translateX(-3px) rotate(-4deg);
  }

  40% {
    transform: translateX(3px) rotate(4deg);
  }

  60% {
    transform: translateX(-2px) rotate(-3deg);
  }

  80% {
    transform: translateX(2px) rotate(3deg);
  }
}

.avatar.default-avatar::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 30%, #fff 0%, #ddd 20%, #8c8c96 100%);
}

.bubble-wrap {
  max-width: min(78vw, 420px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.message-row.user .bubble-wrap {
  align-items: flex-end;
}

.message-row.ai .bubble-wrap {
  align-items: flex-start;
}

.message-row.bulk-mode .bubble-wrap {
  padding-left: 34px;
}

.message-row.user.bulk-mode .bubble-wrap {
  padding-left: 0;
  padding-right: 34px;
}

.message-select-toggle {
  position: absolute;
  top: 12px;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(20, 20, 19, 0.16);
  background: #fff;
  color: #141413;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
}

.message-row.user.bulk-mode .message-select-toggle {
  left: auto;
  right: 0;
}

.bubble {
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(20, 20, 19, 0.06);
  box-shadow: 0 6px 16px #fffbed;
  color: #141413;
  white-space: normal;
  word-break: break-word;
  line-height: 1.72;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.markdown-body {
  max-width: 100%;
  overflow-x: auto;
}

.markdown-body > :first-child {
  margin-top: 0;
}

.markdown-body > :last-child {
  margin-bottom: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  line-height: 1.3;
  margin: 1em 0 0.5em;
}

.markdown-body h1 {
  font-size: 1.3em;
}

.markdown-body h2 {
  font-size: 1.18em;
}

.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-size: 1.06em;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote,
.markdown-body pre,
.markdown-body table,
.markdown-body hr {
  margin: 0.75em 0;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.4em;
}

.markdown-body blockquote {
  margin-left: 0;
  padding-left: 0.85em;
  border-left: 3px solid currentColor;
  opacity: 0.82;
}

.markdown-body code {
  padding: 0.12em 0.36em;
  border-radius: 5px;
  background: rgba(20, 20, 19, 0.1);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  user-select: text;
  -webkit-user-select: text;
}

.markdown-body pre {
  overflow-x: auto;
  padding: 0.8em;
  border-radius: 10px;
  background: rgba(20, 20, 19, 0.12);
  white-space: pre;
  user-select: text;
  -webkit-user-select: text;
}

.markdown-body pre code {
  display: block;
  padding: 0;
  background: transparent;
  white-space: inherit;
}

.markdown-body a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.markdown-body hr {
  border: 0;
  border-top: 1px solid currentColor;
  opacity: 0.3;
}

.markdown-body table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.markdown-body th,
.markdown-body td {
  padding: 0.38em 0.58em;
  border: 1px solid currentColor;
  text-align: left;
}

.markdown-body th {
  background: rgba(20, 20, 19, 0.1);
}

.message-row.user .bubble {
  background: #f2eee9;
}

.message-row.ai .bubble {
  background: #c2beba;
}

.time {
  font-size: 11px;
  color: #141413;
  padding: 0 6px;
}

.mcp-used-note {
  align-self: flex-start;
  max-width: 100%;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(20, 20, 19, 0.08);
  color: rgba(20, 20, 19, 0.62);
  font-size: 11px;
  line-height: 1.35;
}

.message-row.ai .time {
  color: #9b9895;
}

.message-row.user .time {
  color: #c2beba;
}

.composer {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: calc(4px + var(--safe-bottom));
  margin: 0;
  min-height: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  z-index: 4;
}

.composer textarea {
  width: 100%;
  min-height: 82px;
  max-height: 140px;
  border: 0;
  resize: none;
  outline: 0;
  background: #fff;
  border-radius: 28px;
  padding: 14px 72px 14px 16px;
  box-shadow: 0 8px 24px #fffbed;
  color: #121212;
  line-height: 1.55;
}

.composer textarea::placeholder {
  color: rgba(18, 18, 18, 0.5);
}

.send-button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.send-button:disabled {
  opacity: 0.45;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.sheet.is-open {
  pointer-events: auto;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 240ms ease;
}

.sheet-panel {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(110%);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sheet.is-open .sheet-backdrop {
  opacity: 1;
}

.sheet.is-open .sheet-panel {
  transform: translateX(-50%) translateY(0);
}

.thinking-panel {
  bottom: 0;
  width: min(92vw, 680px);
  height: 75vh;
  border-radius: 28px 28px 0 0;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  color: #fff;
  padding: 18px 18px 24px;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.35);
}

.thinking-content {
  height: calc(100% - 44px);
  overflow: auto;
  line-height: 1.78;
  white-space: pre-wrap;
  color: rgba(255, 255, 255, 0.96);
  padding-top: 4px;
}

.settings-sheet .sheet-panel {
  top: 50%;
  bottom: auto;
  width: min(92vw, 520px);
  max-height: min(84vh, 720px);
  opacity: 0;
  transform: translateX(-50%) translateY(calc(-50% + 40px));
}

.settings-sheet.is-open .sheet-panel {
  opacity: 1;
  transform: translateX(-50%) translateY(-50%);
}

.profile-panel,
.api-panel,
.mcp-panel {
  background: rgba(255, 255, 255, 0.94);
  color: #141413;
  border-radius: 30px;
  padding: 22px 18px 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  overflow: auto;
}

.memory-panel {
  background: rgba(255, 255, 255, 0.94);
  color: #141413;
  border-radius: 30px;
  padding: 22px 18px 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  overflow: auto;
}

.worldbook-panel {
  background: rgba(255, 255, 255, 0.94);
  color: #141413;
  border-radius: 30px;
  padding: 22px 18px 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  overflow: auto;
}

.theme-panel {
  background: rgba(255, 255, 255, 0.94);
  color: #141413;
  border-radius: 30px;
  padding: 22px 18px 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  overflow: auto;
}

.background-message-panel {
  background: rgba(255, 255, 255, 0.94);
  color: #141413;
  border-radius: 30px;
  padding: 22px 18px 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  overflow: auto;
}

.theme-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(20, 20, 19, 0.04);
  border: 1px solid rgba(20, 20, 19, 0.08);
}

.theme-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.theme-card-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.theme-card-head h4 {
  margin: 0;
  font-size: 16px;
}

.theme-card-head p {
  margin: 8px 0 0;
  color: rgba(20, 20, 19, 0.6);
  line-height: 1.6;
  font-size: 13px;
}

.theme-card-stack h4 {
  margin: 0;
  font-size: 16px;
}

.theme-card-stack p {
  margin: 8px 0 0;
  color: rgba(20, 20, 19, 0.6);
  line-height: 1.6;
  font-size: 13px;
}

.theme-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.theme-mode-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pelle-mood-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pelle-mood-btn {
  min-height: 48px;
  padding: 11px 8px;
  font-size: 13px;
}

.pelle-mood-btn[data-pelle-mood="rage"].active {
  background: #401010;
  border-color: #8f2626;
}

.pelle-mood-btn[data-pelle-mood="rage2"].active {
  background: #bd3029;
  border-color: #d84a3f;
}

.pelle-mood-btn[data-pelle-mood="desire"].active {
  background: #591a3d;
  border-color: #87305f;
}

.pelle-mood-btn[data-pelle-mood="vuoto"].active {
  background: #555;
  border-color: #777;
}

.pelle-mood-btn[data-pelle-mood="moonlight"].active {
  background: #172c61;
  border-color: #b9a46b;
}

.pelle-mood-status {
  margin: -2px 0 0 !important;
  color: rgba(20, 20, 19, 0.56) !important;
  font-size: 12px !important;
}

.theme-mode-btn {
  border-radius: 16px;
  padding: 14px 12px;
  background: rgba(20, 20, 19, 0.06);
  color: rgba(20, 20, 19, 0.72);
  border: 1px solid rgba(20, 20, 19, 0.08);
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.theme-mode-btn.active {
  background: #141413;
  color: #fff;
  border-color: #141413;
}

.theme-disable-btn {
  align-self: flex-start;
  margin-top: -2px;
}

.theme-bg-preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(20, 24, 35, 0.12), rgba(14, 16, 23, 0.46)),
    url("https://img.cdn1.vip/i/6a2fe492e2e9d_1781523602.webp");
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(20, 20, 19, 0.08);
  box-shadow: 0 10px 24px rgba(20, 20, 19, 0.08);
}

.theme-bg-caption {
  margin: -2px 0 0;
  font-size: 12px;
  color: rgba(20, 20, 19, 0.54);
}

.theme-display-limit-field {
  margin-bottom: 0;
}

.theme-display-limit-field input {
  max-width: 180px;
}

.memory-title {
  margin: 0;
  font-size: 24px;
}

.memory-hint {
  margin: 10px 0 0;
  line-height: 1.6;
  color: rgba(20, 20, 19, 0.68);
}

.memory-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.memory-actions-single {
  grid-template-columns: 1fr;
  margin-top: 12px;
}

.memory-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.memory-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(20, 20, 19, 0.04);
  border: 1px solid rgba(20, 20, 19, 0.08);
}

.memory-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.memory-card-head h4 {
  margin: 0;
  font-size: 16px;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.text-btn {
  background: transparent;
  color: rgba(20, 20, 19, 0.64);
  padding: 0;
}

.full-width {
  width: 100%;
}

.memory-list,
.memory-search-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.worldbook-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.memory-item-card {
  border-radius: 18px;
  border: 1px solid rgba(20, 20, 19, 0.08);
  background: #fff;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(20, 20, 19, 0.04);
}

.worldbook-item-card {
  border-radius: 18px;
  border: 1px solid rgba(20, 20, 19, 0.08);
  background: #fff;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(20, 20, 19, 0.04);
}

.worldbook-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.worldbook-item-title-wrap {
  min-width: 0;
}

.worldbook-item-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  color: #141413;
}

.worldbook-item-time {
  margin: 6px 0 0;
  font-size: 12px;
  color: rgba(20, 20, 19, 0.56);
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 14px;
  color: #141413;
}

.inline-check input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.worldbook-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 52px;
  height: 32px;
  flex: 0 0 auto;
}

.worldbook-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.worldbook-switch-slider {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(20, 20, 19, 0.16);
  transition: background 180ms ease;
}

.worldbook-switch-slider::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(20, 20, 19, 0.12);
  transition: transform 180ms ease;
}

.worldbook-switch input:checked + .worldbook-switch-slider {
  background: #141413;
}

.worldbook-switch input:checked + .worldbook-switch-slider::after {
  transform: translateX(20px);
}

.memory-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.memory-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(20, 20, 19, 0.08);
  color: #141413;
  font-size: 12px;
}

.memory-badge.fuzzy {
  background: rgba(224, 162, 48, 0.14);
  color: #a66a00;
}

.memory-badge.fresh {
  background: rgba(57, 155, 92, 0.14);
  color: #1f7b42;
}

.memory-badge.forgotten {
  background: rgba(160, 44, 44, 0.12);
  color: #8e2f2f;
}

.memory-item-content {
  line-height: 1.7;
  color: #1e1e1d;
  white-space: pre-wrap;
  word-break: break-word;
}

.memory-item-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  font-size: 12px;
  color: rgba(20, 20, 19, 0.58);
}

.memory-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.memory-item-actions button {
  flex: 1;
}

.memory-empty {
  padding: 18px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  color: rgba(20, 20, 19, 0.56);
  text-align: center;
  line-height: 1.6;
}

.memory-count {
  font-size: 13px;
  color: rgba(20, 20, 19, 0.56);
}

.sheet-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  color: #141413;
  font-size: 28px;
  padding: 0;
}

.dark-close {
  color: #fff;
}

.tab-switcher {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.tab-btn {
  padding: 12px;
  border-radius: 999px;
  background: rgba(20, 20, 19, 0.08);
  color: rgba(20, 20, 19, 0.72);
}

.tab-btn.active {
  background: #141413;
  color: #fff;
}

.profile-tab {
  display: none;
}

.profile-tab.active {
  display: block;
}

.avatar-upload {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(20, 20, 19, 0.12), rgba(20, 20, 19, 0.28));
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.upload-btn,
.secondary-btn,
.primary-save {
  border-radius: 999px;
  padding: 11px 16px;
}

.secondary-btn:disabled,
.primary-save:disabled {
  opacity: 0.45;
  cursor: default;
}

.upload-btn,
.secondary-btn {
  background: rgba(20, 20, 19, 0.1);
  color: #141413;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.field span {
  font-size: 14px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid rgba(20, 20, 19, 0.12);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 12px 14px;
  outline: 0;
  color: #141413;
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.dark-text {
  color: #141413;
}

.api-subsection {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(20, 20, 19, 0.08);
}

.api-subsection-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #141413;
}

.api-subsection-hint {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(20, 20, 19, 0.58);
}

.model-row,
.temperature-row {
  display: flex;
  gap: 10px;
}

.model-row input {
  flex: 1;
}

.temperature-row input[type="range"] {
  flex: 1;
}

.temperature-row input[type="number"] {
  width: 90px;
}

.interval-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.interval-range-sep,
.interval-range-unit {
  color: rgba(20, 20, 19, 0.68);
  font-size: 14px;
}

.heartbeat-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
  margin-top: 16px;
}

.heartbeat-gap-field {
  grid-column: 1 / -1;
}

.background-message-status-box {
  margin-top: 6px;
  border-radius: 18px;
  background: rgba(20, 20, 19, 0.05);
  border: 1px solid rgba(20, 20, 19, 0.08);
  padding: 12px 14px;
  color: rgba(20, 20, 19, 0.72);
  line-height: 1.65;
  white-space: pre-wrap;
}

.migration-security-note {
  margin: 0 0 12px;
  color: rgba(20, 20, 19, 0.58);
  font-size: 13px;
  line-height: 1.65;
}

.migration-preview-box {
  min-height: 152px;
  padding: 14px 16px;
  border: 1px solid rgba(20, 20, 19, 0.08);
  border-radius: 18px;
  background: rgba(20, 20, 19, 0.05);
  color: rgba(20, 20, 19, 0.74);
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.migration-preview-box.error {
  border-color: rgba(163, 49, 49, 0.18);
  background: rgba(163, 49, 49, 0.06);
  color: #8f2d2d;
}

.server-migration-panel .primary-save {
  margin-top: 14px;
}

.server-migration-panel .migration-commit-btn {
  background: #6f2d2d;
  box-shadow: 0 14px 30px rgba(111, 45, 45, 0.18);
}

.server-migration-panel .migration-commit-btn[hidden] {
  display: none;
}

.background-message-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.mcp-server-list,
.mcp-tool-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mcp-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.mcp-mode-switcher {
  margin-bottom: 14px;
}

.mcp-server-card,
.mcp-tool-row {
  border-radius: 18px;
  border: 1px solid rgba(20, 20, 19, 0.08);
  background: #fff;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(20, 20, 19, 0.04);
}

.mcp-server-card {
  cursor: pointer;
}

.mcp-server-head,
.mcp-tool-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mcp-server-name,
.mcp-tool-name {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: #141413;
  word-break: break-word;
}

.mcp-server-meta,
.mcp-tool-desc {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(20, 20, 19, 0.58);
  word-break: break-word;
}

.mcp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mcp-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(20, 20, 19, 0.08);
  color: #141413;
  font-size: 12px;
}

.mcp-badge.ok {
  background: rgba(57, 155, 92, 0.14);
  color: #1f7b42;
}

.mcp-badge.err {
  background: rgba(160, 44, 44, 0.12);
  color: #8e2f2f;
}

.mcp-badge.off {
  color: rgba(20, 20, 19, 0.5);
}

.mcp-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 52px;
  height: 32px;
  flex: 0 0 auto;
}

.mcp-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.mcp-switch-slider {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(20, 20, 19, 0.16);
  transition: background 180ms ease;
}

.mcp-switch-slider::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(20, 20, 19, 0.12);
  transition: transform 180ms ease;
}

.mcp-switch input:checked + .mcp-switch-slider {
  background: #141413;
}

.mcp-switch input:checked + .mcp-switch-slider::after {
  transform: translateX(20px);
}

.primary-save {
  width: 100%;
  background: #141413;
  color: #fff;
  margin-top: 6px;
}

.status-text {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(20, 20, 19, 0.64);
}

.chat-panel.rain-theme {
  background: linear-gradient(180deg, #0c121a 0%, #0c1017 100%);
  color: #eef3fb;
}

.chat-panel.snow-theme {
  background: linear-gradient(180deg, #111828 0%, #0f1522 100%);
  color: #eef4ff;
}

.chat-panel.rain-theme .chat-background-photo,
.chat-panel.rain-theme .chat-background-overlay,
.chat-panel.snow-theme .chat-background-photo,
.chat-panel.snow-theme .chat-background-overlay {
  opacity: 1;
}

.chat-panel.rain-theme #shader-canvas,
.chat-panel.snow-theme #shader-canvas {
  opacity: 1;
}

.chat-panel.rain-theme .chat-kicker,
.chat-panel.snow-theme .chat-kicker {
  color: rgba(229, 238, 252, 0.68);
}

.chat-panel.rain-theme .chat-title-wrap h2,
.chat-panel.snow-theme .chat-title-wrap h2 {
  color: #f5f8ff;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.34);
}

.chat-panel.rain-theme .circle-action,
.chat-panel.snow-theme .circle-action {
  background: rgba(255, 255, 255, 0.12);
  color: #eef3fb;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.chat-panel.rain-theme .bulk-select-bar,
.chat-panel.snow-theme .bulk-select-bar {
  background: rgba(255, 255, 255, 0.12);
  color: #eef3fb;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.chat-panel.rain-theme .secondary-btn,
.chat-panel.snow-theme .secondary-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #edf3ff;
}

.chat-panel.rain-theme .chat-status,
.chat-panel.snow-theme .chat-status {
  color: rgba(230, 238, 250, 0.78);
}

.chat-panel.rain-theme .empty-state,
.chat-panel.snow-theme .empty-state {
  color: rgba(246, 250, 255, 0.94);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.chat-panel.rain-theme .avatar,
.chat-panel.snow-theme .avatar {
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 8px 20px rgba(5, 8, 15, 0.28);
}

.chat-panel.rain-theme .thinking-trigger,
.chat-panel.snow-theme .thinking-trigger {
  background: rgba(255, 255, 255, 0.1);
  color: #edf4ff;
  border-color: rgba(255, 255, 255, 0.14);
}

.chat-panel.rain-theme .message-action-menu,
.chat-panel.snow-theme .message-action-menu {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.chat-panel.rain-theme .message-action-btn,
.chat-panel.snow-theme .message-action-btn {
  color: #eef3fb;
}

.chat-panel.rain-theme .message-action-btn:active,
.chat-panel.snow-theme .message-action-btn:active {
  background: rgba(255, 255, 255, 0.08);
}

.chat-panel.rain-theme .message-select-toggle,
.chat-panel.snow-theme .message-select-toggle {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: #f4f8ff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.chat-panel.rain-theme .bubble,
.chat-panel.snow-theme .bubble {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #eef3fb;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

.chat-panel.rain-theme .message-row.user .bubble {
  background:
    linear-gradient(180deg, rgba(222, 232, 247, 0.18), rgba(138, 160, 198, 0.18)),
    rgba(21, 30, 45, 0.44);
}

.chat-panel.rain-theme .message-row.ai .bubble {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(178, 198, 226, 0.1)),
    rgba(14, 20, 31, 0.52);
}

.chat-panel.snow-theme .message-row.user .bubble {
  background:
    linear-gradient(180deg, rgba(233, 241, 255, 0.2), rgba(176, 198, 235, 0.14)),
    rgba(18, 26, 40, 0.42);
}

.chat-panel.snow-theme .message-row.ai .bubble {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(210, 224, 247, 0.1)),
    rgba(15, 22, 34, 0.48);
}

.chat-panel.rain-theme .time,
.chat-panel.rain-theme .message-row.ai .time,
.chat-panel.rain-theme .message-row.user .time,
.chat-panel.snow-theme .time,
.chat-panel.snow-theme .message-row.ai .time,
.chat-panel.snow-theme .message-row.user .time {
  color: rgba(228, 236, 247, 0.68);
}

.chat-panel.rain-theme .mcp-used-note,
.chat-panel.snow-theme .mcp-used-note {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(237, 243, 255, 0.72);
}

.chat-panel.rain-theme .composer textarea,
.chat-panel.snow-theme .composer textarea {
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5fd;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.chat-panel.rain-theme .composer textarea::placeholder,
.chat-panel.snow-theme .composer textarea::placeholder {
  color: rgba(237, 243, 255, 0.56);
}

.chat-panel.rain-theme .send-button,
.chat-panel.snow-theme .send-button {
  background: rgba(255, 255, 255, 0.14);
  color: #f6f9ff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.chat-panel.rain-theme .logout-action,
.chat-panel.snow-theme .logout-action {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.11);
  color: rgba(244, 248, 255, 0.8);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

@media (min-width: 768px) {
  .chat-panel {
    padding-left: 20px;
    padding-right: 20px;
  }

  .messages {
    padding-left: 6px;
    padding-right: 10px;
  }

  .chat-status {
    left: 20px;
    right: 20px;
  }

  .composer {
    max-width: 820px;
    width: calc(100% - 40px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .memory-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/*
 * Pelle d'Umore host adapter.
 * Original skin: Cu & Lunedì (cunedi.uk), CC BY 4.0.
 * Maps the library's theme tokens to this project's fixed-color chat UI.
 */
body[data-mood] .chat-panel {
  background: var(--bg);
  color: var(--text);
  transition: background 0.8s ease, color 0.5s ease;
}

body[data-mood] .chat-background-photo {
  opacity: 1 !important;
}

body[data-mood] .chat-background-overlay,
body[data-mood] #shader-canvas {
  opacity: 0 !important;
}

body[data-mood] .chat-kicker,
body[data-mood] .chat-status,
body[data-mood] .message-pull-indicator {
  color: var(--text-dim);
}

body[data-mood] .chat-title-wrap h2 {
  color: var(--text-strong);
  text-shadow: var(--glow-shadow, none);
}

body[data-mood] .message-row.ai .bubble {
  position: relative;
  background: var(--chat-panel-bg);
  border-color: var(--chat-panel-border);
  color: var(--text);
  box-shadow: var(--glow-shadow, 0 8px 24px rgba(0, 0, 0, 0.18));
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

body[data-mood] .message-row.user .bubble {
  background: var(--chat-me-bg);
  border-color: var(--chat-me-border);
  color: var(--chat-me-text);
  box-shadow: var(--glow-shadow, 0 8px 24px rgba(0, 0, 0, 0.18));
}

body[data-mood] .time,
body[data-mood] .message-row.ai .time,
body[data-mood] .message-row.user .time,
body[data-mood] .mcp-used-note {
  color: var(--text-dim);
}

body[data-mood] .thinking-trigger,
body[data-mood] .message-action-menu,
body[data-mood] .logout-action,
body[data-mood] .circle-action,
body[data-mood] .composer textarea {
  border: 1px solid var(--border-soft);
  background: var(--glass-surface);
  color: var(--text);
  box-shadow: var(--glow-shadow, 0 12px 28px rgba(0, 0, 0, 0.18));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body[data-mood] .message-action-btn,
body[data-mood] .composer textarea::placeholder {
  color: var(--text-mute);
}

body[data-mood] .send-button {
  border: 1px solid var(--accent-line);
  background: var(--accent);
  color: var(--accent-on, #fff);
  box-shadow: var(--glow-shadow, 0 12px 28px rgba(0, 0, 0, 0.2));
}

body[data-mood] .empty-state {
  border-color: var(--border-soft);
  background: var(--glass-surface);
  color: var(--text);
}

body[data-mood] .markdown-body code,
body[data-mood] .markdown-body pre {
  background: var(--surface);
}

body[data-mood="vuoto"] #shader-canvas,
body[data-mood="vuoto"] .chat-background-photo {
  animation: none;
}

