:root {
  --bg: #0b0b0c;
  --panel: #141416;
  --line: #2a2a2e;
  --text: #f5f5f4;
  --muted: #a8a29e;
  --accent: #e11d48;
  --accent-2: #fb7185;
  --like: #fb7185;
  --ok: #34d399;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(225, 29, 72, 0.18), transparent 55%),
    radial-gradient(700px 360px at 0% 100%, rgba(251, 113, 133, 0.08), transparent 50%),
    var(--bg);
  color: var(--text);
}
a { color: var(--accent-2); text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(560px, 100%); margin: 0 auto; min-height: 100vh; border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: rgba(20,20,22,.88); }
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; backdrop-filter: blur(12px);
  background: rgba(11,11,12,.82); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: .04em; }
.brand span { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(145deg, #e11d48, #9f1239); }
.brand svg { width: 18px; height: 18px; }
.top a.admin-link { color: var(--muted); font-size: 13px; }
.top a.admin-link:hover { color: var(--text); }

.feed { padding: 0 0 48px; }
.post { border-bottom: 1px solid var(--line); }
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #fb7185, #e11d48);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.who { font-weight: 650; font-size: 14px; }
.meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.post-image { width: 100%; height: auto; max-height: 85vh; object-fit: contain; display: block; background: #1c1917; }
.actions { display: flex; align-items: center; gap: 8px; padding: 10px 12px 0; }
.like-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px;
  border: 0; background: transparent; color: var(--text); padding: 0 6px;
  transition: color .2s ease, transform .15s ease;
}
.like-btn svg { width: 26px; height: 26px; }
.like-btn.on { color: var(--like); }
.like-btn:active { transform: scale(.94); }
.like-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 8px; }
.caption { padding: 8px 14px 18px; white-space: pre-wrap; line-height: 1.55; font-size: 14px; }
.caption .likes { font-weight: 700; margin-bottom: 6px; }
.source { color: var(--muted); font-size: 12px; margin-top: 8px; }
.empty, .loading { padding: 48px 20px; text-align: center; color: var(--muted); }
.note {
  margin: 14px; padding: 12px 14px; border-radius: 14px;
  background: #1c1917; border: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.5;
}

/* admin */
.admin-shell { width: min(1100px, calc(100% - 24px)); margin: 0 auto; padding: 24px 0 48px; }
.admin-shell h1 { margin: 0 0 6px; font-size: 28px; }
.admin-shell .sub { color: var(--muted); margin-bottom: 22px; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin-bottom: 16px;
}
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; min-height: 46px; border-radius: 12px; border: 1px solid var(--line);
  background: #0b0b0c; color: var(--text); padding: 0 12px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent; font-weight: 650;
}
.btn-primary { background: var(--accent); color: #fff; width: 100%; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn:hover { filter: brightness(1.05); }
.msg { min-height: 18px; color: #fb7185; font-size: 14px; margin-top: 10px; }
.msg.ok { color: var(--ok); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card {
  background: #0b0b0c; border: 1px solid var(--line); border-radius: 14px; padding: 16px;
}
.card .n { font-size: 28px; font-weight: 750; }
.card .l { color: var(--muted); font-size: 13px; margin-top: 4px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.hidden { display: none !important; }
@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr; }
  .shell { border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
