:root {
  color-scheme: light;
  --bg: #fbf7f3;
  --bg-deep: #f5eee8;
  --surface: #fffdfb;
  --surface-strong: #ffffff;
  --ink: #2d2629;
  --ink-soft: #574d51;
  --muted: #908488;
  --faint: #b5aaad;
  --line: #eee5df;
  --line-strong: #e5d8d1;
  --accent: #ef6f79;
  --accent-deep: #d95061;
  --accent-soft: #fff0ee;
  --peach: #f8c5ae;
  --butter: #f7e4a9;
  --sage: #c9d9c2;
  --sage-deep: #63745d;
  --shadow-sm: 0 3px 14px rgba(82, 57, 48, 0.05);
  --shadow-md: 0 14px 40px rgba(82, 57, 48, 0.08);
  --shadow-lg: 0 28px 70px rgba(82, 57, 48, 0.14);
  --radius-lg: 28px;
  --radius-md: 20px;
  --font: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 74% 18%, rgba(255, 225, 213, 0.72), transparent 34%),
    radial-gradient(circle at 12% 86%, rgba(238, 216, 203, 0.45), transparent 31%),
    var(--bg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
textarea,
input {
  font: inherit;
}

button {
  color: inherit;
}

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

button:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(239, 111, 121, 0.22);
  outline-offset: 2px;
}

svg {
  display: block;
}

::selection {
  color: #fff;
  background: rgba(217, 80, 97, 0.72);
}

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

::-webkit-scrollbar-thumb {
  border-radius: 20px;
  background: rgba(141, 125, 125, 0.22);
}

