:root {
  --bg: #07070f;
  --panel: #10101c;
  --line: rgba(34, 211, 238, 0.22);
  --cyan: #22d3ee;
  --text: #eceaf6;
  --muted: #8f8eab;
  --jin: #1a2438;
  --you: #14261f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100dvh;
  font-family: Outfit, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(34, 211, 238, 0.12), transparent 50%),
    radial-gradient(ellipse at 90% 100%, rgba(167, 139, 250, 0.1), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.top, .shell, .foot { position: relative; z-index: 1; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 15, 0.85);
  backdrop-filter: blur(10px);
}

.brand { display: flex; gap: 0.75rem; align-items: center; }
.mark {
  width: 2.5rem; height: 2.5rem;
  border-radius: 0.75rem;
  display: grid; place-items: center;
  font-family: Orbitron, sans-serif;
  font-weight: 700;
  background: linear-gradient(145deg, #22d3ee, #6366f1);
  color: #041016;
}
.brand h1 {
  font-family: Orbitron, sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.brand p { font-size: 0.75rem; color: var(--muted); }

.pill {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--cyan);
}

.shell {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 1rem 1rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.log {
  flex: 1;
  min-height: 42vh;
  max-height: 58vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem 0.15rem;
}

.bubble {
  max-width: 88%;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  border: 1px solid var(--line);
}
.bubble.you {
  align-self: flex-end;
  background: var(--you);
  border-color: rgba(34, 211, 238, 0.35);
}
.bubble.jin {
  align-self: flex-start;
  background: var(--jin);
}
.bubble .who {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.chips button {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}
.chips button:hover { border-color: var(--cyan); color: var(--cyan); }

.composer {
  display: flex;
  gap: 0.5rem;
  padding: 0.45rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--panel);
}
.composer input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 0.65rem 0.75rem;
  outline: none;
}
.composer input::placeholder { color: var(--muted); }
.send {
  width: 2.75rem;
  border: 0;
  border-radius: 0.85rem;
  background: linear-gradient(145deg, #22d3ee, #6366f1);
  color: #041016;
  font-size: 1.1rem;
  cursor: pointer;
}

.note {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}
.note code {
  font-size: 0.75rem;
  color: var(--cyan);
}

.foot {
  text-align: center;
  padding: 0.85rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.foot a { color: var(--cyan); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

@media (max-width: 520px) {
  .top { padding: 0.85rem 1rem; }
  .log { max-height: 52vh; }
}
