/* Design tokens */
:root {
  --bg: #f0ede8;
  --surface: #ffffff;
  --border: #e0dbd4;
  --text: #1a1a1a;
  --muted: #888;
  --accent: #2563eb;
  --radius: 12px;
  --font: system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* Header */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: .75rem 1.5rem;
}
.site-title {
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -.01em;
}

/* Layout */
main {
  max-width: 640px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Add form */
.add-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 2rem;
}
.add-form form {
  display: flex;
  gap: .5rem;
}
.add-form input {
  flex: 1;
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: .95rem;
  background: var(--bg);
}
.add-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.add-form button {
  padding: .5rem 1.1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font: inherit;
  font-size: .95rem;
  cursor: pointer;
  white-space: nowrap;
}
.add-form button:disabled {
  opacity: .6;
  cursor: default;
}
.error {
  color: #c0392b;
  font-size: .9rem;
  margin-bottom: .75rem;
}
.form-hint {
  margin-top: .6rem;
  font-size: .8rem;
  color: var(--muted);
}
.form-hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .05rem .3rem;
}

/* Feed */
.feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Post header */
.post-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border);
}
.post-byline {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .875rem;
}
.handle { font-weight: 600; }
.sep, .platform { color: var(--muted); }
.post-date {
  margin-left: auto;
  font-size: .8rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Media */
.post-media img,
.post-media video {
  display: block;
  width: 100%;
  max-height: 540px;
  object-fit: contain;
  background: #111;
}

/* Caption */
.caption {
  padding: .75rem 1rem;
  font-size: .9rem;
  line-height: 1.55;
  white-space: pre-line;
}

/* Badge */
.post-badge {
  display: inline-block;
  margin: 0 1rem .75rem;
  font-size: .75rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .15rem .6rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Empty state */
.empty-state {
  text-align: center;
  color: var(--muted);
  margin-top: 4rem;
  font-size: .95rem;
}