::-webkit-scrollbar-track {
  background: transparent;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-one {
  top: -130px;
  right: 5%;
  width: 360px;
  height: 360px;
  background: rgba(255, 228, 218, 0.45);
}

.ambient-two {
  bottom: -180px;
  left: 20%;
  width: 420px;
  height: 420px;
  background: rgba(247, 222, 204, 0.24);
}

.app-shell {
  display: flex;
  height: 100dvh;
  min-height: 560px;
}

.sidebar {
  position: relative;
  z-index: 20;
  display: flex;
  flex: 0 0 278px;
  flex-direction: column;
  width: 278px;
  padding: 26px 18px 18px;
  border-right: 1px solid rgba(225, 213, 206, 0.72);
  background: rgba(247, 241, 235, 0.76);
  backdrop-filter: blur(24px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
}

.brand-mark {
  display: grid;
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, #f58a8d, #e75869);
  box-shadow: 0 9px 22px rgba(218, 82, 96, 0.24);
  transform: rotate(-4deg);
}

.brand-mark svg {
  width: 27px;
  height: 27px;
}

.brand-name {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1.05;
}

.brand-tagline {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.sidebar-close {
  display: none !important;
  margin-left: auto;
}

.new-chat-button {
  display: flex;
  align-items: center;
  width: 100%;
  height: 51px;
  margin-top: 29px;
  padding: 0 10px 0 12px;
  border: 0;
  border-radius: 16px;
  color: #fffaf7;
  background: #32292c;
  box-shadow: 0 10px 26px rgba(48, 37, 40, 0.16);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.new-chat-button:hover {
  background: #433639;
  box-shadow: 0 13px 30px rgba(48, 37, 40, 0.2);
  transform: translateY(-1px);
}

.new-chat-button:active {
  transform: translateY(0) scale(0.99);
}

.new-chat-icon {
  display: grid;
  width: 27px;
  height: 27px;
  margin-right: 10px;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
}

.new-chat-icon svg {
  width: 16px;
}

.new-chat-button > span:nth-child(2) {
  font-size: 13px;
  font-weight: 620;
  letter-spacing: 0.04em;
}

.shortcut {
  display: grid;
  width: 23px;
  height: 23px;
  margin-left: auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
}

.history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 31px 10px 12px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.13em;
}

.history-count {
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  color: #a08d8e;
  background: rgba(255, 255, 255, 0.5);
  font-size: 9px;
  letter-spacing: 0;
}

.history-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  padding: 1px 2px 14px;
}

.history-empty {
  padding: 24px 12px;
  color: #ac9fa1;
  font-size: 11.5px;
  line-height: 1.8;
  text-align: center;
}

.history-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 54px;
  border-radius: 14px;
  transition: background 160ms ease;
}

.history-item:hover,
.history-item.active {
  background: rgba(255, 253, 251, 0.86);
}

.history-item.active {
  box-shadow: var(--shadow-sm);
}

.history-open {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 10px 39px 10px 11px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.history-icon {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: #bf8a88;
  background: rgba(255, 244, 241, 0.85);
  font-size: 13px;
}

.history-item.active .history-icon {
  color: #fff;
  background: linear-gradient(140deg, #f28a8b, #e96773);
}

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

.history-title {
  display: block;
  overflow: hidden;
  color: #54484c;
  font-size: 13px;
  font-weight: 570;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-time {
  display: block;
  margin-top: 3px;
  color: #b1a4a6;
  font-size: 10px;
}

.history-delete {
  position: absolute;
  right: 7px;
  display: grid;
  width: 27px;
  height: 27px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #b7a8aa;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  transition: opacity 160ms ease, color 160ms ease, background 160ms ease;
}

.history-item:hover .history-delete,
.history-delete:focus-visible {
  opacity: 1;
}

.history-delete:hover {
  color: var(--accent-deep);
  background: #fff0ef;
}

.history-delete svg {
  width: 14px;
}

.sidebar-bottom {
  flex: 0 0 auto;
  padding-top: 14px;
  border-top: 1px solid rgba(226, 214, 207, 0.65);
}

.connection-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 9px;
  border-radius: 13px;
}

.connection-dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #d6c9c6;
  box-shadow: 0 0 0 4px rgba(214, 201, 198, 0.15);
}

.connection-dot.online {
  background: #7fa478;
  box-shadow: 0 0 0 4px rgba(127, 164, 120, 0.14);
}

.connection-dot.warning {
  background: #e6ad5c;
  box-shadow: 0 0 0 4px rgba(230, 173, 92, 0.14);
}

.connection-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.connection-copy strong {
  color: #5a4e52;
  font-size: 10.5px;
  font-weight: 620;
}

.connection-copy span {
  margin-top: 2px;
  color: #a79a9c;
  font-size: 9px;
}

.connection-settings {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: #a99b9e;
  background: transparent;
  cursor: pointer;
}

.connection-settings:hover {
  color: var(--accent-deep);
  background: rgba(255, 255, 255, 0.6);
}

.connection-settings svg {
  width: 17px;
}

.sidebar-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 9px 0;
  color: #ae9fa1;
  font-size: 8.5px;
  letter-spacing: 0.02em;
}

.sidebar-note svg {
  width: 12px;
}

.main-panel {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.topbar {
  display: flex;
  flex: 0 0 77px;
  align-items: center;
  justify-content: space-between;
  height: 77px;
  padding: 0 34px;
  border-bottom: 1px solid rgba(233, 223, 217, 0.58);
  background: rgba(251, 247, 243, 0.62);
  backdrop-filter: blur(18px);
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
}

.topbar-left {
  gap: 12px;
}

.topbar-actions {
  gap: 13px;
}

.menu-button {
  display: none !important;
}

.conversation-title {
  max-width: min(50vw, 430px);
  overflow: hidden;
  color: #3c3235;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-state {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: #9c8f92;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.tiny-heart {
  color: #e2747b;
  font-size: 8px;
}

.model-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid #e9ded8;
  border-radius: 999px;
  color: #8c7d81;
  background: rgba(255, 253, 251, 0.66);
  font-size: 10px;
  font-weight: 570;
  letter-spacing: 0.04em;
}

.model-pill span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #81a47b;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #827479;
  background: transparent;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.icon-button:hover {
  color: #4f4247;
  border-color: #ede3dd;
  background: rgba(255, 255, 255, 0.64);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.empty-state {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  width: min(820px, calc(100% - 48px));
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(42px, 7vh, 78px) 0 28px;
  text-align: center;
  animation: fade-up 650ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.hero-decor {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid rgba(231, 217, 208, 0.8);
  border-radius: 999px;
  color: #a09093;
  background: rgba(255, 252, 249, 0.68);
  box-shadow: 0 8px 20px rgba(82, 57, 48, 0.03);
  font-size: 8.5px;
  letter-spacing: 0.02em;
  animation: float 5s ease-in-out infinite;
}

.hero-decor-left {
  top: 21%;
  left: 0;
}

.hero-decor-right {
  top: 35%;
  right: 0;
  animation-delay: -2.4s;
}

.decor-heart {
  color: #e97c82;
  font-size: 9px;
}

.decor-spark {
  color: #d9a353;
  font-size: 10px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 27px;
  padding: 0 12px;
  border: 1px solid rgba(240, 215, 206, 0.9);
  border-radius: 999px;
  color: #bc7b78;
  background: rgba(255, 246, 241, 0.72);
  font-size: 8px;
  font-weight: 680;
  letter-spacing: 0.18em;
}

.eyebrow span {
  color: #e2747b;
  font-size: 9px;
}

.empty-state h1 {
  margin: 23px 0 0;
  color: #32282b;
  font-size: clamp(44px, 5.3vw, 68px);
  font-weight: 680;
  letter-spacing: -0.065em;
  line-height: 1.15;
}

.empty-state h1 em {
  position: relative;
  color: var(--accent-deep);
  font-style: normal;
}

.empty-state h1 em::after {
  position: absolute;
  right: 3%;
  bottom: -8px;
  left: 1%;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(239, 111, 121, 0.34), transparent 72%);
  content: "";
  transform: rotate(-1.5deg);
}

.hero-copy {
  margin: 24px 0 0;
  color: #8f8185;
  font-size: 14px;
  letter-spacing: 0.01em;
  line-height: 1.9;
}

.examples {
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 100%;
  margin-top: 34px;
}

.examples-label {
  color: #ad9fa1;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.example-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.example-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 37px;
  padding: 0 14px;
  border: 1px solid rgba(235, 224, 217, 0.9);
  border-radius: 999px;
  color: #75666a;
  background: rgba(255, 253, 250, 0.72);
  box-shadow: var(--shadow-sm);
  font-size: 11.5px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.example-chip:hover {
  border-color: rgba(239, 111, 121, 0.3);
  background: #fffdfb;
  box-shadow: 0 8px 22px rgba(94, 64, 55, 0.07);
  transform: translateY(-2px);
}

.example-chip span {
  font-size: 14px;
}

.welcome-note {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 490px;
  margin-top: 36px;
  padding: 10px 15px 10px 10px;
  border: 1px solid rgba(237, 225, 218, 0.7);
  border-radius: 16px;
  color: #9d8f92;
  background: rgba(255, 253, 250, 0.52);
  text-align: left;
}

.welcome-note p {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.7;
}

.welcome-avatar {
  display: grid;
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, #f49191, #e86570);
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(219, 87, 99, 0.2);
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 31px;
  width: min(860px, calc(100% - 48px));
  margin: 0 auto;
  padding: 38px 0 18px;
}

.scroll-spacer {
  height: 18px;
}

.message {
  animation: message-in 430ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.message-user {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  padding-left: 12%;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 7px 7px;
  color: #b1a4a6;
  font-size: 8.5px;
  letter-spacing: 0.08em;
}

.message-meta::before {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e7979c;
  content: "";
}

.user-bubble {
  max-width: 640px;
  padding: 16px 21px;
  border-radius: 24px 24px 7px 24px;
  color: #fff;
  background: linear-gradient(140deg, #f17e85, #e65d6c);
  box-shadow: 0 13px 32px rgba(211, 78, 92, 0.18);
  font-size: 14px;
  letter-spacing: 0.01em;
  line-height: 1.75;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-assistant {
  width: 100%;
}

.assistant-heading {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 12px;
}

.assistant-avatar {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin-right: 9px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #f49191, #e86570);
  box-shadow: 0 6px 17px rgba(219, 87, 99, 0.18);
  font-size: 10.5px;
  font-weight: 700;
}

.assistant-name {
  display: flex;
  flex-direction: column;
}

.assistant-name strong {
  color: #4b3e42;
  font-size: 12px;
  font-weight: 680;
}

.assistant-name span {
  margin-top: 2px;
  color: #aa9c9f;
  font-size: 9.5px;
  letter-spacing: 0.025em;
}

.assistant-actions {
  display: flex;
  gap: 5px;
  margin-left: auto;
}

.assistant-action {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 29px;
  padding: 0 10px;
  border: 1px solid rgba(234, 222, 216, 0.85);
  border-radius: 9px;
  color: #998b8f;
  background: rgba(255, 253, 251, 0.56);
  font-size: 9.5px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.assistant-action:hover {
  color: #625357;
  border-color: #e6d7d1;
  background: #fffdfb;
}

.assistant-action svg {
  width: 12px;
  height: 12px;
}

.assistant-body {
  padding-left: 41px;
}

.thinking-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 112px;
  padding: 23px 25px;
  border: 1px solid rgba(235, 223, 216, 0.88);
  border-radius: 24px;
  background: rgba(255, 253, 251, 0.82);
  box-shadow: var(--shadow-sm);
}

.thinking-visual {
  position: relative;
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(145deg, #fff2ed, #ffe1e1);
}

.thinking-visual::before,
.thinking-visual::after {
  position: absolute;
  border: 1px solid rgba(230, 114, 122, 0.18);
  border-radius: 50%;
  content: "";
  animation: pulse-ring 2s ease-out infinite;
}

.thinking-visual::before {
  width: 33px;
  height: 33px;
}

.thinking-visual::after {
  width: 43px;
  height: 43px;
  animation-delay: -1s;
}

.thinking-orb {
  z-index: 1;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f68b8f, #e35969);
  box-shadow: 0 0 15px rgba(231, 102, 114, 0.4);
  animation: orb-breathe 1.6s ease-in-out infinite;
}

.thinking-copy {
  flex: 1;
  min-width: 0;
}

.thinking-copy strong {
  display: block;
  color: #54464a;
  font-size: 12.5px;
  font-weight: 650;
}

.thinking-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: #a09295;
  font-size: 10.5px;
}

.thinking-status-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e47c82;
  animation: blink 1.2s ease-in-out infinite;
}

.thinking-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 23px;
}

.thinking-bars span {
  width: 2.5px;
  height: 7px;
  border-radius: 4px;
  background: #ebb4b1;
  animation: sound-bar 1.1s ease-in-out infinite;
}

.thinking-bars span:nth-child(2) {
  animation-delay: -0.18s;
}

.thinking-bars span:nth-child(3) {
  animation-delay: -0.36s;
}

.thinking-bars span:nth-child(4) {
  animation-delay: -0.54s;
}

.thinking-bars span:nth-child(5) {
  animation-delay: -0.72s;
}

.report-card {
  position: relative;
  overflow: hidden;
  padding: 26px 28px 24px;
  border: 1px solid rgba(232, 219, 212, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 251, 0.9);
  box-shadow: var(--shadow-md);
}

.report-card::before {
  position: absolute;
  top: -90px;
  right: -60px;
  width: 230px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 231, 221, 0.64), transparent 68%);
  content: "";
  pointer-events: none;
}

.report-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 19px;
  border-bottom: 1px solid #f0e7e1;
}

.section-kicker {
  display: block;
  margin-bottom: 5px;
  color: #c09491;
  font-size: 8px;
  font-weight: 720;
  letter-spacing: 0.19em;
}

.report-top h2 {
  margin: 0;
  color: #3d3135;
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.report-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid #f2d8d2;
  border-radius: 999px;
  color: #ca7779;
  background: #fff6f2;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.report-badge span {
  color: #e06c75;
  font-size: 8px;
}

.emotion-primary {
  position: relative;
  padding: 19px 0 18px;
}

.field-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #a39295;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
}

