:root {
  --bg: #0b1220;
  --panel: #101a2e;
  --line: #21304d;
  --accent: #4da3ff;
  --text: #e8eefb;
  --dim: #8fa3c4;
}
* { box-sizing: border-box; }
body {
  margin: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, "Segoe UI", sans-serif;
}
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
}
h1 { font-size: 17px; margin: 0; letter-spacing: 0.04em; }
h1 .sub { color: var(--dim); font-weight: 400; font-size: 13px; margin-left: 8px; }
button {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 12px; cursor: pointer;
}
button:hover { border-color: var(--accent); }

main { flex: 1; display: flex; min-height: 0; }

#screenGrid {
  flex: 1; display: grid; gap: 10px; padding: 12px;
  grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(140px, 1fr);
}
.screen-block {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; display: flex; flex-direction: column; overflow: hidden;
}
.screen-block.active { border-color: var(--accent); box-shadow: 0 0 18px rgba(77, 163, 255, 0.25); }
.screen-block .label { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.screen-block .content { flex: 1; margin-top: 8px; }
.screen-block .content h3 { margin: 0 0 8px; color: var(--accent); font-size: 15px; }
.screen-block .content li { margin-bottom: 4px; }
.screen-block .note { color: var(--dim); font-size: 11px; margin-top: 6px; }
.screen-block.span-2x2 { grid-column: span 2; grid-row: span 2; }
.screen-block.idle .content { color: var(--dim); font-style: italic; }

#chatPanel {
  width: 0; border-left: 1px solid var(--line); display: flex; flex-direction: column;
  transition: width 0.2s ease; overflow: hidden; background: #0d1526;
}
#chatPanel.open { width: 320px; }
.chat-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
#chatLog { flex: 1; overflow-y: auto; padding: 12px; }
.msg { margin-bottom: 10px; max-width: 90%; padding: 8px 10px; border-radius: 10px; }
.msg.user { background: #1b2c4d; margin-left: auto; }
.msg.car { background: var(--panel); border: 1px solid var(--line); }
#chatForm { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
#chatInput { flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; color: var(--text); padding: 6px 10px; }
#micBtn.listening, #camBtn.listening { border-color: #ff5d5d; color: #ff5d5d; }

.kiosk-buttons { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.kiosk-buttons button { text-align: left; font-size: 13px; }

footer {
  font: 11px/1.4 ui-monospace, Consolas, monospace; color: var(--dim);
  border-top: 1px solid var(--line); padding: 4px 12px; height: 54px; overflow-y: auto;
}
