:root {
  --bg: #fff; --fg: #1d1d1f; --muted: #6e6e73; --line: #e5e5ea; --side: #f5f5f7;
  --accent: #1a73e8; --danger: #c5221f; --notice: #fff4e5;
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1c1c1e; --fg: #f2f2f7; --muted: #98989d; --line: #38383a; --side: #2c2c2e; --notice: #3a2e1a; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); }
a { color: var(--accent); text-decoration: none; }
button, .button, input, select, textarea { font: inherit; color: inherit; }
button, .button {
  border: 1px solid var(--line); background: var(--bg); border-radius: 6px; padding: 4px 10px; cursor: pointer;
  white-space: nowrap;
}
button.accent, .button.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--danger); }
button.link { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
input, select, textarea { border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; background: var(--bg); }

.shell { display: flex; min-height: 100vh; }
.sidebar { width: 220px; flex: none; background: var(--side); padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; }
.sidebar a { color: var(--fg); padding: 4px 8px; border-radius: 6px; display: block; }
.sidebar a.active { background: var(--line); }
.sidebar .group { margin-top: 12px; }
.sidebar .nested a { padding-left: 20px; }
.content { flex: 1; padding: 20px 32px; max-width: 820px; }
h1 { font-size: 26px; margin: 0 0 12px; }
h2 { font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin: 20px 0 4px; }
.list { list-style: none; margin: 0; padding: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.row .title { flex: 1; }
.row .meta { color: var(--muted); font-size: 13px; }
.row.project .dot { color: var(--accent); }
.row .source { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.badge { border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; color: var(--muted); font-size: 12px; }
.editor { flex-basis: 100%; display: flex; flex-direction: column; gap: 8px; padding: 8px 0 8px 26px; }
.editor .wide, .editor textarea { width: 100%; }
.editor .line { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.empty { color: var(--muted); }
.notice { background: var(--notice); border-radius: 6px; padding: 8px 12px; margin-bottom: 12px; display: flex; gap: 10px; align-items: center; }
.sessions { border-collapse: collapse; width: 100%; margin-bottom: 16px; }
.sessions th, .sessions td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.sessions tr.warn td { color: var(--danger); }
.line { display: flex; gap: 12px; }
.signin { max-width: 320px; margin: 18vh auto; text-align: center; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 640px) {
  .shell { flex-direction: column; }
  .sidebar { width: auto; flex-direction: row; flex-wrap: wrap; }
  .content { padding: 16px; }
}