.field-eyebrow::before {
  width: 15px;
  height: 1px;
  background: #e9b4b1;
  content: "";
}

.emotion-primary p {
  margin: 8px 0 0;
  color: #3e3236;
  font-size: 16.5px;
  font-weight: 580;
  letter-spacing: -0.01em;
  line-height: 1.7;
}

.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.insight-tile {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-height: 100px;
  padding: 16px 17px;
  border-radius: 16px;
}

.insight-tile.need {
  border: 1px solid #ecdfc3;
  background: #fffaf0;
}

.insight-tile.warning {
  border: 1px solid #f0d9d4;
  background: #fff6f3;
}

.tile-icon {
  display: grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 9px;
  font-size: 12px;
}

.need .tile-icon {
  background: #f9edcc;
}

.warning .tile-icon {
  background: #f8e1dc;
}

.insight-tile-label {
  color: #a69388;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.insight-tile p {
  margin: 5px 0 0;
  color: #625457;
  font-size: 12px;
  line-height: 1.7;
}

.reply-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 27px 2px 14px;
}

.reply-heading h3 {
  margin: 0;
  color: #44373b;
  font-size: 15.5px;
  font-weight: 660;
  letter-spacing: -0.015em;
}

.reply-heading > span {
  color: #aa9c9f;
  font-size: 9.5px;
}

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

