:root {
  color-scheme: dark;
  --page: #0d0e17;
  --sidebar: #10111a;
  --surface: #151722;
  --surface-strong: #1b1e2c;
  --surface-hover: #202334;
  --line: rgba(235, 233, 255, .075);
  --text: #f1f0fa;
  --muted: #898ba0;
  --muted-soft: #65687d;
  --violet: #a894ff;
  --mint: #82e1c2;
  --serif: Georgia, "Times New Roman", serif;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background: var(--page);
  color: var(--text);
  font-size: 13px;
}

button, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid rgba(168, 148, 255, .8);
  outline-offset: 3px;
}
button:disabled { cursor: not-allowed; opacity: .48; }
[hidden] { display: none !important; }

.ambient {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(1px);
}
.ambient-one {
  top: -410px;
  right: -260px;
  width: 820px;
  height: 760px;
  background: radial-gradient(ellipse, rgba(89, 73, 173, .12), transparent 68%);
  animation: ambient-drift 19s ease-in-out infinite alternate;
}
.ambient-two {
  bottom: -450px;
  left: 18%;
  width: 750px;
  height: 620px;
  background: radial-gradient(ellipse, rgba(44, 104, 123, .09), transparent 68%);
  animation: ambient-drift 22s ease-in-out infinite alternate-reverse;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  height: 100dvh;
  min-height: 500px;
  grid-template-columns: 262px minmax(0, 1fr);
}

.sidebar {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 22px 15px 13px;
  border-right: 1px solid var(--line);
  background: rgba(16, 17, 26, .93);
  backdrop-filter: blur(22px);
}

.brand {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  margin: 0 0 28px 4px;
  color: inherit;
  text-decoration: none;
}
.brand-symbol {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.19);
  border-radius: 11px;
  background: linear-gradient(145deg, #a896ff, #705ed8 62%, #5ca9bd);
  box-shadow: 0 3px 20px rgba(139, 111, 240, .27), inset 0 1px 0 rgba(255,255,255,.22);
  color: #fff;
  font-size: 18px;
}
.brand-name { font-size: 18px; font-weight: 720; letter-spacing: -.055em; }
.brand-period { color: var(--violet); }
.brand-edition {
  align-self: flex-start;
  margin: 2px 0 0 1px;
  color: #77778e;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .13em;
}

