:root {
  --bg: #0a0614;
  --bg2: #170a2b;
  --ink: #f6f0ff;
  --muted: #a99bc4;
  --pink: #ff5c8a;
  --pink-soft: #ff8fb0;
  --gold: #ffc46b;
  --line: rgba(255, 255, 255, .10);
  --card: rgba(255, 255, 255, .045);
  --radius: 18px;
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(255, 92, 138, .22), transparent 60%),
    radial-gradient(800px 500px at 92% 0%, rgba(126, 87, 255, .20), transparent 55%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg2) 55%, #0a0614 100%);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--pink-soft); text-decoration: none; }
a:hover { color: var(--pink); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
header.top {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(10, 6, 20, .72);
  border-bottom: 1px solid var(--line);
}
.top .row { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { font-weight: 700; letter-spacing: .3px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.brand .heart { color: var(--pink); animation: beat 1.8s ease-in-out infinite; }
@keyframes beat { 0%,100%{transform:scale(1)} 12%{transform:scale(1.18)} 24%{transform:scale(1)} }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.top nav a {
  color: var(--muted); padding: 7px 12px; border-radius: 10px; font-size: 14px;
}
.top nav a:hover, .top nav a.active { color: var(--ink); background: rgba(255,255,255,.07); }

select.lang {
  appearance: none; background: rgba(255,255,255,.07); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; font-size: 13px;
  cursor: pointer; width: auto; flex: 0 0 auto;
}
select.lang option { background: #16082a; }
.top nav > * { flex: 0 0 auto; }
.top nav a, .top nav .who, .top nav .linkbtn { white-space: nowrap; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 74px 0 34px; position: relative; }
.hero h1 {
  margin: 0 0 12px; font-size: clamp(30px, 6vw, 52px); line-height: 1.2; letter-spacing: -.5px;
  background: linear-gradient(100deg, #fff 10%, var(--pink-soft) 55%, var(--gold) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 0 auto; max-width: 560px; color: var(--muted); font-size: clamp(14px, 2.4vw, 17px); }

.cta { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 12px 22px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s;
  color: #1a0713;
  background: linear-gradient(135deg, var(--pink-soft), var(--pink));
  box-shadow: 0 8px 24px rgba(255, 92, 138, .28);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(255, 92, 138, .38); }
.btn:active { transform: translateY(0); }
.btn.ghost {
  background: rgba(255,255,255,.06); color: var(--ink); border: 1px solid var(--line); box-shadow: none;
}
.btn.ghost:hover { background: rgba(255,255,255,.11); }
.btn.small { padding: 8px 14px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- wall ---------- */
.wall { padding: 26px 0 60px; }
.wall-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; }
.wall-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.wall-head span { color: var(--muted); font-size: 13px; }

.grid { columns: 3 300px; column-gap: 18px; }
@media (max-width: 760px) { .grid { columns: 1; } }

.note {
  break-inside: avoid; margin: 0 0 18px; padding: 20px 20px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  position: relative; overflow: hidden;
  transition: transform .18s ease, border-color .2s ease;
}
.note:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.2); }
.note::before {
  content: "“"; position: absolute; right: 14px; top: -18px; font-size: 76px;
  color: rgba(255,255,255,.05); font-family: Georgia, serif;
}
.note .to { font-size: 19px; font-weight: 700; margin: 0 0 2px; word-break: break-word; }
.note .to small { font-weight: 400; color: var(--muted); font-size: 13px; margin-right: 6px; }
.note .msg { margin: 10px 0 14px; font-size: 15px; color: #ede4ff; white-space: pre-wrap; word-break: break-word; }
.note .foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; row-gap: 4px; }
.note .from { margin-left: auto; color: var(--pink-soft); }

.note.pinned {
  border-color: rgba(255, 196, 107, .45);
  background: linear-gradient(180deg, rgba(255,196,107,.10), rgba(255,255,255,.04));
  box-shadow: 0 0 0 1px rgba(255,196,107,.12), 0 10px 30px rgba(255,196,107,.10);
}
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; letter-spacing: .4px;
  background: rgba(255,196,107,.16); color: var(--gold); border: 1px solid rgba(255,196,107,.35);
}

.empty {
  text-align: center; color: var(--muted); padding: 60px 0; border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- forms / cards ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; margin: 10px 0 40px;
}
.panel h2 { margin: 0 0 6px; font-size: 20px; }
.panel .sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=password], input[type=number], input[type=email], textarea, select {
  width: 100%; padding: 12px 14px; font-size: 15px; color: var(--ink);
  background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 12px;
  font-family: inherit; outline: none; transition: border-color .15s, background .15s;
}
input:focus, textarea:focus, select:focus {
  border-color: rgba(255,92,138,.55); background: rgba(255,255,255,.08);
}
textarea { min-height: 120px; resize: vertical; }
input[type=color] {
  width: 100%; height: 46px; padding: 4px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 12px;
}
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .row2 { grid-template-columns: 1fr; } }

.check {
  display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px;
  border: 1px solid rgba(255,196,107,.28); border-radius: 12px;
  background: rgba(255,196,107,.06);
}
.check input { margin-top: 4px; accent-color: var(--gold); }
.check b { color: var(--gold); }

.msg-box { margin-top: 14px; font-size: 14px; min-height: 20px; }
.msg-box.ok { color: #7ee2b8; }
.msg-box.err { color: #ff8b8b; }

/* ---------- modal ---------- */
.mask {
  position: fixed; inset: 0; z-index: 90; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(4, 2, 10, .78); backdrop-filter: blur(6px);
}
.mask.show { display: flex; }
.modal {
  width: 100%; max-width: 420px; background: #140a25; border: 1px solid var(--line);
  border-radius: 20px; padding: 26px; box-shadow: 0 30px 80px rgba(0,0,0,.6);
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: scale(.96); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.modal h3 { margin: 0 0 4px; font-size: 19px; }
.modal .amount { font-size: 30px; font-weight: 800; color: var(--gold); margin: 8px 0 2px; }
.qr { display: grid; place-items: center; padding: 14px; background: #fff; border-radius: 14px; margin: 16px 0; }
.qr img, .qr canvas { display: block; width: 210px; height: 210px; image-rendering: pixelated; }
.addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted);
  word-break: break-all; background: rgba(255,255,255,.05); padding: 10px 12px; border-radius: 10px;
}

/* ---------- 今日一句 ---------- */
.spotlight {
  position: relative; overflow: hidden; text-align: center;
  margin: 6px 0 34px; padding: 32px 26px 28px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 92, 138, .13), rgba(255, 196, 107, .05));
  border: 1px solid rgba(255, 196, 107, .30);
  box-shadow: 0 18px 50px rgba(255, 92, 138, .10);
}
.spotlight::before {
  content: "“"; position: absolute; left: 18px; top: -26px; font-size: 110px;
  font-family: Georgia, serif; color: rgba(255, 255, 255, .06); line-height: 1;
}
.spot-label {
  font-size: 11.5px; letter-spacing: 2.5px; color: var(--gold);
  text-transform: uppercase; font-weight: 700;
}
.spot-to { margin-top: 12px; font-size: 14px; color: var(--muted); }
.spot-to b { font-size: 21px; color: var(--ink); font-weight: 700; }
.spot-msg {
  margin: 14px auto 12px; max-width: 720px;
  font-size: clamp(17px, 2.8vw, 23px); line-height: 1.75; color: #fff;
  white-space: pre-wrap; word-break: break-word;
}
.spot-from { font-size: 13.5px; color: var(--pink-soft); display: inline-flex; align-items: center; gap: 7px; }

/* 几何头像（服务端生成的 identicon SVG） */
.av {
  width: 20px; height: 20px; border-radius: 6px;
  flex: 0 0 auto; vertical-align: -5px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset;
}
.note .from { display: inline-flex; align-items: center; gap: 6px; }
.note .from i, .spot-from i { font-style: normal; }
.cmt-head { align-items: center; }
.cmt-head .av { width: 18px; height: 18px; border-radius: 5px; }
@media (max-width: 620px) {
  .spotlight { padding: 24px 18px 20px; }
}

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: 13px; }
footer .row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
footer .row .sp { margin-left: auto; }

