:root {
  --bg: #f7f7f7;
  --card: #ffffff;
  --text: #1f1f1f;
  --muted: #666;
  --border: #ddd;
  --link: #0b57d0;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.container {
  width: min(900px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}
.site-header a { color: var(--link); text-decoration: none; }
.card, .post {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.post h2, .post h1, .card h2 { margin-top: 0; }
.meta { color: var(--muted); font-size: 0.95rem; }
.post-preview { margin-top: 0.75rem; }
.admin-layout { display: grid; gap: 1rem; }
label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
input, textarea, button { font: inherit; }
input, textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
}
textarea {
  min-height: 420px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
button {
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  cursor: pointer;
}
.row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.hidden { display: none; }
.status {
  white-space: pre-wrap;
  background: #fafafa;
  border: 1px solid var(--border);
  padding: 0.75rem;
  border-radius: 8px;
  margin-top: 1rem;
}
code {
  background: #dedede;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}
.codeblock {
  background: #dedede;
  color: #f0f0f0;
  padding: 14px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
}

.inlinecode {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: Consolas, "Courier New", monospace;
}

blockquote {
  border-left: 4px solid #ccc;
  padding-left: 10px;
  color: #666;
  margin: 12px 0;
}

ul {
  margin: 8px 0 8px 20px;
}
.editor-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
  align-items: start;
}

.post-list-card,
.post-editor-card {
  margin-bottom: 0;
}

.post-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.post-list-item {
  width: 100%;
  text-align: left;
  background: white;
}

.post-list-item.active {
  border-color: #999;
  background: #f2f2f2;
}

.post-list-title {
  display: block;
  font-weight: 600;
}

.post-list-meta {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.compact-row {
  margin-top: 0;
}

.wrap {
  flex-wrap: wrap;
}

.help-box {
  margin-top: 1rem;
}

.help-content ul {
  margin-top: 0.5rem;
}

.codeblock {
  background: #1e1e1e;
  color: #e8e8e8;
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  line-height: 1.45;
}

.codeblock code {
  background: transparent;
  padding: 0;
  color: inherit;
}

@media (max-width: 800px) {
  .editor-grid {
    grid-template-columns: 1fr;
  }
}