:root {
  color-scheme: dark;
  font-family: Inter, "Pretendard", "Noto Sans KR", system-ui, sans-serif;
  background: #0d0f14;
  color: #eef0f6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #9398a8;
  --line: #282b35;
  --panel: #151820;
  --accent: #bb9cff;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 50% -20%, #29223e 0, #11131a 55%, #0d0f14 100%); }
button, textarea { font: inherit; }
button { color: inherit; }
.shell { width: min(940px, calc(100% - 36px)); min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 13px; padding: 27px 2px 22px; border-bottom: 1px solid var(--line); }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #8870ba; border-radius: 14px; color: #e0d3ff; font-size: 20px; font-weight: 700; background: linear-gradient(145deg, #4a3a69, #1d1b2a); }
.eyebrow { margin: 0 0 3px; color: #a493ca; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
h1 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.status-wrap { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #e1aa5b; box-shadow: 0 0 12px #e1aa5b55; }
.status-dot.ready { background: #62d59a; box-shadow: 0 0 12px #62d59a66; }
.status-dot.offline { background: #e27777; box-shadow: 0 0 12px #e2777766; }
.workspace { flex: 1; display: flex; flex-direction: column; min-height: 0; padding-bottom: 16px; }
.conversation { flex: 1; min-height: 360px; overflow-y: auto; padding: 22px 4px 10px; }
.welcome { max-width: 610px; margin: 65px auto 38px; text-align: center; }
.welcome-orb { display: grid; place-items: center; width: 49px; height: 49px; margin: 0 auto 17px; border: 1px solid #604e7f; border-radius: 17px; color: #ddcaff; font-size: 24px; background: #30263e; box-shadow: 0 8px 42px #a079d322; }
.welcome h2, .invite-gate h2 { margin: 0 0 8px; font-size: 23px; letter-spacing: -.04em; }
.welcome p, .invite-gate p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.examples { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.example { padding: 9px 12px; border: 1px solid #333642; border-radius: 999px; color: #c4c7d1; background: #171922; font-size: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.example:hover { border-color: #79669c; background: #211d2b; }
.messages { display: grid; gap: 20px; max-width: 760px; margin: 0 auto; }
.message { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 11px; align-items: start; }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 11px; color: #d7c6ff; background: #30263e; font-size: 12px; font-weight: 700; }
.message.user .avatar { color: #e4e7ef; background: #292d39; }
.message-content { min-width: 0; padding: 4px 0 2px; color: #e5e7ee; font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.user .message-content { color: #c8cbd5; }
.message-content.pending::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--accent); animation: pulse .9s infinite alternate; }
@keyframes pulse { to { opacity: .25; } }
.composer { position: sticky; bottom: 0; padding: 13px 14px 10px; border: 1px solid #343744; border-radius: 17px; background: #191b24f2; box-shadow: 0 18px 50px #0005; backdrop-filter: blur(16px); }
.composer:focus-within { border-color: #74628f; }
.composer textarea { display: block; width: 100%; min-height: 60px; max-height: 220px; resize: vertical; border: 0; outline: 0; color: #f1f0f6; background: transparent; font-size: 14px; line-height: 1.6; }
.composer textarea::placeholder { color: #757b8b; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 7px; color: #858a99; font-size: 11px; }
.send-button { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px 8px 14px; border: 0; border-radius: 10px; color: #17131f; background: #d4c0fb; font-size: 12px; font-weight: 700; cursor: pointer; }
.send-button:hover { background: #e0d3ff; }
.send-button:disabled { opacity: .5; cursor: wait; }
.send-button span:last-child { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 6px; color: #eee6ff; background: #584772; font-size: 14px; }
.new-chat { align-self: center; margin-top: 11px; padding: 5px 10px; border: 0; color: #858a99; background: transparent; font-size: 11px; cursor: pointer; }
.new-chat:hover { color: #d4c0fb; }
.invite-gate { max-width: 480px; margin: auto; padding: 45px 15px; text-align: center; }
.gate-icon { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 17px; border: 1px solid #42394f; border-radius: 15px; color: var(--accent); background: #211d2b; font-size: 21px; }
.toast { position: fixed; left: 50%; bottom: 25px; z-index: 5; max-width: calc(100% - 32px); transform: translateX(-50%); padding: 11px 15px; border: 1px solid #674e57; border-radius: 12px; color: #f3d9dc; background: #302127; box-shadow: 0 10px 35px #0008; font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 560px) {
  .shell { width: min(100% - 22px, 940px); }
  .topbar { padding-top: 17px; }
  .conversation { min-height: 320px; }
  .welcome { margin-top: 49px; }
  .welcome h2 { font-size: 21px; }
  .example { font-size: 11px; }
  .composer-footer > span { max-width: 64%; line-height: 1.4; }
}
