:root {
  --bg: #0a0b10;
  --panel: #141721;
  --muted: #95a0b8;
  --text: #eff3ff;
  --line: rgba(255,255,255,.08);
  --accent: #6b8cff;
  --accent-2: #9f7aea;
  --success: #1f9d68;
  --error: #c53030;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, Arial, sans-serif;
  background: radial-gradient(circle at top, #1a1d2e, #0a0b10 60%);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 16px;
  font-size: 12px;
  line-height: 1.55;
}
.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 60px;
}
.hero {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 22px;
}
.brand-card, .card {
  background: rgba(20, 23, 33, .92);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,.28);
}
.brand-card h1, .topbar h1 { margin: 8px 0 10px; font-size: clamp(28px, 5vw, 46px); }
.brand-card p { max-width: 720px; color: var(--muted); font-size: 17px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(107,140,255,.35);
  background: rgba(107,140,255,.12);
  color: #dbe4ff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.auth-grid, .detail-grid, .inline-grid, .feed-grid, .post-media-grid {
  display: grid;
  gap: 20px;
}
.auth-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.inline-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.feed-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.detail-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: 22px; }
.post-media-grid { grid-template-columns: repeat(2, 1fr); }
.form-stack { display: grid; gap: 16px; }
label { display: grid; gap: 8px; color: #dbe4ff; font-size: 14px; }
input, textarea, select {
  width: 100%;
  background: rgba(255,255,255,.03);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
}
textarea { resize: vertical; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 20px;
}
.top-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.alert {
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}
.alert-success { background: rgba(31,157,104,.13); border-color: rgba(31,157,104,.35); }
.alert-error { background: rgba(197,48,48,.13); border-color: rgba(197,48,48,.35); }
.empty-state { text-align: center; }
.cover {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
}
.cover.tall { aspect-ratio: 3/4; }
.media-label, .meta { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.post-body { padding-top: 16px; display: grid; gap: 12px; }
.post-body h3, .card h2, .card h3 { margin: 0; }
.post-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.subcard { background: rgba(255,255,255,.02); }
.template-preview { max-height: 320px; overflow: auto; }
summary { cursor: pointer; color: #dbe4ff; }
@media (max-width: 760px) {
  .app-shell { width: min(100% - 20px, 1180px); }
  .topbar { align-items: start; flex-direction: column; }
  .post-media-grid { grid-template-columns: 1fr; }
}
