/* AgentOS v2.2 — "The Round" — ink & bone, a room you can see everyone working in */
:root {
  --ink: #04060a;      /* page background */
  --ink-2: #0a0f16;    /* panels, topbar, composer */
  --ink-3: #101722;    /* hover, raised */
  --line: #1c2531;     /* hairlines */
  --bone: #e6eeea;     /* primary text */
  --bone-dim: #93a29c; /* secondary text */
  --cyan: #00e5d0;     /* the one accent */
  --amber: #c9a24a;    /* needs-you */
  --warn: #e0653d;     /* errors, deny */
  --good: #58d68d;     /* success, idle-on */
  --human: #123a35;    /* the human's voice on the floor */
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--ink); color: var(--bone);
  font: 14px/1.5 system-ui, "Segoe UI", sans-serif;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select {
  font: inherit; color: var(--bone);
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 7px 10px; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--cyan); }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
#topbar {
  height: 46px;
  display: flex; align-items: center; gap: 18px;
  padding: 0 14px;
  background: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
#topbar .brand { font-size: 14px; font-weight: 600; letter-spacing: .3px; display: flex; align-items: center; gap: 7px; }
#topbar .logo { color: var(--cyan); }
#topbar .ver { color: var(--bone-dim); font-size: 10px; font-weight: 400; }
.top-tabs { display: flex; gap: 4px; height: 100%; }
.top-tab {
  display: flex; align-items: center; padding: 0 16px;
  color: var(--bone-dim); font-size: 13.5px;
  border-bottom: 2px solid transparent;
}
.top-tab:hover { color: var(--bone); }
.top-tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }
.name-chip {
  margin-left: auto;
  display: flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 14px; padding: 3px 12px 3px 4px;
  font-size: 12px;
}
.name-chip:hover { border-color: var(--cyan); }
.name-chip .nc-face {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--bone-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--bone);
}
.name-chip .nc-hint { color: var(--bone-dim); font-size: 10.5px; }
.mem-chip {
  font-size: 11.5px; color: var(--bone-dim);
  border: 1px solid var(--line); border-radius: 10px; padding: 2px 10px;
  cursor: pointer;
}
.mem-chip.up { color: var(--good); border-color: #2c5e48; }
.mem-chip.down { color: var(--bone-dim); }

/* ---------- app grid: rows fixed so panes can never push past the viewport ---------- */
#app {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 300px;
  grid-template-rows: minmax(0, 1fr);   /* #topbar lives outside; children must shrink */
  height: calc(100vh - 46px);
}
#left, #center, #right { min-height: 0; min-width: 0; overflow: hidden; }

/* ---------- left: rooms ---------- */
#left { background: var(--ink-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.left-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; }
.section-label {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--bone-dim); font-size: 11px; text-transform: uppercase;
  letter-spacing: .8px; padding: 6px 6px 6px 2px;
}
.mini-btn {
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 9px;
  color: var(--bone-dim); font-size: 12px;
}
.mini-btn:hover { color: var(--cyan); border-color: var(--cyan); }

#project-list { display: flex; flex-direction: column; gap: 2px; }
.project-item {
  padding: 8px 10px; border-radius: 7px; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.project-item:hover { background: var(--ink-3); }
.project-item.active { background: var(--ink-3); box-shadow: inset 2px 0 0 var(--cyan); }
.project-item .p-name { font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-item .p-occ { display: flex; flex-shrink: 0; }
.project-item .p-occ .dot {
  width: 8px; height: 8px; border-radius: 50%; margin-left: -3px;
  box-shadow: 0 0 0 2px var(--ink-2);
}

#members-panel { margin-top: 14px; }
.member-row {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px;
}
.member-row:hover { background: var(--ink-3); }
.member-row .avatar {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--ink); flex-shrink: 0;
}
.member-row .m-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-row .m-status { width: 8px; height: 8px; border-radius: 50%; background: var(--bone-dim); flex-shrink: 0; }
.m-status.idle { background: var(--good); }
.m-status.thinking, .m-status.starting { background: var(--amber); animation: pulse 1.2s infinite; }
.m-status.error { background: var(--warn); }
.m-status.offline { background: var(--bone-dim); }
.m-status.disabled { background: var(--line); }
@keyframes pulse { 50% { opacity: .35; } }
.member-row .m-remove { color: var(--bone-dim); font-size: 12px; visibility: hidden; }
.member-row:hover .m-remove { visibility: visible; }
.member-row .m-remove:hover { color: var(--warn); }
#add-member-row { display: flex; gap: 6px; margin-top: 8px; }
#add-member-row select { flex: 1; font-size: 12px; padding: 4px 6px; }

#archived-panel { margin-top: 16px; }
.archived-row {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px;
  color: var(--bone-dim); font-size: 12.5px;
}
.archived-row .a-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: line-through; }

