:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --ink: #1c2430;
  --muted: #5c6b7a;
  --line: #d7dee7;
  --accent: #1f6feb;
  --refuse: #9a3412;
  --ok: #0f766e;
  --shadow: 0 10px 30px rgba(28, 36, 48, 0.08);
  font-family: "IBM Plex Sans", "PingFang SC", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
body.aics-page {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 10% -10%, #dbeafe 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #e2e8f0 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.aics-shell {
  max-width: 760px;
  margin: 24px auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 48px);
}

.aics-header {
  padding: 20px 22px 12px;
  border-bottom: 1px solid var(--line);
}
.aics-header h1 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.aics-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.aics-messages {
  flex: 1;
  overflow: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aics-bubble {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  font-size: 0.95rem;
}
.aics-bubble.user {
  align-self: flex-end;
  background: #e8f1ff;
  border: 1px solid #c7dbff;
}
.aics-bubble.bot {
  align-self: flex-start;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.aics-bubble.refuse {
  border-color: #fdba74;
  background: #fff7ed;
  color: var(--refuse);
}
.aics-sources {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 0.82rem;
  color: var(--ok);
}
.aics-sources a { color: var(--accent); }

.aics-composer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--line);
  align-items: end;
}
.aics-composer textarea {
  resize: vertical;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
.aics-composer button {
  border: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  font: inherit;
  cursor: pointer;
}
.aics-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  background: #fff;
}
.aics-file input { display: none; }

.aics-preview {
  padding: 0 14px 14px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* floating launcher host page styles live in aics-widget.js inline */
