:root {
  --bg: #0b0f17; --panel: #121826f2; --line: #263044; --text: #e6ebf3; --muted: #8b96a8; --accent: #ffd166;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; touch-action: none; }
#app canvas { display: block; }
a { color: #8ecae6; }
code { background: #1c2434; padding: 0 4px; border-radius: 4px; font-size: 12px; }
button { background: #1f2738; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: inherit; cursor: pointer; }
button:hover { border-color: var(--accent); }
input, textarea, select { background: #0d121c; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px; font: inherit; width: 100%; }
input[type=checkbox] { width: auto; }
.muted { color: var(--muted); }

#crosshair { position: fixed; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #fff9; pointer-events: none; }
#topbar { position: fixed; top: 10px; left: 10px; right: 10px; display: flex; gap: 10px; align-items: center; pointer-events: none; }
#topbar > * { pointer-events: auto; }
#topbar b, #status { background: #121826d9; padding: 5px 10px; border-radius: 8px; }   /* readable over the bright office */
#topbar b { color: var(--accent); }
#status { color: #c3cbd8; font-size: 12px; flex: 0 1 auto; margin-right: auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#hint { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); background: #000a; padding: 6px 12px; border-radius: 20px; font-size: 13px; pointer-events: none; white-space: nowrap; }
#minimap { position: fixed; right: 10px; bottom: 10px; width: 220px; height: 150px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
#stick { position: fixed; left: 24px; bottom: 60px; width: 120px; height: 120px; border-radius: 50%; background: #ffffff14; border: 1px solid #ffffff30; pointer-events: none; }
#stick div { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: #ffffff40; }
#toasts { position: fixed; top: 50px; left: 50%; transform: translateX(-50%); display: grid; gap: 6px; z-index: 5; }
.toast { background: var(--panel); border-left: 4px solid; padding: 8px 12px; border-radius: 8px; max-width: 80vw; box-shadow: 0 4px 20px #0008; }

#panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--panel); border-left: 1px solid var(--line);
  overflow-y: auto; padding: 18px 18px 40px; z-index: 4; touch-action: pan-y; backdrop-filter: blur(6px); }
#panel .close { position: sticky; top: 0; float: right; z-index: 1; }
#panel h2 { margin: 0; font-size: 20px; } #panel h3 { font-size: 15px; margin: 18px 0 6px; } #panel h4 { margin: 12px 0 4px; font-size: 13px; color: var(--muted); }
#panel ul { padding-left: 18px; margin: 4px 0; }
.who { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.who p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.who .avatar { width: 46px; height: 46px; border-radius: 12px; background: var(--c); color: #111; display: grid; place-items: center; font-weight: 700; font-size: 22px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.commits li { margin: 3px 0; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.log { display: grid; gap: 8px; margin: 8px 0; max-height: 46vh; overflow-y: auto; }
.msg { padding: 8px 10px; border-radius: 10px; background: #1a2131; word-wrap: break-word; }
.msg.me { background: #233149; justify-self: end; max-width: 85%; }
.msg.note { background: none; color: var(--muted); font-size: 12px; padding: 0 4px; }
.msg.approve { border: 1px solid var(--accent); }
.msg pre { white-space: pre-wrap; font-size: 12px; }
.chat form, #panel > form { display: flex; gap: 6px; align-items: flex-end; }
.mic.on { background: #7a2f2f; }
.tabs { display: flex; gap: 6px; margin: 10px 0; } .tabs .on { border-color: var(--accent); color: var(--accent); }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 8px; overflow-x: auto; }
.col { background: #0e1420; border-radius: 10px; padding: 6px; min-height: 120px; }
.card { background: #1b2233; border-left: 4px solid var(--c); border-radius: 8px; padding: 6px; margin: 6px 0; font-size: 12px; }
.card .meta { color: var(--muted); font-size: 11px; margin-top: 3px; }
.card .acts { display: flex; gap: 4px; margin-top: 4px; } .card select { padding: 2px; font-size: 11px; }
.new form, form.settings { display: grid; gap: 8px; margin-top: 8px; }
form.settings label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.note { color: var(--accent); }
.doc { font-size: 13px; }
@media (max-width: 700px) {
  #panel { width: 100vw; border-left: 0; }
  .kanban { grid-template-columns: repeat(4, 150px); }
  #minimap { width: 150px; height: 102px; }
  #topbar b { display: none; }
  #crosshair { display: none; }
}