.reply-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 216px;
  overflow: hidden;
  padding: 17px 16px 13px;
  border: 1px solid #eddfd8;
  border-radius: 20px;
  background: #fffaf8;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.reply-card:hover {
  border-color: #e8d2ca;
  box-shadow: 0 15px 32px rgba(99, 66, 55, 0.08);
  transform: translateY(-3px);
}

.reply-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--card-accent);
  content: "";
}

.reply-card.sweet {
  --card-accent: #e98684;
  --card-icon-bg: #fff0ed;
  background: linear-gradient(160deg, #fffaf8 0%, #fffdfb 64%);
}

.reply-card.humor {
  --card-accent: #ddb45f;
  --card-icon-bg: #fff7dc;
  border-color: #eee4cc;
  background: linear-gradient(160deg, #fffdf7 0%, #fffefb 64%);
}

.reply-card.eq {
  --card-accent: #92ab88;
  --card-icon-bg: #f1f6ec;
  border-color: #e2e9dc;
  background: linear-gradient(160deg, #fbfdf9 0%, #fffefb 64%);
}

.reply-card-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.reply-emoji {
  display: grid;
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 10px;
  background: var(--card-icon-bg);
  font-size: 13px;
}

.reply-style {
  display: block;
  color: #55464a;
  font-size: 11.5px;
  font-weight: 680;
}

.reply-tagline {
  display: block;
  margin-top: 2px;
  color: #af9fa2;
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.reply-text {
  flex: 1;
  margin: 17px 0 16px;
  color: #55474b;
  font-size: 13px;
  letter-spacing: 0.005em;
  line-height: 1.9;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.reply-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 33px;
  padding: 0 10px;
  border: 1px solid rgba(231, 218, 211, 0.9);
  border-radius: 9px;
  color: #9f9094;
  background: rgba(255, 255, 255, 0.64);
  font-size: 9.5px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.reply-copy:hover {
  color: var(--accent-deep);
  border-color: #edcfc9;
  background: #fff;
}

.reply-copy svg {
  width: 12px;
  height: 12px;
}

.advice-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 14px;
  padding: 15px 17px;
  border: 1px dashed #e5d8cf;
  border-radius: 16px;
  background: rgba(255, 251, 246, 0.66);
}

.advice-icon {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: #fff4ce;
  font-size: 12px;
}

.advice-card strong {
  display: block;
  color: #847173;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.advice-card p {
  margin: 4px 0 0;
  color: #756568;
  font-size: 12px;
  line-height: 1.7;
}

.report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 16px;
}

.report-action {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid #eaded7;
  border-radius: 9px;
  color: #98898d;
  background: transparent;
  font-size: 9.5px;
  cursor: pointer;
}

.report-action:hover {
  color: #5e5054;
  background: #fff9f5;
}

.report-action svg {
  width: 12px;
  height: 12px;
}

.error-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 18px 19px;
  border: 1px solid #f0d4ce;
  border-radius: 18px;
  background: #fff7f4;
}

.error-icon {
  display: grid;
  flex: 0 0 33px;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 11px;
  color: #d76464;
  background: #ffe6e0;
  font-size: 15px;
  font-weight: 700;
}

.error-copy {
  flex: 1;
  min-width: 0;
}

.error-copy strong {
  display: block;
  color: #734c4d;
  font-size: 12px;
  font-weight: 650;
}

.error-copy p {
  margin: 4px 0 0;
  color: #9c7b7c;
  font-size: 10.5px;
  line-height: 1.7;
}

.error-actions {
  display: flex;
  gap: 6px;
}

.error-retry,
.error-settings {
  height: 29px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 9.5px;
  cursor: pointer;
}

.error-retry {
  border: 0;
  color: #fff;
  background: #db7473;
}

.error-settings {
  border: 1px solid #eccfc9;
  color: #ac6d6d;
  background: transparent;
}

.plain-response {
  padding: 22px 24px;
  border: 1px solid #eaded7;
  border-radius: 22px;
  color: #594a4e;
  background: #fffdfb;
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.composer-section {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  padding: 10px 34px 18px;
  background: linear-gradient(to bottom, rgba(251, 247, 243, 0), rgba(251, 247, 243, 0.94) 25%, #fbf7f3 54%);
}

.composer {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 12px 12px 9px 18px;
  border: 1px solid rgba(228, 214, 207, 0.95);
  border-radius: 23px;
  background: rgba(255, 253, 251, 0.96);
  box-shadow: 0 17px 45px rgba(82, 57, 48, 0.09), 0 2px 4px rgba(82, 57, 48, 0.03);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.composer:focus-within {
  border-color: rgba(235, 151, 151, 0.8);
  box-shadow: 0 20px 52px rgba(115, 65, 56, 0.12), 0 0 0 4px rgba(239, 111, 121, 0.06);
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 38px;
  max-height: 160px;
  padding: 6px 5px 3px 0;
  overflow-y: auto;
  border: 0;
  outline: 0;
  color: #403438;
  background: transparent;
  font-size: 14px;
  line-height: 1.7;
  resize: none;
}

.composer textarea::placeholder {
  color: #b2a5a7;
}

.composer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 37px;
  padding-left: 1px;
}

.composer-hint {
  color: #b7abad;
  font-size: 9px;
  letter-spacing: 0.03em;
}

.send-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #f38188, #e45b6a);
  box-shadow: 0 8px 19px rgba(211, 75, 90, 0.24);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.send-button:hover:not(:disabled) {
  box-shadow: 0 10px 23px rgba(211, 75, 90, 0.32);
  transform: translateY(-1px) rotate(-2deg);
}

.send-button:active:not(:disabled) {
  transform: scale(0.96);
}

.send-button:disabled {
  cursor: default;
  opacity: 0.48;
}

.send-button svg {
  width: 19px;
  height: 19px;
}

.send-button.loading svg {
  animation: send-pulse 900ms ease-in-out infinite;
}

.privacy-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 10px 0 0;
  color: #b6aaac;
  font-size: 8px;
  letter-spacing: 0.03em;
}

.privacy-heart {
  color: #e4a0a2;
  font-size: 7px;
}

.settings-dialog {
  width: min(500px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 27px;
  color: var(--ink);
  background: transparent;
}

.settings-dialog::backdrop {
  background: rgba(47, 37, 41, 0.34);
  backdrop-filter: blur(6px);
  animation: backdrop-in 220ms ease both;
}

.settings-dialog[open] .settings-panel {
  animation: dialog-in 300ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.settings-panel {
  max-height: calc(100dvh - 32px);
  padding: 28px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 27px;
  background:
    radial-gradient(circle at 92% 2%, rgba(255, 225, 213, 0.72), transparent 30%),
    #fffdfb;
  box-shadow: var(--shadow-lg);
}

.settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.settings-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #c28784;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.settings-header h2 {
  margin: 0;
  color: #3e3236;
  font-size: 23px;
  font-weight: 680;
  letter-spacing: -0.04em;
}

.settings-intro {
  margin: 11px 0 21px;
  color: #918286;
  font-size: 10.5px;
  line-height: 1.75;
}

.server-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 21px;
  padding: 12px 13px;
  border: 1px solid #dfe9d9;
  border-radius: 14px;
  background: #f6faf3;
}

.server-status.not-configured {
  border-color: #efe3cc;
  background: #fffbf2;
}

.status-icon {
  display: grid;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 9px;
  color: #66805f;
  background: #e5f0df;
  font-size: 11px;
  font-weight: 700;
}

.server-status.not-configured .status-icon {
  color: #a27c3c;
  background: #f7e8c3;
}

.server-status div {
  display: flex;
  flex-direction: column;
}

.server-status strong {
  color: #5e7058;
  font-size: 10px;
  font-weight: 650;
}

.server-status.not-configured strong {
  color: #8d713e;
}

.server-status span:last-child {
  margin-top: 2px;
  color: #93a18d;
  font-size: 8.5px;
}

.server-status.not-configured span:last-child {
  color: #ab9369;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: #6c5c61;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.key-input-wrap {
  display: flex;
  align-items: center;
  height: 45px;
  padding: 0 11px 0 14px;
  border: 1px solid #e8dbd4;
  border-radius: 13px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.key-input-wrap:focus-within {
  border-color: #eda4a4;
  box-shadow: 0 0 0 3px rgba(239, 111, 121, 0.07);
}

.key-input-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #514347;
  background: transparent;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.key-input-wrap input::placeholder {
  color: #c0b4b5;
}

.key-visibility {
  height: 27px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  color: #ab8e8e;
  background: #fff4f1;
  font-size: 8.5px;
  cursor: pointer;
}

.field-help {
  margin: 7px 1px 20px;
  color: #aa9c9f;
  font-size: 8.5px;
  line-height: 1.65;
}

.model-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 15px;
  border: 1px solid #eee3dd;
  border-radius: 14px;
  background: #fdf9f6;
}

.model-row .field-label {
  margin-bottom: 3px;
  color: #9d8e92;
  font-size: 8px;
}

.model-row strong {
  color: #57494d;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 10.5px;
  font-weight: 600;
}

.ready-badge {
  height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  color: #718265;
  background: #eaf1e4;
  font-size: 8px;
  line-height: 25px;
}

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 23px;
}

.text-button {
  padding: 0;
  border: 0;
  color: #ad8d8f;
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.text-button:hover {
  color: var(--accent-deep);
}

.save-button {
  height: 40px;
  padding: 0 21px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #362b2e;
  box-shadow: 0 9px 22px rgba(48, 37, 40, 0.17);
  font-size: 10px;
  font-weight: 620;
  cursor: pointer;
}

.save-button:hover {
  background: #493a3e;
}

.toast {
  position: fixed;
  bottom: 114px;
  left: 50%;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 12px;
  color: #fff;
  background: rgba(51, 41, 44, 0.92);
  box-shadow: 0 13px 35px rgba(44, 33, 36, 0.2);
  font-size: 10px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(10px);
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast-icon {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 6px;
  color: #704f4f;
  background: #f7d9d5;
  font-size: 9px;
  font-weight: 700;
}

.mobile-scrim {
  position: fixed;
  z-index: 19;
  background: rgba(45, 34, 38, 0.28);
  inset: 0;
  backdrop-filter: blur(3px);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-6px) rotate(1deg);
  }
}

@keyframes pulse-ring {
  0% {
    opacity: 0.8;
    transform: scale(0.7);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

@keyframes orb-breathe {
  0%,
  100% {
    transform: scale(0.9);
  }
  50% {
    transform: scale(1.13);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

@keyframes sound-bar {
  0%,
  100% {
    height: 5px;
    opacity: 0.5;
  }
  50% {
    height: 19px;
    opacity: 1;
  }
}

@keyframes send-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: translateX(0);
  }
  50% {
    opacity: 1;
    transform: translateX(4px);
  }
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1080px) {
  .sidebar {
    flex-basis: 252px;
    width: 252px;
  }

  .hero-decor {
    display: none;
  }

  .reply-grid {
    grid-template-columns: 1fr;
  }

  .reply-card {
    min-height: 0;
  }

  .reply-text {
    margin: 13px 0 12px;
  }

  .reply-card-top {
    margin-bottom: 1px;
  }
}

@media (max-width: 820px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    border-right: 1px solid #e7dcd5;
    box-shadow: 20px 0 50px rgba(58, 42, 36, 0.12);
    transform: translateX(-105%);
    transition: transform 260ms cubic-bezier(0.2, 0.75, 0.25, 1);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close,
  .menu-button {
    display: grid !important;
  }

  .topbar {
    padding: 0 19px;
  }

  .composer-section {
    padding: 10px 19px 15px;
  }

  .messages {
    width: calc(100% - 36px);
    padding-top: 27px;
  }

  .empty-state {
    width: calc(100% - 36px);
  }

  .assistant-body {
    padding-left: 0;
  }

  .assistant-heading {
    padding-left: 2px;
  }
}

@media (max-width: 600px) {
  .app-shell {
    min-height: 480px;
  }

  .topbar {
    flex-basis: 65px;
    height: 65px;
    padding: 0 14px;
  }

  .model-pill {
    display: none;
  }

  .conversation-title {
    max-width: 54vw;
    font-size: 12px;
  }

  .chat-scroll {
    scroll-behavior: auto;
  }

  .empty-state {
    justify-content: center;
    width: calc(100% - 32px);
    padding: 24px 0 22px;
  }

  .empty-state h1 {
    margin-top: 18px;
    font-size: clamp(39px, 12.5vw, 52px);
    line-height: 1.18;
  }

  .hero-copy {
    margin-top: 17px;
    font-size: 11.5px;
  }

  .desktop-break {
    display: none;
  }

  .examples {
    margin-top: 24px;
  }

  .example-chips {
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: calc(100% + 32px);
    margin-right: -16px;
    margin-left: -16px;
    padding: 0 16px 7px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .example-chips::-webkit-scrollbar {
    display: none;
  }

  .example-chip {
    flex: 0 0 auto;
  }

  .welcome-note {
    display: none;
  }

  .messages {
    gap: 26px;
    width: calc(100% - 28px);
    padding-top: 21px;
  }

  .message-user {
    padding-left: 9%;
  }

  .user-bubble {
    padding: 13px 17px;
    border-radius: 20px 20px 6px 20px;
    font-size: 12.5px;
  }

  .assistant-name span {
    display: none;
  }

  .assistant-action span {
    display: none;
  }

  .assistant-action {
    width: 29px;
    padding: 0;
    justify-content: center;
  }

  .report-card {
    padding: 21px 18px 19px;
    border-radius: 23px;
  }

  .report-top h2 {
    font-size: 15px;
  }

  .report-badge {
    height: 23px;
    padding: 0 8px;
    font-size: 7px;
  }

  .emotion-primary {
    padding: 16px 0;
  }

  .emotion-primary p {
    font-size: 13px;
  }

  .insight-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .insight-tile {
    min-height: 0;
    padding: 12px 13px;
  }

  .reply-heading {
    margin-top: 23px;
  }

  .reply-heading h3 {
    font-size: 13px;
  }

  .reply-card {
    padding: 15px 14px 11px;
    border-radius: 18px;
  }

  .reply-text {
    font-size: 11.5px;
  }

  .assistant-heading {
    margin-bottom: 9px;
  }

  .thinking-card {
    gap: 13px;
    min-height: 97px;
    padding: 18px;
  }

  .thinking-visual {
    flex-basis: 43px;
    width: 43px;
    height: 43px;
    border-radius: 14px;
  }

  .thinking-bars {
    display: none;
  }

  .composer-section {
    padding: 8px 12px 10px;
  }

  .composer {
    padding: 10px 9px 7px 14px;
    border-radius: 20px;
  }

  .composer textarea {
    font-size: 12px;
  }

  .composer-hint {
    display: none;
  }

  .composer-bottom {
    justify-content: flex-end;
  }

  .send-button {
    width: 39px;
    height: 39px;
    border-radius: 12px;
  }

  .privacy-line {
    display: none;
  }

  .settings-panel {
    padding: 23px 18px;
    border-radius: 23px;
  }

  .settings-header h2 {
    font-size: 20px;
  }

  .toast {
    bottom: 93px;
  }
}

@media (max-height: 720px) and (min-width: 821px) {
  .empty-state {
    padding-top: 27px;
  }

  .empty-state h1 {
    margin-top: 16px;
    font-size: clamp(40px, 5vw, 57px);
  }

  .hero-copy {
    margin-top: 16px;
  }

  .examples {
    margin-top: 22px;
  }

  .welcome-note {
    margin-top: 22px;
  }
}

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