/* ---------- center ---------- */
#center { display: flex; flex-direction: column; background: var(--ink); }
.welcome { margin: auto; max-width: 640px; padding: 30px; text-align: center; }
.welcome h1 { font-size: 27px; margin-bottom: 10px; letter-spacing: -.3px; }
.welcome p { color: var(--bone-dim); margin-bottom: 26px; }
.welcome-cards { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.wcard {
  width: 180px; padding: 18px 14px; text-align: left;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.wcard:hover { border-color: var(--cyan); }
.wcard-icon { font-size: 22px; }
.wcard-title { font-weight: 600; font-size: 14.5px; }
.wcard-sub { color: var(--bone-dim); font-size: 12px; line-height: 1.4; }

#workspace { display: flex; flex-direction: column; flex: 1; min-height: 0; }
#ws-header {
  padding: 10px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; background: var(--ink-2);
}
.ws-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex: 1; }
#ws-name { font-weight: 600; font-size: 15px; }
.ws-path { color: var(--bone-dim); font-size: 11px; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-tools { display: flex; align-items: center; gap: 8px; }
#feed-search { width: 200px; font-size: 12.5px; padding: 5px 10px; border-radius: 14px; }

/* ---------- the Round: presence band ---------- */
#round-band {
  flex-shrink: 0;
  display: flex; align-items: flex-start; gap: 16px;
  padding: 12px 18px 10px;
  background: var(--ink-2);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.seats { display: flex; gap: 14px; flex: 1; min-width: 0; }
.seat {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  width: 86px; padding: 5px 2px 7px; border-radius: 9px; flex-shrink: 0;
}
.seat:hover { background: var(--ink-3); }
.seat.picked { background: var(--ink-3); box-shadow: inset 0 0 0 1px var(--cyan); }
.seat-ring { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--line); }
.seat-ring .seat-face {
  position: absolute; inset: 2px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: var(--ink);
  background: var(--bone-dim);
}
.seat.agent .seat-face { background: var(--seat, var(--bone-dim)); }
.seat.human .seat-face { background: var(--ink-2); color: var(--bone); border: 1px solid var(--bone-dim); }
.seat.idle .seat-ring { border-color: #24313f; }
.seat.busy .seat-ring { border-color: var(--cyan); animation: ringpulse 1.6s infinite; }
.seat.attention .seat-ring { border-color: var(--amber); animation: ringpulse 1.6s infinite; }
.seat.error .seat-ring { border-color: var(--warn); }
.seat.off .seat-ring, .seat.dim .seat-ring { border-color: var(--line); }
.seat.off .seat-face, .seat.dim .seat-face { opacity: .45; }
@keyframes ringpulse { 50% { box-shadow: 0 0 0 3px rgba(0, 229, 208, .14); } }
.seat-name { font-size: 11.5px; font-weight: 600; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-name .you { color: var(--bone-dim); font-weight: 400; }
.seat-now {
  font-size: 10.5px; color: var(--bone-dim);
  max-width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; height: 14px;
}
.seat.busy .seat-now { color: var(--cyan); }
.seat.attention .seat-now { color: var(--amber); }
.seat.error .seat-now { color: var(--warn); }
.occupancy { font-size: 11.5px; color: var(--bone-dim); padding-top: 8px; white-space: nowrap; }
.occupancy b { color: var(--cyan); font-weight: 600; }

/* ---------- rounds: turn-block feed ---------- */
#feed { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px 26px; display: flex; flex-direction: column; gap: 20px; }
.feed-inner { max-width: 920px; display: flex; flex-direction: column; gap: 20px; }
.feed-empty { margin: auto; text-align: center; color: var(--bone-dim); max-width: 440px; line-height: 1.65; padding: 40px 0; }
.feed-empty b { color: var(--bone); font-size: 15.5px; }
.feed-empty .link { color: var(--cyan); cursor: pointer; }

.round { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; }
.round-rail { position: relative; }
.round-rail::before {
  content: ''; position: absolute; left: 6px; top: 16px; bottom: -20px;
  width: 1px; background: var(--line);
}
.round:last-child .round-rail::before { bottom: 4px; }
.rail-dot { position: absolute; left: 3px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
.round.ambient .rail-dot { background: #2a3648; }

.round-opener { display: flex; align-items: baseline; gap: 8px; }
.round-opener .avatar { width: 18px; height: 18px; font-size: 10px; align-self: center; }
.r-author { font-weight: 650; font-size: 13.5px; }
.r-time { color: var(--bone-dim); font-size: 11px; }
.r-label { margin-left: auto; color: var(--bone-dim); font-size: 10px; text-transform: uppercase; letter-spacing: .8px; white-space: nowrap; }
.r-open-body {
  margin: 7px 0 2px 26px; padding: 10px 14px;
  background: var(--human); border-left: 2px solid #1d5248;
  border-radius: 2px 10px 10px 10px;
  white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.55;
}
.r-open-body code { font-family: var(--mono); font-size: 12.5px; background: rgba(0,0,0,.25); padding: 1px 4px; border-radius: 4px; }
.r-open-body pre { background: rgba(0,0,0,.25); padding: 8px; border-radius: 6px; overflow-x: auto; margin: 6px 0; }

.round-rows { display: flex; flex-direction: column; gap: 11px; margin: 12px 0 0 26px; }
.row { display: flex; gap: 8px; align-items: flex-start; }
.row > .avatar { width: 20px; height: 20px; font-size: 10px; margin-top: 2px; flex-shrink: 0; }
.row-main { flex: 1; min-width: 0; }
.row-head { display: flex; align-items: baseline; gap: 8px; font-size: 12px; flex-wrap: wrap; }
.row-author { font-weight: 600; }
.row-time { color: var(--bone-dim); font-size: 10.5px; }
.msg-body { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.55; margin-top: 2px; }
.msg-body code { font-family: var(--mono); font-size: 12.5px; background: var(--ink-3); padding: 1px 4px; border-radius: 4px; }
.msg-body pre { background: var(--ink-2); border: 1px solid var(--line); padding: 8px; border-radius: 6px; overflow-x: auto; margin: 6px 0; }
.msg-body .caret, .r-open-body .caret {
  display: inline-block; width: 7px; height: 14px; background: var(--cyan);
  animation: pulse 1s infinite; vertical-align: -2px; margin-left: 2px;
}

.badge {
  font-size: 10px; padding: 0 6px; border-radius: 8px;
  border: 1px solid var(--line); color: var(--bone-dim);
}
.badge.offline { color: var(--amber); border-color: var(--amber); }
.badge.streaming { color: var(--cyan); border-color: var(--cyan); }

.react-bar { display: inline-flex; gap: 6px; margin-top: 4px; }
.react-btn {
  border: 1px solid var(--line); border-radius: 10px; padding: 0 8px;
  font-size: 11.5px; color: var(--bone-dim); visibility: hidden;
}
.round:hover .react-btn, .react-btn.mine { visibility: visible; }
.react-btn.mine { color: var(--cyan); border-color: var(--cyan); }
.react-btn .r-name { color: var(--bone-dim); font-size: 10px; margin-left: 3px; }
.stop-btn {
  border: 1px solid var(--amber); color: var(--amber); border-radius: 9px;
  font-size: 11px; padding: 0 8px;
}
.stop-btn:hover { background: var(--amber); color: var(--ink); }

.msg.sys { color: var(--bone-dim); font-size: 12px; padding-left: 2px; }
.msg.sys.error { color: var(--warn); }

.event-line { display: flex; align-items: center; gap: 7px; color: var(--bone-dim); font-size: 12.5px; }
.event-line .icon { font-size: 13px; }
.event-line .who { color: var(--bone); }
.event-line .file-link { color: var(--cyan); cursor: pointer; font-family: var(--mono); font-size: 11.5px; }
.event-line .file-link:hover { text-decoration: underline; }

.tool-card {
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px;
  font-size: 12.5px; color: var(--bone-dim); background: var(--ink-2);
  display: flex; gap: 8px; align-items: center; flex: 1; min-width: 0;
}
.tool-card .t-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-card .t-status { font-size: 11px; margin-left: auto; flex-shrink: 0; }
.tool-card.completed .t-status { color: var(--good); }
.tool-card.in_progress .t-status { color: var(--amber); }
.tool-card.failed .t-status { color: var(--warn); }

.perm-card {
  border: 1px solid var(--amber); border-radius: 10px; padding: 10px 12px; background: var(--ink-2);
  flex: 1; min-width: 0;
}
.perm-card .p-title { font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 7px; }
.perm-card .p-title .avatar { width: 18px; height: 18px; font-size: 9px; }
.perm-card .p-options { margin-bottom: 8px; }
.perm-card .p-opt { padding: 2px 0; }
.perm-card .p-actions { display: flex; gap: 8px; }
.perm-card.resolved { border-color: var(--line); }
.perm-card .p-result { font-size: 12.5px; }
.perm-card .p-result.approved { color: var(--good); }
.perm-card .p-result.denied { color: var(--warn); }

.filter-note {
  color: var(--bone-dim); font-size: 12px; padding: 0 0 4px 24px;
  display: flex; align-items: center; gap: 8px;
}
.filter-note .link { color: var(--cyan); cursor: pointer; }

.attach-btn {
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px;
  color: var(--bone-dim); font-size: 15px; flex-shrink: 0;
}
.attach-btn:hover { color: var(--cyan); border-color: var(--cyan); }

/* ---------- the floor: composer ---------- */
#composer { border-top: 1px solid var(--line); background: var(--ink-2); padding: 8px 18px 12px; position: relative; flex-shrink: 0; }
.composer-to { color: var(--bone-dim); font-size: 11.5px; padding: 2px 2px 6px; }
.composer-to b { color: var(--bone); font-weight: 500; }
.composer-to .ask { color: var(--cyan); }
#composer-row { display: flex; gap: 10px; align-items: flex-end; }
#composer-input { flex: 1; resize: none; max-height: 160px; min-height: 42px; font-size: 14.5px; }
#mention-menu {
  position: absolute; bottom: 100%; left: 18px; z-index: 30;
  background: var(--ink-3); border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
#mention-menu .mm-item { padding: 6px 14px; cursor: pointer; }
#mention-menu .mm-item:hover, #mention-menu .mm-item.sel { background: var(--ink); color: var(--cyan); }

.btn {
  border: 1px solid var(--line); border-radius: 7px; padding: 7px 16px;
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); }
.btn.primary { background: var(--cyan); color: var(--ink); font-weight: 600; border-color: var(--cyan); }
.btn.primary:hover { background: #3ff0de; color: var(--ink); }
.btn.danger:hover { border-color: var(--warn); color: var(--warn); }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- right: the desk ---------- */
#right { background: var(--ink-2); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.right-tabs { display: flex; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.right-tabs .tab { flex: 1; padding: 10px; color: var(--bone-dim); font-size: 13px; }
.right-tabs .tab.active { color: var(--cyan); box-shadow: inset 0 -2px 0 var(--cyan); }
.tab-body { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; }
.desk-label {
  color: var(--bone-dim); font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px;
  padding: 4px 2px 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.desk-label-tree { margin-top: 16px; }
#af-rows { display: flex; flex-direction: column; gap: 1px; }
.af-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px;
  cursor: pointer; font-size: 12.5px;
}
.af-row:hover { background: var(--ink-3); }
.af-row .af-icon { flex-shrink: 0; }
.af-row .af-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 11.5px; }
.af-row .af-who { display: flex; align-items: center; gap: 5px; color: var(--bone-dim); font-size: 10.5px; flex-shrink: 0; }
.af-row .avatar { width: 15px; height: 15px; font-size: 8px; }
.af-empty { color: var(--bone-dim); font-size: 12px; padding: 2px 8px 6px; }
.touch-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-left: 6px; vertical-align: 1px; flex-shrink: 0; }

#file-tree { font-size: 13px; font-family: var(--mono); }
.tree-dir { padding: 3px 4px; color: var(--bone); cursor: pointer; user-select: none; display: flex; align-items: center; }
.tree-dir:hover { color: var(--cyan); }
.tree-file { padding: 3px 4px 3px 18px; color: var(--bone-dim); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; }
.tree-file:hover { color: var(--cyan); }
.tree-file .f-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-children.collapsed { display: none; }

.mem-card { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.mem-row { display: flex; align-items: center; gap: 8px; }
.mem-row .m-label { flex: 1; color: var(--bone-dim); }
.mem-note { color: var(--bone-dim); font-size: 12px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); }
.status-dot.up { background: var(--good); }

/* ---------- screens ---------- */
.screen { overflow-y: auto; padding: 20px 26px; min-height: 0; }
.screen-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.screen-header h2 { font-size: 18px; }
.hint { color: var(--bone-dim); font-size: 13px; margin-bottom: 16px; max-width: 640px; }

table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th {
  text-align: left; color: var(--bone-dim); font-weight: 500; font-size: 11px;
  text-transform: uppercase; letter-spacing: .6px; padding: 8px 10px; border-bottom: 1px solid var(--line);
}
table.grid td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.grid tr:hover td { background: var(--ink-2); }
.pill { font-size: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 1px 7px; color: var(--bone-dim); }
.pill.on { color: var(--good); border-color: #2c5e48; }
.pill.off { color: var(--bone-dim); }
.pill.builtin { color: var(--cyan); border-color: #1d5e57; }

.form { max-width: 560px; display: flex; flex-direction: column; gap: 14px; }
.form .field { display: flex; flex-direction: column; gap: 4px; }
.form label { color: var(--bone-dim); font-size: 12px; }
.form .field-row { display: flex; gap: 10px; }
.form .field-row .field { flex: 1; }
.form textarea { font-family: var(--mono); font-size: 12.5px; }
.form .actions { display: flex; gap: 10px; align-items: center; }

/* ---------- shared avatar ---------- */
.avatar {
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--ink); flex-shrink: 0;
  width: 22px; height: 22px; font-size: 11px;
}
.avatar.human { background: var(--ink-2); color: var(--bone); border: 1px solid var(--bone-dim); }

/* ---------- modal & toast ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal-card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px;
  width: min(860px, 92vw); max-height: 88vh; display: flex; flex-direction: column;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 15px; }
.modal-body { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
#file-editor {
  width: 100%; min-height: 320px; font-family: var(--mono); font-size: 12.5px;
  white-space: pre; tab-size: 2;
}
.file-etiquette {
  border: 1px solid var(--line); border-left: 2px solid var(--cyan);
  border-radius: 6px; padding: 8px 12px; font-size: 12.5px; color: var(--bone-dim);
}
.file-etiquette.now { border-left-color: var(--amber); color: var(--amber); }
.file-preview { background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow: auto; max-height: 60vh; }
.file-preview img { max-width: 100%; }

#toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--ink-3); border: 1px solid var(--cyan); color: var(--bone);
  padding: 9px 18px; border-radius: 8px; font-size: 13px; z-index: 200;
  opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 70vw;
}
#toast.show { opacity: 1; }
#toast.error { border-color: var(--warn); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #2a3648; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media (max-width: 900px) {
  #app { grid-template-columns: 200px minmax(0, 1fr); }
  #right { display: none; }
}
