:root {
  --background: oklch(0.955 0.018 85);
  --foreground: oklch(0.25 0.02 50);
  --card: oklch(0.985 0.012 90);
  --primary: oklch(0.52 0.16 42);
  --primary-foreground: oklch(0.985 0.01 90);
  --secondary: oklch(0.93 0.02 80);
  --muted: oklch(0.48 0.03 55);
  --line: oklch(0.86 0.022 75);
  --danger: oklch(0.55 0.18 25);
  --shadow: 0 20px 50px -36px rgba(60, 30, 10, 0.8);
  color-scheme: light;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  background: var(--background);
  color: var(--foreground);
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
a { color: inherit; }

.wrap {
  width: min(64rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.top {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.kicker {
  margin: 0;
  color: var(--primary);
  letter-spacing: 0.18em;
  font-size: 0.875rem;
}
h1, h2 { font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "Palatino Linotype", "WenQuanYi Micro Hei", serif; font-weight: 500; }
h1 { margin: 0.4rem 0 0; font-size: clamp(2.6rem, 6vw, 3.6rem); }
.lead { max-width: 36rem; margin: 0.8rem 0 0; color: var(--muted); line-height: 1.7; }

.panel, .card, .empty, .error-box, details {
  background: color-mix(in oklab, var(--card) 80%, transparent);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}
.panel { padding: 1rem 1.1rem; }
.row { display: flex; flex-direction: column; gap: 0.75rem; }
input[type="text"] {
  width: 100%;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--card);
  padding: 0 0.9rem;
}
input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

.btn {
  height: 2.75rem;
  border: 0;
  border-radius: 0.7rem;
  padding: 0 1rem;
  background: var(--primary);
  color: var(--primary-foreground);
  cursor: pointer;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.ghost {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--line);
}
.btn.small { height: 2.4rem; font-size: 0.92rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.chips button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  cursor: pointer;
}

.note { min-height: 1.5rem; font-size: 0.92rem; }
.note .bad { color: var(--danger); margin: 0; }
.note .ok { color: var(--muted); margin: 0; }

.group { display: flex; flex-direction: column; gap: 1rem; }
.group-head, .card-foot, .actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between; }
h2 { margin: 0; font-size: 1.8rem; }
.sub { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.92rem; }
.grid { display: grid; gap: 1rem; }
.card { padding: 1rem 1.1rem 0.9rem; box-shadow: 0 16px 40px -28px rgba(60, 30, 10, 0.7); display: flex; flex-direction: column; gap: 0.8rem; }
.who { display: flex; gap: 0.75rem; align-items: flex-start; }
.avatar, .avatar-fallback {
  width: 2.75rem; height: 2.75rem; border-radius: 999px; object-fit: cover; flex: none;
}
.avatar { box-shadow: inset 0 0 0 1px var(--line); }
.avatar-fallback { display: grid; place-items: center; background: var(--secondary); font-family: "Songti SC", serif; }
.name { margin: 0; display: flex; gap: 0.45rem; align-items: center; min-width: 0; }
.name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { background: var(--secondary); border-radius: 999px; padding: 0.1rem 0.45rem; font-size: 0.78rem; flex: none; }
.full { margin: 0.1rem 0 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats, .when { color: var(--muted); margin: 0; }
.caption { white-space: pre-wrap; line-height: 1.75; margin: 0; }
.caption.quiet { color: var(--muted); }
.photos { display: grid; gap: 0.5rem; }
.photos img, video {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  border-radius: 0.7rem;
  background: var(--secondary);
}
video { display: block; width: auto; max-width: 100%; max-height: 520px; margin: 0 auto; background: #111; }
.warn { color: var(--primary); font-size: 0.9rem; margin: 0; }
.card-foot { color: var(--muted); font-size: 0.9rem; }
.inline { display: inline-flex; align-items: center; gap: 0.25rem; }
.empty, .error-box { padding: 2.2rem 1.2rem; text-align: center; border-style: dashed; box-shadow: none; }
details { padding: 0.8rem 1rem; box-shadow: none; }
summary { cursor: pointer; }
.foot { border-top: 1px solid var(--line); padding-top: 1rem; color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (min-width: 640px) {
  .top { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .row { flex-direction: row; }
  .row input { flex: 1; }
  .photos.multi { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: 1fr 1fr; }
}
