:root {
  --bg: #0b1018;
  --panel: #101623;
  --panel-border: #20283a;
  --text: #f9fafb;
  --muted: #7c879a;
  --user: #34242b;
  --bot: #242833;
  --accent: #ff5c5c;
}
* { box-sizing: border-box; }
:root {
  --bg: #0b1018;
  --panel: #101623;
  --panel-border: #20283a;
  --text: #f9fafb;
  --muted: #7c879a;
  --user: #34242b;
  --bot: #242833;
  --accent: #ff5c5c;
}
* { box-sizing: border-box; }
html, body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.app {
  width: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--panel-border);
}
.topbar h1 { margin: 0; font-size: 1.1rem; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.panel {
  margin: 10px 24px;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: var(--panel);
  display: grid;
  gap: 10px;
}
.panel label { display: grid; gap: 5px; font-size: .86rem; color: var(--muted); }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}
textarea:focus, input:focus, select:focus { border-color: var(--accent); }
.check { grid-template-columns: auto 1fr; align-items: center; display: grid; gap: 8px; }
.messages {
  min-height: 0;
  width: 100%;
  padding: 16px 24px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 18px;
  white-space: pre-wrap;
  line-height: 1.35;
}
.msg.user { align-self: flex-end; background: var(--user); }
.msg.bot { align-self: flex-start; background: var(--bot); }
.msg small { display: block; color: var(--muted); margin-top: 6px; font-size: .74rem; }
.composer {
  margin-top: auto;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--panel-border);
  background: #0d1420;
}
.composer-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.composer-row textarea {
  min-height: 52px;
  resize: none;
}
button {
  border: 0;
  background: var(--accent);
  color: white;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 600;
}
#sendBtn {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.05rem;
}
button.ghost {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 10px 14px;
}
.clip-btn {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 1.45rem;
  line-height: 1;
  padding: 10px 8px;
  cursor: pointer;
  user-select: none;
}
.clip-btn input { display: none; }
.hint { color: var(--muted); font-size: .8rem; margin: 8px 0 0; }
.hidden { display: none !important; }
@media (max-width: 700px) {
  .topbar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .panel {
    margin-left: 12px;
    margin-right: 12px;
  }
  .messages,
  .composer {
    padding-left: 12px;
    padding-right: 12px;
  }
  .msg { max-width: 92%; }
}
