:root {
  color-scheme: dark;
  --workspace: #202124;
  --sidebar: #252629;
  --line: #37393d;
  --text: #d5d6d8;
  --quiet: #92969b;
  --button: #35383c;
  --button-hover: #42464b;
  font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }
body { height: 100vh; overflow: hidden; background: var(--workspace); color: var(--text); }
a { color: inherit; }
a:focus-visible { outline: 2px solid #aeb5bd; outline-offset: 3px; }

.topbar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
  background: #222326;
}

.wordmark { color: #c4c6c9; font-size: 13px; font-weight: 650; letter-spacing: .025em; text-decoration: none; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.availability { margin: 0; color: #a9adb1; font-size: 12px; }
.account-entry {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid #4a4d51;
  border-radius: 4px;
  background: var(--button);
  color: #e1e2e4;
  font-size: 12px;
  text-decoration: none;
}
.account-entry:hover:not([aria-disabled="true"]) { background: var(--button-hover); }
.account-entry[aria-disabled="true"] { color: #9da0a4; cursor: not-allowed; }

.workspace { height: calc(100vh - 48px); display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.file-sidebar { min-width: 0; padding: 17px 15px; border-right: 1px solid var(--line); background: var(--sidebar); }
.file-sidebar h1 { margin: 0; color: #aeb1b5; font-size: 12px; font-weight: 600; }
.editor { min-width: 0; min-height: 0; display: grid; place-items: center; background: var(--workspace); }
.editor-empty { margin: 0; padding: 20px; color: var(--quiet); font-size: 13px; text-align: center; }

@media (max-width: 600px) {
  body { height: 100dvh; }
  .topbar { padding: 0 12px; }
  .topbar-actions { gap: 9px; }
  .availability { font-size: 11px; }
  .account-entry { padding: 0 9px; }
  .workspace { height: calc(100dvh - 48px); grid-template-columns: minmax(88px, 27vw) minmax(0, 1fr); }
  .file-sidebar { padding: 15px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
