:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #1c1917;
  --text-muted: #78716c;
  --border: #e7e5e4;
  --accent: #d97706;
  --accent-hover: #b45309;
  --danger: #dc2626;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16140f;
    --surface: #201d17;
    --text: #f5f3ef;
    --text-muted: #a8a29e;
    --border: #362f24;
    --accent: #f59e0b;
    --accent-hover: #fbbf24;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

header.site {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}

header.site a {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

h1 { font-size: 1.6rem; margin: 0 0 8px; }
h2 { font-size: 1.2rem; margin: 24px 0 8px; }

p { color: var(--text-muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

label {
  display: block;
  font-weight: 600;
  margin: 16px 0 6px;
  font-size: 0.9rem;
}

input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

textarea { min-height: 100px; resize: vertical; }

.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

.btn {
  display: inline-block;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #1c1917;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.btn:hover { background: var(--accent-hover); }
.btn.secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn.danger { background: var(--danger); color: #fff; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

.meta { color: var(--text-muted); font-size: 0.95rem; margin: 4px 0; }
.meta strong { color: var(--text); }

.error { color: var(--danger); font-size: 0.9rem; margin-top: 8px; }

.admin-banner {
  background: #fef3c7;
  color: #78350f;
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

@media (prefers-color-scheme: dark) {
  .admin-banner { background: #451a03; color: #fde68a; border-color: #78350f; }
}

.share-link {
  display: flex;
  gap: 8px;
  align-items: center;
}

.share-link input {
  flex: 1;
  font-size: 0.85rem;
}

img.cover {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 16px;
  max-height: 320px;
  object-fit: cover;
}
