:root {
  --rose: #d94f66;
  --rose-deep: #b93a52;
  --rose-soft: #fdeef0;
  --ink: #2f2a2b;
  --muted: #8d8385;
  --line: #f0e4e1;
  --bg: #fdf8f6;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 28px rgba(176, 92, 105, 0.08);
  --max: 680px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(253, 248, 246, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand { display: flex; align-items: center; gap: 8px; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e8687c, #d13c56);
  color: #fff;
  font-size: 12px;
  letter-spacing: 1px;
  font-weight: 600;
}

.brand-text { font-size: 16px; font-weight: 600; letter-spacing: 0.5px; }

.topnav { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.topnav a { color: var(--muted); }
.topnav a.is-active { color: var(--ink); font-weight: 600; }
.topnav-login {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--rose);
  color: #fff !important;
}

.avatar-link { display: block; }
.avatar-link img, .avatar-fallback {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rose-soft);
  color: var(--rose-deep);
  font-size: 13px;
}

.page { max-width: var(--max); margin: 0 auto; padding: 18px 18px 96px; }

.flash {
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  background: #eef7f0;
  color: #2f7a4c;
  border: 1px solid #d9ecdf;
}
.flash-err { background: #fdeeee; color: #b23b4c; border-color: #f6dada; }

.muted { color: var(--muted); font-size: 13px; }

/* 首页头部 */
.hero {
  padding: 20px 20px 16px;
  border-radius: 20px;
  background: linear-gradient(160deg, #fff5f2 0%, #ffeef0 60%, #fde8ec 100%);
  border: 1px solid #f8e2e2;
  margin-bottom: 16px;
}

.hero-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--rose-deep);
}

.hero-title {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.4;
  font-weight: 600;
}

.hero-sub { margin: 0; font-size: 13px; color: var(--muted); }
.hero-sub strong { color: var(--rose-deep); font-size: 16px; }

.school-form { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.school-label { font-size: 12px; color: var(--muted); }
.school-form select {
  flex: 1;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #f0dada;
  background: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

/* 分类 */
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.tab.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* 盲盒 */
.blindbox {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.blindbox-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.blindbox-title { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.blindbox-new {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--rose-soft);
  color: var(--rose-deep);
  font-size: 10px;
  letter-spacing: 1px;
  vertical-align: middle;
}
.blindbox-desc { margin: 0; font-size: 13px; color: var(--muted); }
.blindbox-left { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.blindbox-left strong { color: var(--rose-deep); }

.blindbox-btn {
  flex: 0 0 auto;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-size: 14px;
}
.blindbox-btn[disabled] { background: #e6d9db; color: #a99b9d; cursor: not-allowed; }

.blindbox-result {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: var(--rose-soft);
  border: 1px dashed #f2cdd4;
}
.blindbox-result .bb-route { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.blindbox-result .bb-text { margin: 0 0 10px; font-size: 19px; line-height: 1.5; }
.blindbox-result .bb-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); }
.blindbox-result .bb-foot a { color: var(--rose-deep); }

/* 列表 */
.section { margin-top: 6px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 12px; }
.section-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.section-count { font-size: 12px; color: var(--muted); font-weight: normal; margin-left: 6px; }

.card-list { display: flex; flex-direction: column; gap: 14px; }

.card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.card-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.anon-badge {
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--rose-soft);
  color: var(--rose-deep);
  font-size: 11px;
}
.card-nick { color: var(--ink); font-weight: 500; }
.card-time { margin-left: auto; }

.card-route {
  margin: 8px 0 6px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.card-text { margin: 0; font-size: 15px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.card-text-full { margin: 6px 0 12px; }
.card-link { display: block; }

.card-media {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
  position: relative;
}
.card-media .media-item {
  position: relative;
  padding-top: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: #f7f1f1;
}
.card-media .media-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-media-multi .media-item:first-child { grid-column: span 3; padding-top: 56.25%; }
.card-detail .card-media { grid-template-columns: repeat(3, 1fr); }
.card-detail .card-media .media-item:first-child { grid-column: span 3; padding-top: 66%; }
.media-more {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 11px;
}

.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: #f7ebec;
  color: var(--rose-deep);
  font-size: 11px;
}
.tag-unrequited { background: #fdeef2; color: #b4465e; }
.tag-confess { background: #fff2e6; color: #b9712f; }
.tag-graduation { background: #eef3fa; color: #3f638f; }
.tag-library { background: #f1f4ec; color: #5c7a45; }

.card-actions { display: flex; align-items: center; gap: 16px; }
.act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
}
.act.is-on { color: var(--rose); }
.act-icon { font-size: 15px; line-height: 1; }
.act-like.is-on .act-icon { color: var(--rose); }

/* 分页 */
.pager { display: flex; justify-content: center; gap: 8px; margin: 22px 0 6px; flex-wrap: wrap; }
.pager-item {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.pager-item.is-active { background: var(--rose); border-color: var(--rose); color: #fff; }
.pager-dot { color: var(--muted); }

.empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.empty-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-size: 14px;
}

/* 详情 */
.detail .card { box-shadow: none; }
.detail-meta { margin: 10px 4px 0; font-size: 12px; color: var(--muted); }

.comments { margin-top: 22px; }
.comment-list { display: flex; flex-direction: column; gap: 10px; }
.comment {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
}
.comment-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.comment-nick { color: var(--ink); font-weight: 500; }
.comment-text { margin: 0; font-size: 14px; }
.comment-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 18px 0; }

.comment-form { margin-top: 16px; }
.comment-form textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  resize: vertical;
  font-size: 14px;
}
.comment-form-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.comment-gate {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px dashed var(--line);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* 表单 */
.form { display: flex; flex-direction: column; gap: 16px; }
.block { min-width: 0; width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 14px 14px 16px; margin: 0; }
.block legend { padding: 0 6px; font-size: 13px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.field-label { font-size: 12px; color: var(--muted); }
.field input[type="text"], .field textarea, .field select {
  min-width: 0; max-width: 100%;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
}
.field textarea { resize: vertical; }
.field-hint { font-size: 12px; color: var(--muted); align-self: flex-end; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; }

.switch-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }

.cat-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cat-option input { position: absolute; opacity: 0; pointer-events: none; }
.cat-option span {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.cat-option input:checked + span { background: var(--rose-soft); border-color: #f0c9d2; color: var(--rose-deep); }

.uploader { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.uploader-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  color: var(--ink);
}
.uploader-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.preview-item { position: relative; width: 88px; height: 88px; border-radius: 10px; overflow: hidden; background: #f7f1f1; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
}
.preview-loading { display: flex; align-items: center; justify-content: center; width: 88px; height: 88px; border-radius: 10px; background: #f7f1f1; font-size: 12px; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  color: var(--ink);
}
.btn-primary { background: var(--rose); border-color: var(--rose); color: #fff; }
.btn-primary:hover { background: var(--rose-deep); }
.btn-block { width: 100%; }
.btn-small { padding: 6px 14px; font-size: 13px; border-radius: 10px; }
.form-tip { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }

.compose-head h1 { margin: 0 0 4px; font-size: 20px; font-weight: 600; }
.compose-head { margin-bottom: 14px; }

/* 登录 */
.auth { padding: 24px 18px; }
.auth-title { margin: 0 0 6px; font-size: 22px; font-weight: 600; }
.auth-sub { margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.auth-list { display: flex; flex-direction: column; gap: 10px; }
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 14px;
}
.auth-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); }
.auth-qq .auth-dot { background: #12b7f5; }
.auth-wx .auth-dot { background: #07c160; }
.auth-gitee .auth-dot { background: #c71d23; }
.auth-github .auth-dot { background: #24292f; }
.auth-tip { margin-top: 18px; font-size: 12px; color: var(--muted); line-height: 1.7; }

.notice {
  padding: 14px;
  border-radius: 12px;
  background: #fff7e8;
  border: 1px solid #f6e3bd;
  font-size: 13px;
  color: #8a6a2f;
  margin-bottom: 14px;
}
.notice-soft { background: #f5f8fb; border-color: #e2ebf3; color: #46617c; }
.notice-code {
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px dashed #e6d3aa;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  word-break: break-all;
}

/* 面板 */
.panel {
  padding: 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-head h1 { margin: 0; font-size: 19px; font-weight: 600; }
.panel-sub { margin: 8px 0 16px; font-size: 13px; color: var(--muted); }

.status-pill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: #f4efef;
  color: #7c7173;
}
.status-2 { background: #eaf6ee; color: #2f7a4c; }
.status-1 { background: #fff5e6; color: #a9752a; }
.status-3 { background: #fdeeee; color: #b23b4c; }
.status-post-1 { background: #eaf6ee; color: #2f7a4c; }
.status-post-0 { background: #fff5e6; color: #a9752a; }
.status-post-2 { background: #fdeeee; color: #b23b4c; }

.verified-box { padding: 12px 14px; border-radius: 12px; background: #f4faf5; border: 1px solid #dcefe2; font-size: 14px; }

/* 我的 */
.me-head { display: flex; align-items: center; gap: 14px; }
.me-avatar { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; }
.me-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rose-soft);
  color: var(--rose-deep);
  font-size: 20px;
}
.me-info { flex: 1; }
.me-info h1 { margin: 0; font-size: 18px; font-weight: 600; }
.me-info p { margin: 2px 0 0; }
.me-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.me-action {
  padding: 8px 16px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
}
.me-logout { margin: 0; }
.me-action-quiet { color: var(--muted); }

.mine-list { display: flex; flex-direction: column; gap: 10px; }
.mine-item { display: block; padding: 13px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.mine-item-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.mine-item-text { margin: 6px 0 0; font-size: 14px; }
.mine-item-note { margin: 6px 0 0; font-size: 12px; color: #b23b4c; }

/* 底部 */
.footer { max-width: var(--max); margin: 0 auto; padding: 10px 18px 40px; text-align: center; color: var(--muted); font-size: 12px; }
.footer p { margin: 4px 0; }
.footer-fine { opacity: 0.75; }

.fab {
  position: fixed;
  right: max(18px, calc(50vw - 340px + 18px));
  bottom: 22px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--rose);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(201, 84, 104, 0.28);
  z-index: 40;
}

@media (max-width: 420px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .topnav { gap: 10px; font-size: 13px; }
  .brand-text { font-size: 15px; }
  .avatar-link img, .avatar-fallback { width: 28px; height: 28px; }
  .hero-title { font-size: 20px; }
  .card-media-multi .media-item:first-child { padding-top: 62%; }
}