/* ---------- admin ---------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { color: var(--muted); font-weight: 500; font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag.ok { color: #7ee2b8; border-color: rgba(126,226,184,.35); }
.tag.pending { color: var(--gold); border-color: rgba(255,196,107,.35); }
.tag.bad { color: #ff8b8b; border-color: rgba(255,139,139,.35); }
.inline { display: inline; }
.inline button { background: none; border: 0; color: var(--pink-soft); cursor: pointer; font-size: 13px; padding: 2px 6px; }
.inline button:hover { color: var(--pink); }
.inline button.del { color: #ff8b8b; }

.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 10px; background: rgba(255,255,255,.05); color: var(--muted); font-size: 14px; }
.tabs a.active { background: rgba(255,92,138,.16); color: var(--ink); }

@media (max-width: 620px) {
  .top .row { height: 58px; gap: 10px; }
  .top nav a { padding: 6px 9px; font-size: 13px; }
  .hero { padding: 46px 0 24px; }
  .panel { padding: 18px; }
}

/* ---------- 账号 ---------- */
.top nav .who {
  color: var(--ink); font-size: 13.5px; padding: 6px 11px; border-radius: 10px;
  background: rgba(255,255,255,.06); max-width: 130px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.top nav a.mini { background: rgba(255,92,138,.16); color: var(--ink); }
.top nav a.mini.warn { background: rgba(255,196,107,.16); color: var(--gold); border: 1px solid rgba(255,196,107,.35); }
.linkbtn {
  background: none; border: 0; color: var(--muted); font-size: 13px;
  cursor: pointer; padding: 6px 8px; font-family: inherit;
}
.linkbtn:hover { color: var(--pink); }

/* ---------- 图片 ---------- */
.note-imgs { display: grid; gap: 6px; margin: 4px 0 14px; }
.note-imgs.n1 { grid-template-columns: 1fr; }
.note-imgs.n2 { grid-template-columns: 1fr 1fr; }
.note-imgs.n3 { grid-template-columns: 1fr 1fr 1fr; }
.note-imgs img {
  width: 100%; height: 100%; max-height: 240px; object-fit: cover;
  border-radius: 12px; display: block; border: 1px solid var(--line);
}
.note-imgs.n1 img { max-height: 430px; }

/* ---------- 互动 ---------- */
.act {
  display: inline-flex; align-items: center; gap: 5px; background: none; border: 0;
  color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer;
  padding: 3px 7px; border-radius: 8px; transition: color .15s, background .15s;
}
.act:hover { color: var(--ink); background: rgba(255,255,255,.07); }
.act.like.on { color: var(--pink); }
.act.like.on .ic { animation: beat .4s ease; }
.act.pin { color: var(--gold); }
.act .ic { font-size: 13px; line-height: 1; }
.act b { font-weight: 600; }

/* ---------- 上传 ---------- */
.img-prev { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumb {
  position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); display: grid; place-items: center;
  background: rgba(255,255,255,.04);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .rm {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 11px;
  cursor: pointer; line-height: 1; padding: 0;
}
.spin { color: var(--muted); font-size: 12px; }

/* ---------- 评论 ---------- */
.cmts { display: grid; gap: 12px; margin-top: 14px; }
.cmt {
  padding: 12px 14px; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
}
.cmt-head { display: flex; gap: 10px; align-items: baseline; font-size: 13px; }
.cmt-body { margin-top: 6px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }

.adm-thumbs { display: flex; gap: 5px; margin-top: 6px; }
.adm-thumbs img {
  width: 46px; height: 46px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line);
}


/* ---------------- 私信 ---------------- */
.wrap.narrow { max-width: 720px; }
.inbox { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.mrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,.035); border: 1px solid var(--line); text-decoration: none; color: inherit; }
.mrow:hover { background: rgba(255,255,255,.06); }
.mrow .mmeta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mrow .mmeta b { font-size: 14px; color: var(--text); }
.mrow .mmeta span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .mside { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.mrow time { font-size: 11.5px; color: var(--muted); }
.mdot { font-style: normal; font-size: 11px; background: var(--pink); color: #fff; border-radius: 999px; padding: 1px 7px; }
.thread-head { display: flex; align-items: center; gap: 9px; padding: 14px 0 12px; border-bottom: 1px solid var(--line); }
.thread-head .mback { color: var(--muted); text-decoration: none; font-size: 18px; }
.thread { display: flex; flex-direction: column; gap: 10px; padding: 18px 2px; max-height: 58vh; overflow-y: auto; }
.bub { max-width: 78%; align-self: flex-start; background: rgba(255,255,255,.06); border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px; padding: 9px 13px; }
.bub.me { align-self: flex-end; background: color-mix(in srgb, var(--pink) 22%, transparent);
  border-color: color-mix(in srgb, var(--pink) 38%, transparent); border-radius: 14px 14px 4px 14px; }
.bub .txt { font-size: 14px; line-height: 1.6; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.bub time { display: block; font-size: 10.5px; color: var(--muted); margin-top: 4px; text-align: right; }
.msg-form { display: flex; gap: 10px; align-items: flex-end; margin-top: 6px; }
.msg-form textarea { flex: 1; resize: none; background: rgba(0,0,0,.25); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14px; }
.msg-form textarea:focus { outline: none; border-color: color-mix(in srgb, var(--pink) 50%, transparent); }
a.who { color: inherit; text-decoration: none; }
a.who:hover { color: var(--pink-soft); }

#msg-badge { font-size: 11px; background: var(--pink); color: #fff; border-radius: 999px;
  padding: 0 6px; margin-left: 4px; vertical-align: 1px; }
#msg-badge[hidden] { display: none; }
.blockbtn { margin-left: auto; }
.act.rep { opacity: .5; font-size: 12px; padding: 0 2px; }
.act.rep:hover { opacity: 1; color: var(--pink); }
