:root {
  color-scheme: dark;
  --bg: #101014;
  --panel: #191a20;
  --panel-2: #20222a;
  --text: #f4f1ea;
  --muted: #a8adb8;
  --line: #313541;
  --accent: #e34b56;
  --ok: #56d38b;
  --warn: #f3bd55;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Noto Sans KR", sans-serif;
}

button, input {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(360px, 0.95fr);
  min-height: 100vh;
}

.stage {
  position: relative;
  overflow: hidden;
  background: #0d0d10;
}

.stage img {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  object-fit: cover;
  opacity: 0.92;
}

.statusbar {
  position: absolute;
  left: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(16,16,20,0.72);
  backdrop-filter: blur(10px);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warn);
}

.dot.online { background: var(--ok); }
.dot.offline { background: var(--accent); }

.console {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 14px;
  padding: 28px;
  background: var(--panel);
  border-left: 1px solid var(--line);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #6f3540;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

input:focus {
  border-color: #777f91;
}

.messages {
  min-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #121318;
  padding: 12px;
}

.message {
  margin: 0 0 10px;
  padding: 10px 12px;
  background: var(--panel-2);
  line-height: 1.5;
  white-space: pre-wrap;
}

.message.user {
  border-left: 3px solid #6da6ff;
}

.message.lucia {
  border-left: 3px solid var(--accent);
}

.message.system {
  color: var(--muted);
  border-left: 3px solid var(--warn);
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

audio {
  width: 100%;
  min-height: 42px;
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .stage {
    min-height: 38vh;
  }

  .stage img {
    min-height: 38vh;
  }

  .console {
    min-height: 62vh;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 18px;
  }
}
