/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  color-scheme: dark;
  --bg: #212121;
  --sidebar: #181818;
  --panel: #2f2f2f;
  --line: #3e3e3e;
  --fg: #ececec;
  --muted: #b4b4b4;
  --ok: #6ee7a8;
  --warn: #f0c674;
  --user: #2f6feb;
  --lab-bubble: #303030;
  --radius: 1.75rem;
  --sidebar-w: 260px;
  --composer-max: 48rem;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
}
.app {
  height: 100%;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
}
.sidebar {
  background: var(--sidebar);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
  overflow: auto;
}
.new-chat {
  width: 100%;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.new-chat:hover { background: #222; }
.new-chat:disabled { opacity: 0.4; cursor: not-allowed; }
.thread {
  border-radius: 0.75rem;
  background: #212121;
}
.thread > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  color: var(--fg);
  font-size: 0.9rem;
}
.thread > summary::-webkit-details-marker { display: none; }
.thread[open] { background: #2a2a2a; }
.thread-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.app.is-live .thread-dot { background: var(--ok); }
.chat-title {
  flex: 1 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pill, .badge {
  margin: 0;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #111;
  color: var(--muted);
  flex-shrink: 0;
}
.pill[data-state="listening"], .pill[data-state="idle"] { color: var(--ok); border-color: #2e5a44; }
.pill[data-state="thinking"] { color: var(--warn); border-color: #5c4a22; }
.pill[data-state="speaking"] { color: #9db8ff; border-color: #35508a; }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.lab {
  margin: 0 0.45rem 0.55rem;
  border-top: 1px solid var(--line);
  padding: 0.2rem 0.2rem 0.55rem;
}
.lab > summary {
  cursor: pointer;
  padding: 0.4rem 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.lab-actions { align-items: center; }
.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.ghost:disabled { opacity: 0.4; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.82rem; color: var(--muted); }
dl {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  grid-gap: 0.25rem 0.5rem;
  gap: 0.25rem 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
}
dd { margin: 0; overflow-wrap: anywhere; word-break: break-all; color: var(--fg); }
.log {
  background: #111;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.55rem;
  min-height: 6rem;
  max-height: 12rem;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 0.72rem;
}
.stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.stage-main {
  flex: 1 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem;
  scrollbar-width: thin;
  scrollbar-color: #5a5a5a transparent;
}
.stage-main::-webkit-scrollbar { width: 3px; }
.stage-main::-webkit-scrollbar-thumb {
  background: #5a5a5a;
  border-radius: 999px;
}
.chat {
  min-height: 100%;
  padding: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: min(100%, var(--composer-max));
}
.empty {
  margin: auto;
  max-width: 22rem;
  text-align: center;
  color: var(--muted);
  font-size: 1.35rem;
  font-weight: 500;
}
.chat:has(.msg) .empty,
.chat:has(.draft:not([hidden])) .empty { display: none; }
.chat:has(.msg)::before,
.chat:has(.draft:not([hidden]))::before {
  content: "";
  flex: 1 1 auto;
}
.bubble {
  max-width: 82%;
  padding: 0.75rem 1rem;
  border-radius: 1.25rem;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}
.bubble.user {
  align-self: flex-end;
  background: var(--user);
  color: #fff;
  border-bottom-right-radius: 0.35rem;
}
.bubble.lab {
  align-self: flex-start;
  background: var(--lab-bubble);
  border-bottom-left-radius: 0.35rem;
}
.bubble.system {
  align-self: center;
  max-width: 92%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.65rem;
  padding: 0.5rem 0.9rem;
  background: #3a321c;
  border: 1px solid #5c4a22;
  color: #f5dfae;
  font-size: 0.85rem;
  text-align: center;
}
.msg-text { white-space: pre-wrap; }
.inline-code {
  font: 0.86em/1.4 ui-monospace, "Cascadia Code", Consolas, monospace;
  background: #1c1c1c;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  padding: 0.05rem 0.3rem;
}
.code-block {
  margin: 0.6rem 0;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
  background: #171717;
  white-space: normal;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3rem 0.4rem 0.3rem 0.8rem;
  background: #262626;
  color: var(--muted);
  font-size: 0.74rem;
}
.code-block pre {
  margin: 0;
  padding: 0.75rem 0.9rem;
  overflow-x: auto;
  white-space: pre;
  font: 0.84rem/1.5 ui-monospace, "Cascadia Code", Consolas, monospace;
}
.sources {
  margin: 0.65rem 0 0;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
  white-space: normal;
}
.sources-title { margin: 0 0 0.3rem; font-weight: 600; }
.sources ul { margin: 0; padding: 0; list-style: none; }
.sources li + li { margin-top: 0.25rem; }
.sources a {
  color: #9ec1ff;
  text-decoration: none;
}
.sources a:hover { text-decoration: underline; }
.src-meta { margin-left: 0.4rem; opacity: 0.75; }
.src-meta::before { content: "· "; }
.link-btn {
  margin-top: 0.3rem;
  padding: 0;
  background: none;
  border: 0;
  color: #9ec1ff;
  font: inherit;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.msg-foot {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  white-space: normal;
}
.msg-actions { display: inline-flex; gap: 0.25rem; margin-left: auto; }
.chip {
  font-size: 0.7rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #1c1c1c;
}
.chip[data-tone="ok"] { color: var(--ok); border-color: #2e5a44; }
.chip[data-tone="warn"] { color: var(--warn); border-color: #5c4a22; }
.mini-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 0.5rem;
  padding: 0.15rem 0.5rem;
  font: inherit;
  font-size: 0.74rem;
  cursor: pointer;
}
.mini-btn:hover:not(:disabled) { color: var(--fg); border-color: var(--line); background: #2a2a2a; }
.mini-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.bubble.system .mini-btn { color: #f5dfae; border-color: #5c4a22; }
.bubble.pending {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.6rem;
  color: var(--muted);
}
.elapsed { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; opacity: 0.8; }
.pending-note { flex-basis: 100%; font-size: 0.74rem; opacity: 0.8; }
.dots { display: inline-flex; gap: 0.22rem; }
.dots i {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--muted);
  animation: dot 1.2s ease-in-out infinite;
}
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-0.18rem); }
}
@media (prefers-reduced-motion: reduce) {
  .dots i { animation: none; opacity: 0.7; }
}
.bubble.streaming { opacity: 0.78; font-style: italic; }
.chat-end {
  flex: 0 0 auto;
  height: calc(var(--composer-h, 6.5rem) + 0.5rem);
}
.composer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  width: 100%;
  padding: 0.6rem 1rem 0.85rem;
  background: linear-gradient(180deg, transparent, var(--bg) 36%);
  display: flex;
  justify-content: center;
}
.composer-shell { width: min(100%, var(--composer-max)); }
.composer-box {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  background: var(--panel);
  border: 1px solid #444;
  border-radius: var(--radius);
  padding: 0.7rem 0.7rem 0.7rem 1.05rem;
  box-shadow: 0 0 0 1px #0002, 0 8px 24px #0004;
}
.prompt {
  flex: 1 1;
  min-height: 1.5rem;
  max-height: 12.5rem;
  resize: none;
  overflow-y: auto;
  background: transparent;
  color: var(--fg);
  border: 0;
  padding: 0.35rem 0;
  font: inherit;
  line-height: 1.5;
  field-sizing: content;
}
.prompt:focus { outline: none; }
.prompt:disabled { opacity: 0.55; }
.composer-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
}
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.icon-btn:hover { background: #3d3d3d; color: var(--fg); }
.icon-btn:has(:checked) { color: var(--warn); background: #3a321c; }
.send {
  width: 2.15rem;
  height: 2.15rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.send:disabled { opacity: 0.28; cursor: not-allowed; }
.send .icon-stop { display: none; }
.send.is-stop {
  opacity: 1;
  pointer-events: auto;
}
.send.is-stop .icon-send { display: none; }
.send.is-stop .icon-stop { display: block; }
.composer-box:has(.prompt:placeholder-shown) .send:not(.is-stop) {
  opacity: 0.28;
  pointer-events: none;
}
.hint {
  margin: 0.45rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
}
@media (max-width: 800px) {
  body { overflow: auto; }
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .sidebar {
    width: 100%;
    max-height: 36vh;
    border-bottom: 1px solid var(--line);
  }
  .bubble { max-width: 92%; }
  .empty { font-size: 1.1rem; }
}

