:root {
    --bg: #0e1210;
    --panel: #151b18;
    --line: #26312c;
    --text: #d8e6de;
    --dim: #7c9186;
    --accent: #5ee6a3;
    --accent-dim: #2a4a3a;
    --user-bubble: #1f2b25;
    --bot-bubble: #101614;
    --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    --sans: "IBM Plex Sans", system-ui, sans-serif;
  }
  * { box-sizing: border-box; }
  html, body {
    margin: 0;
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
  }
  body {
    display: flex;
    justify-content: center;
    padding: 24px;
  }
  .frame {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--panel);
  }
  .head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-family: var(--mono);
  }
  .head .id {
    font-size: 13px;
    color: var(--dim);
    letter-spacing: 0.04em;
  }
  .head .id b { color: var(--accent); }
  .head .status {
    font-size: 11px;
    color: var(--dim);
  }
  .head .status .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    margin-right: 6px;
  }
  .log {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .msg {
    max-width: 80%;
    padding: 9px 13px;
    border-radius: 8px;
    font-size: 14.5px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
  }
  .msg.bot {
    align-self: flex-start;
    background: var(--bot-bubble);
    border: 1px solid var(--line);
    border-bottom-left-radius: 2px;
  }
  .msg.user {
    align-self: flex-end;
    background: var(--user-bubble);
    border: 1px solid var(--accent-dim);
    border-bottom-right-radius: 2px;
    color: var(--text);
  }
  .tag {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--dim);
    margin-bottom: 3px;
    letter-spacing: 0.05em;
  }
  .inputbar {
    display: flex;
    border-top: 1px solid var(--line);
    padding: 12px;
    gap: 8px;
  }
  input {
    flex: 1;
    background: var(--bot-bubble);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--text);
    font-family: var(--sans);
    font-size: 14px;
    outline: none;
  }
  input:focus { border-color: var(--accent-dim); }
  button {
    background: var(--accent);
    color: #06120c;
    border: none;
    border-radius: 6px;
    padding: 0 18px;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }
  button:active { transform: translateY(1px); }
  .log::-webkit-scrollbar { width: 8px; }
  .log::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }