* { box-sizing: border-box; }
:root { --bg: #f6f7f9; --text: #1a1a1a; --muted: #8a8f98; --line: #e8eaed; --card: #ffffff; --accent: #576b95; --accent2: #7c8db0; --shadow: 0 2px 12px rgba(0,0,0,.06); }
[data-theme="dark"] { --bg: #0f1115; --text: #e6e8eb; --muted: #9aa0a8; --line: #22262e; --card: #171a20; --accent: #9db4d8; --accent2: #8a9bb8; --shadow: 0 2px 12px rgba(0,0,0,.35); }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea { font-family: inherit; font-size: 16px; }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px 70px; }
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: nowrap; padding: 12px 0; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.topbar nav { display: flex; gap: 22px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar nav a { font-size: 14px; font-weight: 600; color: var(--text); }
.topbar > span { display: flex; gap: 14px; flex: none; white-space: nowrap; }
.topbar nav a:hover { color: var(--accent); }
.topbar button { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: 5px 12px; }
header.site { margin: 16px 0 0; }
.hero { position: relative; min-height: 220px; border-radius: 18px; overflow: hidden; background: linear-gradient(135deg, #1f2a44, #576b95); box-shadow: var(--shadow); }
.hero .cover { width: 100%; height: 240px; object-fit: cover; display: block; }
.hero-body { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; padding: 40px 18px 16px; background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0)); }
.hero-text { color: #fff; min-width: 0; }
.hero-text h1 { font-size: 28px; line-height: 1.2; margin: 0 0 4px; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.hero-sub { font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.85); text-shadow: 0 1px 6px rgba(0,0,0,.3); }
.hero-sub #nickname:empty + .dot { display: none; }
.hero .stats { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; color: rgba(255,255,255,.85); }
.hero .stats b { color: #fff; font-size: 15px; font-weight: 700; }
.hero-body > img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(255,255,255,.9); background: rgba(255,255,255,.2); flex: none; box-shadow: 0 2px 12px rgba(0,0,0,.3); }
.tags { display: flex; gap: 8px; padding: 14px 0 4px; overflow-x: auto; scrollbar-width: none; }
.tags::-webkit-scrollbar { display: none; }
.tags button { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: 6px 14px; font-size: 13px; box-shadow: var(--shadow); }
.tags button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.memo { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-wrap: wrap; gap: 12px; padding: 16px; margin-top: 14px; cursor: pointer; transition: transform .15s ease; }
.memo > .comments { flex-basis: 100%; }
.memo:active { transform: scale(.99); }
.memo .avatar img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.memo .name { color: var(--accent); font-size: 14px; font-weight: 600; }
.memo .date { color: var(--muted); font-size: 12px; margin-left: 8px; }
.memo .body { font-size: 15px; line-height: 1.75; word-break: break-word; margin-top: 4px; }
.memo .body img { max-width: 100%; }
.memo .imgs { display: grid; gap: 6px; margin-top: 10px; }
.memo .imgs.n1 { grid-template-columns: 1fr; }
.memo .imgs.n2 { grid-template-columns: 1fr 1fr; }
.memo .imgs.n3 { grid-template-columns: 1fr 1fr 1fr; }
.memo .imgs img, .memo .imgs video { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; aspect-ratio: 4/3; cursor: zoom-in; }
.memo .imgs.n1 img, .memo .imgs.n1 video { aspect-ratio: 16/9; }
.memo .mtags { margin-top: 10px; }
.memo .mtags span { display: inline-block; background: var(--bg); color: var(--accent); border-radius: 999px; padding: 3px 10px; font-size: 12px; margin-right: 6px; }
.memo .meta { color: var(--muted); font-size: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; gap: 14px; }
.memo .comments { margin-top: 10px; background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.7; }
.memo .comments div { padding: 2px 0; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 10px; display: flex; gap: 10px; background: var(--bg); }
.card img { width: 56px; height: 76px; object-fit: cover; border-radius: 8px; }
.note { color: var(--muted); font-size: 12px; padding: 16px 0; text-align: center; }
.back { display: inline-block; margin: 16px 0 0; color: var(--accent); cursor: pointer; font-weight: 600; }
#toTop { position: fixed; right: 18px; bottom: 18px; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 50%; width: 46px; height: 46px; font-size: 18px; box-shadow: var(--shadow); }
#lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
#lightbox img { max-width: 100%; max-height: 90vh; border-radius: 10px; }
#lightbox.open { display: flex; }
.badge { display: inline-block; background: #f5c518; color: #333; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; }
.meta { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 0; }
.meta span { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 4px; }
.meta svg { width: 20px; height: 20px; vertical-align: middle; }
.meta span.ok { color: var(--accent); }