.new-chat-button {
  display: flex;
  height: 42px;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid rgba(235, 233, 255, .09);
  border-radius: 11px;
  background: linear-gradient(120deg, rgba(34, 36, 54, .9), rgba(27, 29, 43, .9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
  cursor: pointer;
  font-size: 12px;
  text-align: left;
  transition: border-color .2s, background .2s, transform .2s;
}
.new-chat-button:hover { transform: translateY(-1px); border-color: rgba(168,148,255,.3); background: #222437; }
.button-plus { color: #b7aaff; font-size: 19px; font-weight: 300; }
.shortcut {
  margin-left: auto;
  color: #67697e;
  font-size: 9px;
}

.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 5px 9px;
  color: #77798d;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .12em;
}
.session-count { color: #626477; font-size: 10px; font-variant-numeric: tabular-nums; }
.session-list { display: grid; gap: 3px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #363747 transparent; }
.session-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 9px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #a5a6b8;
  cursor: pointer;
  font-size: 11px;
  text-align: left;
  transition: background .16s, color .16s;
}
.session-item:hover { background: rgba(255,255,255,.045); color: #e5e3ef; }
.session-item.is-active { border-color: rgba(255,255,255,.045); background: #1c1e2a; color: #efedf7; }
.session-item-icon { flex: 0 0 14px; color: #8884a9; font-size: 12px; }
.session-item-title { overflow: hidden; flex: 1; text-overflow: ellipsis; white-space: nowrap; }
.session-delete {
  flex: 0 0 21px;
  padding: 1px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #737589;
  cursor: pointer;
  font-size: 14px;
  opacity: 0;
}
.session-item:hover .session-delete, .session-delete:focus-visible { opacity: 1; }
.session-delete:hover { background: rgba(239, 117, 129, .12); color: #ff9ea9; }
.empty-sessions { margin: 2px 6px; color: #696b7e; font-size: 10px; line-height: 1.65; }

.sidebar-bottom { margin-top: auto; }
.privacy-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 3px 12px;
  padding: 10px 9px;
  border: 1px solid rgba(130, 225, 194, .09);
  border-radius: 10px;
  background: rgba(60, 127, 112, .065);
}
.privacy-icon { color: #76c9ae; font-size: 16px; }
.privacy-note strong, .privacy-note small { display: block; }
.privacy-note strong { color: #b7dfd1; font-size: 9px; font-weight: 620; }
.privacy-note small { margin-top: 3px; color: #7e9f95; font-size: 8px; }
.settings-link {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 8px 7px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.settings-link:hover { background: rgba(255,255,255,.045); }
.settings-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(174,157,255,.2);
  border-radius: 10px;
  background: linear-gradient(145deg, #34304e, #25273a);
  color: #d3c9ff;
  font-size: 12px;
  font-weight: 700;
}
.settings-account { color: #d5d4e0; font-size: 10px; font-weight: 580; }
.settings-account small { display: block; margin-top: 2px; color: #7c7e91; font-size: 9px; font-weight: 400; }
.settings-dots { margin-left: auto; color: #85869a; letter-spacing: 1px; }

.main-panel { display: flex; min-width: 0; min-height: 0; flex-direction: column; }
.topbar {
  display: flex;
  min-height: 61px;
  flex: 0 0 61px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 29px;
  border-bottom: 1px solid rgba(235,233,255,.055);
  background: rgba(14,15,24,.38);
  backdrop-filter: blur(18px);
}
.breadcrumb { display: flex; min-width: 0; align-items: center; gap: 9px; color: #898a9e; font-size: 11px; }
.breadcrumb-slash { color: #4f5060; }
.breadcrumb strong { overflow: hidden; max-width: min(36vw, 330px); color: #e7e5ef; font-size: 11px; font-weight: 570; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.connection-indicator { display: flex; align-items: center; gap: 7px; color: #8e90a3; font-size: 9px; white-space: nowrap; }
.indicator-dot, .planner-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e5aa79;
  box-shadow: 0 0 9px rgba(229,170,121,.38);
}
.connection-indicator.is-connected .indicator-dot { background: var(--mint); box-shadow: 0 0 9px rgba(130,225,194,.5); }
.connection-indicator.is-connected { color: #b4d9ce; }
.topbar-button {
  display: flex;
  height: 32px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(168,148,255,.23);
  border-radius: 9px;
  background: rgba(132,111,228,.1);
  color: #d6ceff;
  cursor: pointer;
  font-size: 10px;
  transition: background .18s, border-color .18s;
}
.topbar-button:hover { border-color: rgba(168,148,255,.45); background: rgba(132,111,228,.18); }
.plug-icon { font-size: 15px; transform: rotate(90deg); }

.connection-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 17px auto 0;
  padding: 11px 40px 11px 12px;
  border: 1px solid rgba(168,148,255,.14);
  border-radius: 11px;
  background: linear-gradient(110deg, rgba(96,76,164,.12), rgba(36,67,81,.1));
  animation: slide-down .48s cubic-bezier(.16,1,.3,1) both;
  width: min(850px, calc(100% - 58px));
}
.banner-icon {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  border: 1px solid rgba(185,166,255,.19);
  border-radius: 9px;
  background: rgba(154,133,255,.1);
  color: #bdadff;
  font-size: 15px;
}
.banner-copy { display: grid; min-width: 0; gap: 3px; }
.banner-copy strong { color: #e5e0ff; font-size: 10px; font-weight: 630; }
.banner-copy span { color: #aaa5c1; font-size: 9px; line-height: 1.45; }
.banner-button {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 7px 9px;
  border: 1px solid rgba(177,159,255,.18);
  border-radius: 8px;
  background: rgba(160,139,255,.1);
  color: #ddd5ff;
  cursor: pointer;
  font-size: 9px;
  transition: background .18s;
}
.banner-button:hover { background: rgba(160,139,255,.2); }
.banner-dismiss {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #87839e;
  cursor: pointer;
  font-size: 16px;
}
.banner-dismiss:hover { background: rgba(255,255,255,.08); color: #fff; }

.conversation { display: flex; min-height: 0; flex: 1; justify-content: center; overflow: hidden; }
.chat-log {
  display: flex;
  width: min(850px, calc(100% - 58px));
  min-height: 0;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
  padding: 28px 0 30px;
  scrollbar-color: #303142 transparent;
  scrollbar-width: thin;
}

.welcome-screen {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 0 23px;
  animation: appear .7s ease both;
}
.welcome-orbit {
  position: relative;
  display: grid;
  width: 73px;
  height: 73px;
  place-items: center;
  margin: 0 0 23px;
}
.welcome-orbit::before, .welcome-orbit::after {
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(175,157,255,.2);
  border-radius: 28px;
  content: "";
  transform: rotate(29deg);
  animation: orbit 18s linear infinite;
}
.welcome-orbit::after {
  inset: 8px 0;
  border-color: rgba(102,202,190,.18);
  border-radius: 50%;
  transform: rotate(-35deg);
  animation-duration: 22s;
  animation-direction: reverse;
}
.welcome-glyph {
  position: relative;
  z-index: 1;
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 17px;
  background: linear-gradient(145deg, #a290ff, #705fd1 65%, #498f9c);
  box-shadow: 0 9px 32px rgba(125,103,230,.24), inset 0 1px 0 rgba(255,255,255,.24);
  color: white;
  font-size: 24px;
}
.welcome-eyebrow { color: #9c92c6; font-size: 9px; font-weight: 700; letter-spacing: .21em; text-transform: uppercase; }
.welcome-screen h1 {
  margin: 11px 0 9px;
  font-family: var(--serif);
  font-size: clamp(29px, 3.8vw, 42px);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: 1.13;
  text-align: center;
}
.welcome-screen h1 span { color: #b6a7ff; font-style: italic; }
.welcome-description { max-width: 360px; color: #9293a7; font-size: 11px; line-height: 1.75; text-align: center; }
.suggestions-label { align-self: flex-start; margin: 29px 0 9px 2px; color: #727487; font-size: 9px; font-weight: 650; letter-spacing: .12em; }
.suggestions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.suggestion {
  display: flex;
  min-height: 57px;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(235,233,255,.075);
  border-radius: 11px;
  background: rgba(25,27,40,.72);
  color: #cac9d6;
  cursor: pointer;
  font-size: 10px;
  line-height: 1.5;
  text-align: left;
  transition: transform .2s, background .2s, border-color .2s;
}
.suggestion:hover { transform: translateY(-2px); border-color: rgba(167,149,255,.25); background: #202235; }
.suggestion-icon {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  border-radius: 9px;
  background: rgba(154,134,243,.12);
  color: #b7a6ff;
  font-size: 13px;
}
.suggestion:nth-child(2) .suggestion-icon { background: rgba(77,179,161,.11); color: #81d8c4; }
.suggestion:nth-child(3) .suggestion-icon { background: rgba(224,167,119,.1); color: #e6b487; }
.suggestion:nth-child(4) .suggestion-icon { background: rgba(122,156,229,.12); color: #9ab8ef; }

.message-row { display: flex; gap: 10px; animation: message-in .3s ease both; }
.message-row.user { justify-content: flex-end; }
.message-avatar {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border: 1px solid rgba(174,157,255,.16);
  border-radius: 9px;
  background: #242237;
  color: #c7b9ff;
  font-size: 13px;
}
.message-column { min-width: 0; max-width: min(89%, 700px); }
.message-row.user .message-column { max-width: min(80%, 620px); }
.message-meta { display: flex; align-items: center; gap: 7px; margin: 2px 0 6px; color: #c7bfed; font-size: 9px; font-weight: 630; }
.message-time { color: #67697b; font-size: 8px; font-weight: 400; }
.message-bubble {
  padding: 11px 13px;
  border: 1px solid rgba(235,233,255,.07);
  border-radius: 4px 12px 12px 12px;
  background: rgba(25,27,39,.84);
  color: #dedde8;
  font-size: 11px;
  line-height: 1.72;
  overflow-wrap: anywhere;
}
.message-row.user .message-bubble { border-color: rgba(165,147,255,.13); border-radius: 12px 4px 12px 12px; background: rgba(105,88,174,.15); color: #f1eff9; }
.message-bubble p { margin: 0 0 9px; }
.message-bubble p:last-child { margin-bottom: 0; }
.message-bubble ul, .message-bubble ol { margin: 5px 0 10px; padding-left: 20px; }
.message-bubble li + li { margin-top: 3px; }
.message-bubble h1, .message-bubble h2, .message-bubble h3 { margin: 12px 0 7px; color: #f1eefe; font-family: inherit; font-size: 12px; }
.message-bubble strong { color: #f2eaff; font-weight: 650; }
.message-bubble code {
  padding: 2px 4px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 4px;
  background: rgba(9,10,16,.55);
  color: #d0c3ff;
  font: 10px ui-monospace, SFMono-Regular, Consolas, monospace;
}
.message-bubble pre { overflow-x: auto; margin: 9px 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #0e0f17; }
.message-bubble pre code { padding: 0; border: 0; background: none; color: #dad7ea; line-height: 1.6; }
.message-row.user .message-meta { justify-content: flex-end; color: #cfc5ff; }
.message-row.user .message-meta .message-time { order: 2; }

.thinking-row { display: flex; align-items: center; gap: 9px; color: #a9a2c6; font-size: 10px; animation: appear .24s ease both; }
.thinking-glyph {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(174,157,255,.16);
  border-radius: 9px;
  background: #211e31;
  color: #c0afff;
  animation: soft-pulse 1.5s ease-in-out infinite;
}
.thinking-dots { display: inline-flex; gap: 3px; margin-left: 2px; }
.thinking-dots i { width: 3px; height: 3px; border-radius: 50%; background: #b09fff; animation: dot-bounce .85s ease-in-out infinite; }
.thinking-dots i:nth-child(2) { animation-delay: .13s; }
.thinking-dots i:nth-child(3) { animation-delay: .26s; }
.status-row { align-self: center; padding: 4px 8px; border-radius: 20px; background: rgba(255,255,255,.035); color: #88899c; font-size: 9px; animation: appear .2s ease both; }
.status-row.error { color: #ffaaa9; }

.composer-area { width: min(850px, calc(100% - 58px)); flex: 0 0 auto; align-self: center; padding: 5px 0 12px; }
.context-panel { margin-bottom: 8px; border: 1px solid transparent; border-radius: 10px; }
.context-panel[open] { border-color: rgba(235,233,255,.08); background: rgba(23,25,37,.64); }
.context-panel summary { display: flex; width: fit-content; align-items: center; gap: 7px; padding: 5px 7px; border-radius: 8px; color: #a5a2b8; cursor: pointer; font-size: 9px; list-style: none; }
.context-panel summary::-webkit-details-marker { display: none; }
.context-panel summary:hover { background: rgba(255,255,255,.04); color: #ded9f3; }
.context-sparkle { color: #b19dff; font-size: 13px; }
.context-optional { color: #6f7184; }
.context-chevron { margin-left: 2px; transition: transform .16s; }
.context-panel[open] .context-chevron { transform: rotate(180deg); }
.context-editor { display: grid; gap: 7px; padding: 0 9px 9px; }
.context-editor label { color: #8f91a5; font-size: 9px; }
.context-editor textarea {
  width: 100%;
  min-height: 55px;
  resize: vertical;
  padding: 8px 9px;
  border: 1px solid rgba(235,233,255,.08);
  border-radius: 8px;
  outline: none;
  background: rgba(9,10,16,.55);
  color: #e4e1ee;
  font-size: 10px;
  line-height: 1.55;
}
.context-editor textarea:focus { border-color: rgba(168,148,255,.36); }
.context-editor textarea::placeholder { color: #686a7c; }
.context-editor > span { justify-self: end; color: #696b7e; font-size: 8px; }
.composer {
  padding: 10px 10px 8px 13px;
  border: 1px solid rgba(231,228,255,.105);
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(26,28,42,.96), rgba(20,21,32,.98));
  box-shadow: 0 12px 45px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.025);
  transition: border-color .2s, box-shadow .2s;
}
.composer:focus-within { border-color: rgba(170,151,255,.34); box-shadow: 0 12px 48px rgba(0,0,0,.23), 0 0 0 3px rgba(133,111,220,.065); }
.composer textarea {
  display: block;
  width: 100%;
  max-height: 180px;
  min-height: 34px;
  resize: none;
  overflow: auto;
  padding: 5px 2px 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f0eef8;
  font-size: 11px;
  line-height: 1.6;
}
.composer textarea::placeholder { color: #77798e; }
.composer-toolbar { display: flex; min-height: 28px; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid rgba(235,233,255,.055); padding-top: 7px; }
.composer-hints, .composer-actions { display: flex; min-width: 0; align-items: center; gap: 12px; }
.planner-chip { display: flex; align-items: center; gap: 6px; color: #aaa5c2; font-size: 8px; white-space: nowrap; }
.planner-chip-dot { width: 5px; height: 5px; background: #aa96ff; box-shadow: 0 0 7px rgba(170,150,255,.45); }
.keyboard-hint { color: #717387; font-size: 8px; white-space: nowrap; }
kbd { margin-left: 3px; padding: 1px 4px; border: 1px solid rgba(255,255,255,.11); border-radius: 4px; color: #9293a5; font: inherit; }
.message-counter { color: #65677a; font-size: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.send-button {
  display: flex;
  min-width: 67px;
  height: 28px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 7px 0 10px;
  border: 1px solid rgba(193,178,255,.16);
  border-radius: 8px;
  background: linear-gradient(110deg, #9478ef, #6d79d6);
  color: #fff;
  cursor: pointer;
  font-size: 9px;
  font-weight: 650;
  transition: filter .16s, transform .16s;
}
.send-button:not(:disabled):hover { filter: brightness(1.13); transform: translateY(-1px); }
.send-arrow { display: grid; width: 17px; height: 17px; place-items: center; border-radius: 5px; background: rgba(255,255,255,.17); font-size: 12px; line-height: 1; }
.disclaimer { margin: 8px 0 0; color: #66687b; font-size: 8px; line-height: 1.45; text-align: center; }

.modal-backdrop {
  position: fixed;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5,6,12,.72);
  backdrop-filter: blur(8px);
  animation: appear .18s ease both;
}
.modal-card {
  width: min(490px, 100%);
  max-height: min(750px, 90dvh);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid rgba(231,228,255,.115);
  border-radius: 17px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(114,95,193,.12), transparent 48%),
    #171925;
  box-shadow: 0 25px 100px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.035);
  animation: modal-in .3s cubic-bezier(.16,1,.3,1) both;
}
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-eyebrow { color: #a699df; font-size: 8px; font-weight: 750; letter-spacing: .17em; }
.modal-heading h2 { margin: 7px 0 4px; font-family: var(--serif); font-size: 25px; font-weight: 400; letter-spacing: -.04em; }
.modal-heading p { color: #9293a6; font-size: 10px; line-height: 1.55; }
.modal-close { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; background: rgba(255,255,255,.035); color: #aaaabd; cursor: pointer; font-size: 17px; }
.modal-close:hover { background: rgba(255,255,255,.1); color: #fff; }
.modal-steps { display: grid; grid-template-columns: 21px 1fr; align-items: center; gap: 7px 9px; margin: 18px 0; padding: 11px; border: 1px solid rgba(235,233,255,.06); border-radius: 10px; background: rgba(255,255,255,.022); color: #afb0c1; font-size: 9px; }
.step-number { display: grid; width: 19px; height: 19px; place-items: center; border-radius: 6px; background: rgba(151,131,243,.13); color: #c0b3ff; font-size: 9px; }
.modal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: #85879a; font-size: 9px; }
.refresh-button { padding: 6px 8px; border: 1px solid rgba(235,233,255,.08); border-radius: 7px; background: rgba(255,255,255,.035); color: #c6c3d6; cursor: pointer; font-size: 9px; }
.refresh-button:hover { background: rgba(255,255,255,.08); }
.available-tabs { display: grid; gap: 7px; }
.tab-card {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) 120px auto;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid rgba(235,233,255,.075);
  border-radius: 10px;
  background: rgba(11,12,19,.4);
}
.tab-logo { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid rgba(255,255,255,.07); border-radius: 10px; background: #242438; color: #d0c4ff; font-size: 12px; font-weight: 700; }
.tab-card:nth-child(2n) .tab-logo { background: #1d2b2c; color: #91ddc7; }
.tab-copy { min-width: 0; }
.tab-copy strong { display: block; overflow: hidden; color: #e0dfeb; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.tab-copy small { display: block; margin-top: 3px; color: #77798e; font-size: 8px; }
.role-select { width: 100%; min-width: 0; padding: 7px 5px; border: 1px solid rgba(235,233,255,.075); border-radius: 7px; background: #1b1d2a; color: #cac8d8; font-size: 9px; }
.tab-connect { padding: 7px 8px; border: 1px solid rgba(163,145,255,.2); border-radius: 7px; background: rgba(148,124,241,.12); color: #ddd5ff; cursor: pointer; font-size: 9px; white-space: nowrap; }
.tab-connect:hover { background: rgba(148,124,241,.22); }
.tab-connect.is-connected { border-color: rgba(130,225,194,.15); background: rgba(86,177,150,.09); color: #9bdbc7; }
.tab-connect:disabled { cursor: wait; opacity: .6; }
.no-chat-tabs { padding: 17px 8px; color: #9698aa; font-size: 10px; line-height: 1.7; text-align: center; }
.role-legend { display: grid; gap: 4px; margin-top: 14px; padding-top: 11px; border-top: 1px solid rgba(235,233,255,.06); color: #828397; font-size: 8px; }
.modal-error { margin: 10px 0 0; padding: 8px 9px; border: 1px solid rgba(255,128,140,.13); border-radius: 8px; background: rgba(145,52,71,.1); color: #ffabad; font-size: 9px; line-height: 1.55; }
.settings-content { margin-top: 19px; }
.privacy-card { display: flex; gap: 10px; padding: 12px; border: 1px solid rgba(130,225,194,.12); border-radius: 10px; background: rgba(66,136,117,.07); color: #89d3bc; }
.privacy-card > span { font-size: 17px; }
.privacy-card strong { color: #b6e4d4; font-size: 10px; }
.privacy-card p { margin-top: 5px; color: #92aaa1; font-size: 9px; line-height: 1.65; }
.setup-list { display: grid; gap: 10px; margin: 17px 0; padding-left: 22px; color: #b8b8c8; font-size: 10px; line-height: 1.6; }
.setup-list strong { color: #e4ddff; font-weight: 600; }
.copy-origin-button { padding: 8px 10px; border: 1px solid rgba(168,148,255,.2); border-radius: 8px; background: rgba(148,124,241,.1); color: #d8d0ff; cursor: pointer; font-size: 9px; }
.copy-origin-button:hover { background: rgba(148,124,241,.18); }
.settings-feedback { display: inline-block; margin-left: 9px; color: #a6d9c8; font-size: 9px; }
.toast { position: fixed; z-index: 9; right: 21px; bottom: 20px; max-width: min(390px, calc(100% - 36px)); padding: 10px 13px; border: 1px solid rgba(235,233,255,.1); border-radius: 10px; background: #222433; box-shadow: 0 10px 35px rgba(0,0,0,.32); color: #ece9fa; font-size: 10px; line-height: 1.5; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { border-color: rgba(255,128,140,.22); color: #ffbdc1; }

@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-down { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes message-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes orbit { to { transform: rotate(389deg); } }
@keyframes ambient-drift { to { transform: translate3d(-17px, 13px, 0) scale(1.04); } }
@keyframes soft-pulse { 50% { box-shadow: 0 0 16px rgba(174,157,255,.14); } }
@keyframes dot-bounce { 50% { opacity: .38; transform: translateY(-3px); } }

@media (min-width: 1400px) {
  .app-shell { grid-template-columns: 278px minmax(0, 1fr); }
  .sidebar { padding-right: 17px; padding-left: 17px; }
}

@media (max-width: 760px) {
  body { overflow: auto; }
  .app-shell { min-height: 100dvh; height: auto; min-height: 0; grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-panel { min-height: 100dvh; }
  .topbar { min-height: 55px; flex-basis: 55px; padding: 0 14px; }
  .connection-indicator { font-size: 0; }
  .indicator-dot { width: 7px; height: 7px; }
  .topbar-actions { gap: 10px; }
  .topbar-button { padding: 0 8px; }
  .connection-banner, .chat-log, .composer-area { width: calc(100% - 28px); }
  .connection-banner { gap: 8px; margin-top: 11px; padding-left: 9px; }
  .banner-icon { width: 25px; height: 25px; flex-basis: 25px; }
  .banner-copy span { font-size: 8px; }
  .banner-button { padding: 6px 7px; font-size: 8px; }
  .banner-dismiss { top: 3px; right: 3px; }
  .conversation { min-height: 46vh; }
  .chat-log { min-height: 46vh; padding-top: 18px; }
  .welcome-screen { min-height: 46vh; }
  .welcome-screen h1 { font-size: 31px; }
  .suggestions { grid-template-columns: 1fr; }
  .suggestion { min-height: 46px; }
  .composer-area { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .keyboard-hint { display: none; }
  .modal-card { padding: 17px; }
  .tab-card { grid-template-columns: 31px minmax(0,1fr) auto; gap: 7px; }
  .tab-card .role-select { grid-column: 2 / 4; grid-row: 2; }
  .tab-card .tab-connect { grid-column: 3; grid-row: 1; }
  .tab-logo { width: 28px; height: 28px; }
}

@media (max-width: 410px) {
  .breadcrumb { gap: 6px; font-size: 9px; }
  .breadcrumb strong { max-width: 27vw; font-size: 9px; }
  .topbar-button { gap: 4px; font-size: 9px; }
  .banner-icon { display: none; }
  .banner-copy strong { font-size: 9px; }
  .banner-button { margin-left: 2px; }
  .planner-chip { font-size: 7px; }
  .message-counter { display: none; }
  .composer-hints { gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
