:root {
  --bg: #1a1721;
  --panel: #241f2e;
  --fg: #ece8f3;
  --muted: #9a8fb0;
  --accent: #8b5cf6;
  --accent-press: #6b46c1;
  --border: #372f47;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
}
h1 { font-size: 18px; margin: 0; }
section { padding: 16px; }
textarea, input[type="search"], input[type="password"] {
  width: 100%;
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font: inherit;
}
textarea { resize: vertical; }
.row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.row input { flex: 1; }
button {
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button:active { background: var(--accent-press); }
button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  font-weight: 400;
}
.status { color: var(--muted); font-size: 14px; }
#browse { border-top: 1px solid var(--border); }
ul#results { list-style: none; padding: 0; margin: 12px 0 0; }
ul#results li {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--panel);
}
ul#results li .path { color: var(--muted); font-size: 13px; }
ul#results li .snippet { font-size: 14px; margin-top: 4px; }
ul#results li button.open { background: transparent; color: var(--accent); padding: 0; font-weight: 600; }
#viewer { margin-top: 12px; }
#viewerBody { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px; overflow-wrap: anywhere; }
#viewerBody pre { overflow-x: auto; background: #15121c; padding: 10px; border-radius: 8px; }
#viewerBody code { font-family: ui-monospace, monospace; }
dialog { background: var(--panel); color: var(--fg); border: 1px solid var(--border); border-radius: 12px; }
dialog menu { display: flex; gap: 8px; justify-content: flex-end; padding: 0; margin: 16px 0 0; }
a { color: var(--accent); }
