/* 3615 Supervandal — phone-first dark UI.
   Palette: ink #14121c, panel #1c1926, violet #8b6cff, cyan #4fd6e0,
   text #e8e5f2, muted #8d87a3. No raw primary colours. */

:root {
  --ink: #14121c;
  --panel: #1c1926;
  --panel-2: #241f31;
  --line: #2e2840;
  --violet: #8b6cff;
  --violet-dim: #5b46b8;
  --cyan: #4fd6e0;
  --text: #e8e5f2;
  --muted: #8d87a3;
  --ok: #4fd6a0;
  --warn: #e0b44f;
  --bad: #e06a6a;
  --radius: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
}

body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

/* ---------------- top bar ---------------- */

#topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(var(--safe-t) + 10px) 16px 10px;
  background: linear-gradient(180deg, #1a1725, var(--ink));
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: baseline; gap: 8px; }

.logo {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.5px;
  background: linear-gradient(92deg, var(--violet), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  font-size: 10px;
  letter-spacing: 2.4px;
  color: var(--muted);
  font-weight: 600;
}

.status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  white-space: nowrap;
}

.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted);
  flex: 0 0 auto;
}
.dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }

/* ---------------- views ---------------- */

main { flex: 1 1 auto; position: relative; overflow: hidden; }

.view {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.view.active { display: flex; }

/* ---------------- chat ---------------- */

.messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.empty { margin: auto; text-align: center; color: var(--muted); padding: 40px 20px; }
.empty-title { font-size: 16px; color: var(--text); margin: 0 0 6px; }
.empty-sub { font-size: 13px; margin: 0; max-width: 280px; }

.msg { display: flex; flex-direction: column; gap: 6px; max-width: 100%; }
.msg.user { align-items: flex-end; }

.bubble {
  padding: 11px 14px;
  border-radius: var(--radius);
  max-width: 88%;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.msg.user .bubble {
  background: linear-gradient(135deg, var(--violet-dim), #3d2f7a);
  border-bottom-right-radius: 5px;
}

.msg.assistant .bubble {
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
  max-width: 96%;
}

.bubble p { margin: 0 0 8px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble h1, .bubble h2, .bubble h3 { margin: 12px 0 6px; font-size: 15px; color: var(--cyan); }
.bubble ul { margin: 6px 0; padding-left: 20px; }
.bubble li { margin: 3px 0; }
.bubble code {
  background: #0f0d16;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  color: var(--cyan);
}
.bubble pre {
  background: #0f0d16;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  overflow-x: auto;
  margin: 8px 0;
}
.bubble pre code { background: none; border: 0; padding: 0; color: #cfc9e6; font-size: 12.5px; }
.bubble a { color: var(--cyan); }
.bubble img { max-width: 100%; border-radius: 10px; margin: 4px 0; }

.msg-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  padding: 0 4px;
}
.msg-meta button {
  background: none; border: 0; color: var(--muted);
  font-size: 11px; cursor: pointer; padding: 2px 4px;
}
.msg-meta button:active { color: var(--cyan); }

.think {
  border-left: 2px solid var(--violet-dim);
  padding: 6px 0 6px 10px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
  white-space: pre-wrap;
}
.think summary { cursor: pointer; font-style: normal; font-size: 12px; color: var(--violet); }

.tool-call {
  background: #0f0d16;
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 6px 0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-x: auto;
}
.tool-call b { color: var(--cyan); font-weight: 600; }

.cursor::after {
  content: "▍";
  color: var(--violet);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.thinking-banner {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  font-size: 12px;
  color: var(--violet);
  background: #1a1626;
  border-top: 1px solid var(--line);
}
.spinner {
  width: 11px; height: 11px;
  border: 2px solid var(--violet-dim);
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- composer ---------------- */

.composer {
  flex: 0 0 auto;
  padding: 8px 12px calc(8px + var(--safe-b));
  background: var(--ink);
  border-top: 1px solid var(--line);
}

.attachments { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 6px; }
.attachments:empty { display: none; }
.attachments .thumb {
  position: relative;
  width: 54px; height: 54px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.attachments .thumb img { width: 100%; height: 100%; object-fit: cover; }
.attachments .thumb button {
  position: absolute; top: 1px; right: 1px;
  width: 17px; height: 17px; border-radius: 50%;
  background: rgba(0,0,0,.75); color: #fff; border: 0;
  font-size: 11px; line-height: 1; cursor: pointer;
}

.composer-row { display: flex; align-items: flex-end; gap: 8px; }

#input {
  flex: 1 1 auto;
  resize: none;
  max-height: 132px;
  min-height: 42px;
  padding: 11px 14px;
  border-radius: 21px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  outline: none;
}
#input:focus { border-color: var(--violet-dim); }

.icon-btn, .send-btn {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 19px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.send-btn {
  background: linear-gradient(135deg, var(--violet), var(--violet-dim));
  border: 0;
  font-weight: 700;
}
.send-btn.stop { background: linear-gradient(135deg, var(--bad), #a04a4a); font-size: 14px; }
.icon-btn:active, .send-btn:active { transform: scale(0.94); }
.hidden { display: none !important; }

/* ---------------- models ---------------- */

#view-models, #view-settings { padding: 16px 14px calc(20px + var(--safe-b)); gap: 14px; }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.section-head h2 { margin: 0; font-size: 17px; font-weight: 650; }

.ghost-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 12.5px;
  cursor: pointer;
}
.ghost-btn:active { background: var(--panel); }
.ghost-btn.danger { color: var(--bad); border-color: #4a2a2a; }

.primary-btn {
  background: linear-gradient(135deg, var(--violet), var(--violet-dim));
  border: 0;
  color: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.primary-btn:active { transform: scale(0.97); }
.primary-btn.wide { width: 100%; margin-top: 6px; }
.primary-btn:disabled { opacity: .45; }

.vram-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
}
.vram-row { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 8px; }
.vram-label { color: var(--muted); letter-spacing: 1.2px; font-size: 10.5px; font-weight: 700; }
.vram-text { color: var(--text); font-variant-numeric: tabular-nums; }
.vram-bar { height: 7px; border-radius: 4px; background: #0f0d16; overflow: hidden; }
.vram-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width .4s ease;
}
.vram-loaded { margin-top: 8px; font-size: 12px; color: var(--muted); }
.vram-loaded b { color: var(--cyan); font-weight: 600; }

.pull-box { display: flex; gap: 8px; }
.pull-box input {
  flex: 1 1 auto;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  outline: none;
}
.pull-box input:focus { border-color: var(--violet-dim); }

.pull-progress { display: flex; flex-direction: column; gap: 6px; }
.pull-bar { height: 5px; border-radius: 3px; background: #0f0d16; overflow: hidden; }
.pull-fill { height: 100%; width: 0%; background: var(--cyan); transition: width .3s; }
.pull-status {
  font-size: 11.5px;
  color: var(--muted);
  font-family: ui-monospace, Menlo, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-list { display: flex; flex-direction: column; gap: 10px; }

.model-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.model-card.loaded { border-color: var(--violet-dim); box-shadow: 0 0 0 1px var(--violet-dim) inset; }

.model-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.model-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.model-tag {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  word-break: break-all;
}

.badge {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .6px;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}
.badge.fits { background: rgba(79,214,160,.14); color: var(--ok); }
.badge.partial { background: rgba(224,180,79,.14); color: var(--warn); }
.badge.no { background: rgba(224,106,106,.14); color: var(--bad); }
.badge.unknown { background: rgba(141,135,163,.14); color: var(--muted); }
.badge.loaded { background: rgba(139,108,255,.18); color: var(--violet); }

.model-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--muted); }
.chip {
  background: #0f0d16;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
}
.model-note { font-size: 12px; color: var(--muted); line-height: 1.45; }
.model-fit { font-size: 11.5px; color: var(--muted); }
.model-actions { display: flex; gap: 8px; }
.model-actions button {
  flex: 1 1 auto;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 12.5px;
  cursor: pointer;
}
.model-actions button.primary { background: linear-gradient(135deg, var(--violet), var(--violet-dim)); border: 0; font-weight: 600; }
.model-actions button.danger { color: var(--bad); }
.model-actions button:disabled { opacity: .4; }

/* ---------------- settings ---------------- */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card h3 { margin: 0; font-size: 13px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }

.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.field > span { color: var(--muted); font-size: 12.5px; }
.field em { color: var(--cyan); font-style: normal; font-size: 11.5px; }
.field output { font-size: 12px; color: var(--cyan); font-variant-numeric: tabular-nums; }

.field select, .field textarea, .field input[type=text] {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  outline: none;
  width: 100%;
}
.field textarea { resize: vertical; }

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 3px;
  background: #0f0d16;
  outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  cursor: pointer;
}

.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.kv span { color: var(--muted); flex: 0 0 auto; }
.kv code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  color: var(--cyan);
  text-align: right;
  word-break: break-all;
}

.footnote { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin: 0; }
.footnote code { color: var(--cyan); font-size: 11px; }

/* ---------------- conversations drawer ---------------- */

.menu-btn {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.menu-btn:active { background: var(--panel-2); }

.chat-head {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  background: #17141f;
}
.chat-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-head-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.chat-model {
  flex: 0 0 auto;
  font-size: 10.5px;
  color: var(--muted);
  font-family: ui-monospace, Menlo, monospace;
  max-width: 45%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tools-btn {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 10.5px;
  letter-spacing: .4px;
  cursor: pointer;
}
.tools-btn.on {
  background: rgba(79, 214, 160, .14);
  border-color: rgba(79, 214, 160, .4);
  color: var(--ok);
}

.tool-result {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11px;
  max-height: 120px;
  overflow-y: auto;
}

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 60;
}

.drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 86%;
  max-width: 340px;
  background: #17141f;
  border-right: 1px solid var(--line);
  z-index: 61;
  display: flex;
  flex-direction: column;
  transform: translateX(-102%);
  transition: transform .22s ease;
  padding-top: var(--safe-t);
  padding-bottom: var(--safe-b);
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
}
.drawer-title {
  font-size: 11px;
  letter-spacing: 1.6px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}
.primary-btn.small { padding: 6px 12px; font-size: 13px; border-radius: 8px; }

.conv-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 8px 20px;
}

.conv-group { margin-bottom: 12px; }
.conv-group-title {
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--violet);
  font-weight: 700;
  padding: 8px 8px 5px;
  opacity: .85;
}

.conv-row {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
  padding: 8px 8px 8px 10px;
  cursor: pointer;
}
.conv-row:active { background: var(--panel); }
.conv-row.active { background: var(--panel-2); box-shadow: inset 2px 0 0 var(--violet); }

.conv-row-main { flex: 1 1 auto; min-width: 0; }
.conv-row-title {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv-row-meta {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.conv-more {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.conv-more:active { background: var(--line); }

.conv-empty {
  padding: 24px 14px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

/* ---------------- action sheet ---------------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  background: rgba(0, 0, 0, .55);
}
.sheet-body {
  width: 100%;
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  padding: 18px 16px calc(18px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.sheet-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sheet-actions .primary-btn { flex: 1 1 auto; }
.sheet-actions .ghost-btn { flex: 0 0 auto; }

/* ---------------- tasks ---------------- */

#view-tasks, #view-files { padding: 16px 14px calc(20px + var(--safe-b)); gap: 14px; }

.task-list { display: flex; flex-direction: column; gap: 10px; }

.task-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.task-card.running { border-color: var(--violet-dim); }

.task-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.task-objective { font-size: 13px; line-height: 1.4; }
.task-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }

.task-status {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}
.task-status.running { background: rgba(139,108,255,.18); color: var(--violet); }
.task-status.done { background: rgba(79,214,160,.14); color: var(--ok); }
.task-status.failed { background: rgba(224,106,106,.14); color: var(--bad); }
.task-status.stopped { background: rgba(224,180,79,.14); color: var(--warn); }
.task-status.queued { background: rgba(141,135,163,.14); color: var(--muted); }

.task-actions { display: flex; gap: 8px; }
.task-actions button {
  flex: 1 1 auto;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}
.task-actions button.danger { color: var(--bad); }

.task-log {
  background: #0f0d16;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 10px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  max-height: 260px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.task-log .t-tool { color: var(--cyan); }
.task-log .t-finish { color: var(--ok); }
.task-log .t-error { color: var(--bad); }
.task-log .t-content { color: var(--text); }

/* ---------------- files ---------------- */

.file-path {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  color: var(--cyan);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 11px;
  word-break: break-all;
}

.file-list { display: flex; flex-direction: column; gap: 4px; }

.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 13px;
}
.file-row:active { background: var(--panel-2); }
.file-row .f-ico { flex: 0 0 auto; width: 16px; text-align: center; color: var(--violet); }
.file-row .f-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .f-size { flex: 0 0 auto; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.file-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px;
}
.file-editor-head { display: flex; align-items: center; gap: 8px; }
.file-editor-name {
  flex: 1 1 auto;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  color: var(--cyan);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#file-content {
  width: 100%;
  min-height: 320px;
  resize: vertical;
  padding: 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #0f0d16;
  color: var(--text);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  outline: none;
}
#file-content:focus { border-color: var(--violet-dim); }

/* ---------------- tabs ---------------- */

#tabs {
  flex: 0 0 auto;
  display: flex;
  border-top: 1px solid var(--line);
  background: #17141f;
  padding-bottom: var(--safe-b);
}
.tab {
  flex: 1 1 0;
  background: none;
  border: 0;
  color: var(--muted);
  padding: 9px 0 10px;
  font-size: 10.5px;
  letter-spacing: .4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}
.tab-ico { font-size: 17px; line-height: 1; }
.tab.active { color: var(--violet); }

/* ---------------- toast ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(78px + var(--safe-b));
  transform: translateX(-50%);
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12.5px;
  padding: 9px 15px;
  border-radius: 999px;
  max-width: 88vw;
  text-align: center;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.toast.bad { border-color: #4a2a2a; color: var(--bad); }
