:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --card: #fff;
  --text: #17181d;
  --muted: #747682;
  --line: #e9e9ee;
  --pink: #ed4772;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--bg); }
main { width: min(900px, 100%); margin: 0 auto; padding: 18px; }
.hero {
  padding: 44px 32px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 84% 12%, #ffd7e4, transparent 34%),
    linear-gradient(135deg, #fff, #fff7fa);
  box-shadow: 0 18px 60px #1d233510;
}
.brand { color: var(--pink); font-weight: 800; letter-spacing: .12em; }
h1 { max-width: 640px; margin: 16px 0 12px; font-size: clamp(32px, 7vw, 64px); line-height: 1.15; }
.hero p { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.actions a {
  padding: 12px 20px; border-radius: 24px; text-decoration: none; font-weight: 700;
}
.primary { color: #fff; background: var(--pink); }
.secondary { color: var(--pink); border: 1px solid #edb4c4; background: #fff; }
.version { margin-top: 18px; font-size: 12px; }
.community {
  margin-top: 14px; padding: 22px; border-radius: 24px; background: var(--card);
  box-shadow: 0 18px 60px #1d23350a;
}
.community header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.community header span { color: var(--pink); font-size: 11px; letter-spacing: .16em; }
.community h2 { margin: 5px 0; font-size: 32px; }
button { color: inherit; font: inherit; cursor: pointer; }
#profileButton { padding: 8px 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
#postForm { display: grid; gap: 10px; margin: 20px 0; }
textarea {
  min-height: 100px; resize: vertical; padding: 13px; border: 1px solid var(--line);
  border-radius: 14px; outline: 0; font: inherit;
}
#postForm button, #profileForm button[type="submit"] {
  justify-self: end; padding: 10px 18px; border: 0; border-radius: 20px;
  color: #fff; background: var(--pink); font-weight: 700;
}
.post { padding: 18px 0; border-top: 1px solid var(--line); }
.post-head { display: flex; align-items: center; gap: 10px; }
.avatar { display: grid; width: 42px; height: 42px; overflow: hidden; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #f6a3bb, #a8537a); place-items: center; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-meta { display: flex; flex-direction: column; gap: 2px; }
.post-meta strong { font-size: 13px; }
.post-meta span { color: var(--muted); font-size: 10px; }
.post-text { margin: 14px 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; }
.post-actions { display: flex; gap: 16px; }
.post-actions button { border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.post-actions button.liked { color: var(--pink); }
.comments { margin-top: 10px; padding: 10px; border-radius: 10px; background: #f7f7f9; }
.comment { margin: 6px 0; font-size: 12px; }
.comment strong { color: #656774; }
.comment-form { display: flex; gap: 7px; margin-top: 8px; }
.comment-form input { min-width: 0; flex: 1; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 18px; }
.comment-form button { padding: 0 12px; border: 0; border-radius: 17px; color: #fff; background: var(--pink); }
.empty { padding: 40px; color: var(--muted); text-align: center; }
dialog { width: min(420px, calc(100% - 28px)); border: 0; border-radius: 18px; padding: 22px; }
dialog::backdrop { background: #0008; }
#profileForm { display: grid; gap: 12px; }
#profileForm label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
#profileForm input { height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; font: inherit; }
#profileForm div { display: flex; justify-content: flex-end; gap: 12px; }
.site-footer {
  display: flex;
  width: min(900px, 100%);
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin: 0 auto;
  padding: 8px 18px 28px;
  color: var(--muted);
  font-size: 11px;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--pink); text-decoration: underline; }
