/* 벨로나 채팅 (chat.rsscs2.kr) */
:root { color-scheme: dark; --bg: #11131a; --panel: #1a1d27; --line: #2b3040; --text: #e6e8ef; --muted: #9aa1b5; --accent: #e0a63a;
  --user: #24324d; --font: system-ui, -apple-system, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--font); }
a { color: var(--accent); }
h1 { font-size: 1.25rem; margin: 0; }
.muted { color: var(--muted); }
.small { color: var(--muted); font-size: .8rem; margin: .4rem 0 0; }
.card { max-width: 34rem; margin: 12vh auto; padding: 2rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.card p { margin: .8rem 0; }
.alert { padding: .6rem .8rem; border-radius: 8px; background: #3a2323; }
.alert.ok { background: #1f3326; }
.btn { display: inline-block; padding: .55rem 1.1rem; border: 0; border-radius: 8px; background: var(--accent); color: #1b1408;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; }
.inline { display: inline; margin: 0; }

.app { max-width: 52rem; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; padding: 0 1rem; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 0;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 1; }
.top p { margin: 0; font-size: .85rem; }
.tools { display: flex; gap: 1rem; align-items: center; font-size: .9rem; }
.left { color: var(--muted); }
.log { flex: 1; padding: 1rem 0; display: flex; flex-direction: column; gap: .8rem; }
.msg { max-width: 92%; padding: .7rem .95rem; border-radius: 12px; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--user); white-space: pre-wrap; }
.msg.user p { margin: 0; }
.msg.bot { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); }
.msg.wait { color: var(--muted); }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h3, .md h4 { font-size: 1rem; margin: .9rem 0 .3rem; }
.md p { margin: .45rem 0; }
.md ul { margin: .3rem 0; padding-left: 1.3rem; }
.md code { background: #262a36; padding: .05rem .35rem; border-radius: 4px; font-size: .9em; }
.md pre { background: #262a36; padding: .6rem .8rem; border-radius: 8px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.empty { margin: auto 0; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.chip { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: .4rem .9rem;
  font: inherit; font-size: .9rem; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.compose { position: sticky; bottom: 0; display: flex; gap: .6rem; padding: .8rem 0 1rem; background: var(--bg); }
.compose textarea { flex: 1; resize: vertical; min-height: 2.8rem; max-height: 12rem; padding: .6rem .8rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
.compose textarea:focus, .chip:focus-visible, .btn:focus-visible, .link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 520px) { .msg { max-width: 100%; } .tools { gap: .7rem; font-size: .85rem; } }
