* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Helvetica Neue", Helvetica, Tahoma, "PingFang SC", "Microsoft YaHei", sans-serif;
  word-wrap: break-word;
}

:root {
  --accent: #ff5e7d;
  --green: #3cc51f;
  --text: #555;
  --muted: #999;
  --faint: #bbb;
  --line: #eeeeee;
}

html {
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: #fff;
  color: var(--text);
  font-size: 14px;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color .15s ease;
}

a:hover {
  color: var(--accent);
}

/* ---------- header ---------- */
.header {
  margin: 58px auto 0;
  text-align: center;
}

.site-mark {
  color: #c3c3c3;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 2px;
  line-height: 1.2;
}

.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
  margin-top: 34px;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  width: 23px;
  height: 23px;
  color: #a5a5a5;
  align-items: center;
  justify-content: center;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
}

.site-nav a svg {
  width: 21px;
  height: 21px;
}

/* tooltips */
.atips {
  position: relative;
}

.atips::after {
  content: attr(data-tips);
  position: absolute;
  left: 50%;
  top: -40px;
  transform: translate(-50%, 4px);
  padding: 0 10px;
  height: 28px;
  line-height: 28px;
  border-radius: 5px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 30;
}

.atips::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -13px;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, .72);
  opacity: 0;
  transition: opacity .15s ease;
  z-index: 30;
}

.atips:hover::after,
.atips:hover::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

.atips:hover::before {
  transform: translateX(-50%);
}

/* ---------- layout ---------- */
.container {
  width: 700px;
  max-width: calc(100% - 40px);
  margin: 50px auto 0;
}

/* ---------- article list ---------- */
.list-heading {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 10px;
}

.list-hint {
  font-size: 12px;
  color: var(--faint);
  margin-bottom: 18px;
}

.post-list {
  border-top: 1px dashed var(--line);
}

.post-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  border-bottom: 1px dashed var(--line);
}

.post-title {
  flex: 1;
  min-width: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 44px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-title a {
  color: #666;
}

.post-title a:hover {
  color: var(--accent);
}

.post-title em {
  display: inline-block;
  height: 20px;
  line-height: 20px;
  padding: 0 8px;
  margin-right: 8px;
  border-radius: 10px;
  font-size: 12px;
  font-style: normal;
  vertical-align: 2px;
}

.post-title .cat {
  background: #f4f4f4;
  color: #999;
}

.post-title .pin {
  background: #ffeef3;
  color: var(--accent);
}

.post-date {
  flex: none;
  color: var(--faint);
  font-size: 12px;
}

.empty {
  padding: 60px 0;
  text-align: center;
  color: var(--faint);
  font-size: 13px;
  border-bottom: 1px dashed var(--line);
}

/* ---------- pagination ---------- */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 34px 0 10px;
}

.pager-btn,
.pager-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid #ebebeb;
  border-radius: 4px;
  font-size: 12px;
  color: #888;
  background: #fff;
}

.pager-btn:hover,
.pager-num:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pager-num.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pager-btn.disabled {
  color: #ccc;
  border-color: #f1f1f1;
  pointer-events: none;
}

/* ---------- post detail ---------- */
.detail-head {
  position: relative;
  padding-right: 260px;
  min-height: 38px;
}

.detail-title {
  font-size: 21px;
  font-weight: 400;
  line-height: 32px;
  color: #444;
}

.detail-actions {
  position: absolute;
  right: 0;
  top: 1px;
  display: flex;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.pill svg {
  width: 14px;
  height: 14px;
}

.pill.ghost {
  background: #f4f4f4;
  color: #888;
}

.pill.ghost:hover {
  background: var(--accent);
  color: #fff;
}

.pill.green {
  background: var(--green);
  color: #fff;
}

.pill.green:hover {
  background: #33ab1a;
  color: #fff;
}

.wx-plane {
  display: none;
  position: absolute;
  right: 0;
  top: 42px;
  width: 126px;
  padding: 8px 8px 6px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
  text-align: center;
  font-size: 11px;
  color: var(--faint);
  z-index: 20;
}

.wx-plane.open {
  display: block;
}

.wx-plane img {
  width: 110px;
  height: 110px;
  display: block;
  margin: 0 auto 4px;
}

.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--faint);
}

.detail-meta a {
  color: var(--faint);
}

.detail-meta a:hover {
  color: var(--accent);
}

.detail-meta .dot {
  color: #ddd;
}

.mobile-back,
.meta-action {
  display: none;
}

/* ---------- content ---------- */
.content {
  margin-top: 26px;
  font-size: 14px;
  line-height: 26px;
  color: #333;
}

.content p {
  margin: 12px 0;
}

.content h1,
.content h2,
.content h3,
.content h4,
.content h5 {
  margin: 28px 0 12px;
  font-weight: 600;
  line-height: 1.45;
  color: #333;
}

.content h1 {
  font-size: 24px;
}

.content h2 {
  font-size: 20px;
}

.content h3 {
  font-size: 17px;
}

.content h4 {
  font-size: 15px;
}

.content a {
  color: var(--accent);
}

.content a:hover {
  text-decoration: underline;
}

.content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  margin: 16px auto;
}

.content ul,
.content ol {
  margin: 12px 0;
  padding-left: 24px;
}

.content li {
  margin: 5px 0;
}

.content blockquote {
  margin: 16px 0;
  padding: 10px 18px;
  border-left: 3px solid #ffd3dd;
  background: #fdf8f9;
  color: #888;
}

.content blockquote p {
  margin: 4px 0;
}

.content code {
  padding: 1px 5px;
  border-radius: 3px;
  background: #f5f5f5;
  color: #c7254e;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

.content pre {
  margin: 16px 0;
  padding: 14px 16px;
  background: #f6f8fa;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.7;
}

.content pre code {
  display: block;
  padding: 0;
  background: transparent;
  color: #444;
  font-size: 13px;
}

.content table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 13px;
}

.content th,
.content td {
  border: 1px solid #eee;
  padding: 8px 10px;
  text-align: left;
}

.content th {
  background: #fafafa;
  font-weight: 600;
}

.content hr {
  border: 0;
  border-top: 1px dashed var(--line);
  margin: 26px 0;
}

/* ---------- tags ---------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.tag {
  display: inline-block;
  padding: 0 10px;
  height: 24px;
  line-height: 22px;
  border: 1px solid #eee;
  border-radius: 12px;
  font-size: 12px;
  color: #999;
  background: #fff;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.read-num {
  margin-top: 24px;
  font-size: 12px;
  color: var(--faint);
}

.read-num b {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- prev / next ---------- */
.prev-next {
  margin-top: 30px;
  border-top: 1px dashed var(--line);
}

.prev-next a {
  display: block;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prev-next a span {
  display: inline-block;
  margin-right: 10px;
  color: var(--faint);
  font-size: 12px;
}

.prev-next a:hover {
  color: var(--accent);
}

/* ---------- archive ---------- */
.archive-year {
  margin-bottom: 34px;
}

.archive-title {
  font-size: 18px;
  font-weight: 400;
  color: #666;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.archive-title small {
  margin-left: 10px;
  font-size: 12px;
  color: var(--faint);
}

.archive-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 38px;
  border-bottom: 1px dashed #f4f4f4;
}

.archive-row time {
  flex: none;
  width: 44px;
  color: var(--faint);
  font-size: 12px;
}

.archive-row a {
  flex: 1;
  min-width: 0;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}

.archive-row a:hover {
  color: var(--accent);
}

/* ---------- about ---------- */
.about-content {
  font-size: 14px;
  line-height: 26px;
  color: #444;
}

.about-content p {
  margin: 12px 0;
}

.about-content blockquote {
  margin: 16px 0;
  padding: 10px 18px;
  border-left: 3px solid #ffd3dd;
  background: #fdf8f9;
  color: #888;
}

.about-content a {
  color: var(--accent);
}

.about-content img {
  max-width: 100%;
  border-radius: 4px;
}

/* ---------- search ---------- */
.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 26px;
}

.search-input {
  flex: 1;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  font-size: 13px;
  color: #555;
  outline: none;
  background: #fff;
  transition: border-color .15s ease;
}

.search-input:focus {
  border-color: var(--accent);
}

.search-btn {
  flex: none;
  width: 92px;
  height: 40px;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.search-btn:hover {
  background: #f0476a;
}

/* ---------- 404 ---------- */
.error-page {
  text-align: center;
  padding: 50px 0 30px;
}

.error-code {
  font-size: 72px;
  color: #eee;
  font-weight: 600;
  letter-spacing: 4px;
  line-height: 1;
}

.error-text {
  margin: 18px 0 28px;
  color: var(--faint);
  font-size: 13px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.error-actions .pill.ghost {
  border: 1px solid #eee;
  background: #fff;
  color: #888;
}

/* ---------- footer ---------- */
footer {
  padding: 44px 0 30px;
}

.contact-me {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
}

.contact-me a {
  position: relative;
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: #c4c4c4;
}

.contact-me a:hover {
  color: var(--accent);
}

.contact-me svg {
  width: 16px;
  height: 16px;
}

.footer {
  text-align: center;
  font-size: 10px;
  line-height: 20px;
  color: #ccc;
}

.footer a {
  color: #ccc;
}

.footer a:hover {
  color: var(--accent);
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- links ---------- */
.links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--text);
}

.link-card:hover {
  border-color: var(--accent);
  color: var(--text);
}

.link-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: #fafafa;
  color: #c3c3c3;
  font-size: 16px;
}

.link-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.link-info {
  min-width: 0;
}

.link-name {
  display: block;
  font-size: 15px;
  color: #666;
}

.link-card:hover .link-name {
  color: var(--accent);
}

.link-desc {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-share-title {
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: #888;
}

.site-share {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease;
}

.site-share:hover {
  border-color: var(--accent);
}

.site-share-info {
  display: block;
  min-width: 0;
}

.site-share-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.site-share-desc {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-share-action {
  flex: none;
  margin-left: auto;
  font-size: 12px;
  color: var(--accent);
}

/* ---------- link apply ---------- */
.link-apply {
  margin-top: 34px;
  padding: 22px 24px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #fcfcfc;
}

.link-apply-title {
  font-size: 15px;
  font-weight: 500;
  color: #666;
}

.link-apply-tip {
  margin: 8px 0 16px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--faint);
}

.apply-flash {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13px;
}

.apply-flash.ok {
  background: #f2fbf0;
  color: #3a9d23;
}

.apply-flash.err {
  background: #fff0f3;
  color: var(--accent);
}

.link-apply-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.apply-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.apply-optional {
  margin-left: 6px;
  font-size: 11px;
  color: var(--faint);
}

.apply-field input {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .15s ease;
}

.apply-field input:focus {
  border-color: var(--accent);
}

.apply-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.apply-captcha {
  width: 120px;
  height: 36px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  cursor: pointer;
  object-fit: cover;
}

.apply-submit {
  align-self: flex-start;
  height: 36px;
  padding: 0 22px;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s ease;
}

.apply-submit:hover {
  background: #f0476a;
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .header {
    margin-top: 38px;
  }

  .site-mark {
    font-size: 26px;
  }

  .site-nav {
    gap: 22px;
    margin-top: 26px;
  }

  .container {
    margin-top: 34px;
  }

  .post-title {
    font-size: 16px;
    line-height: 42px;
  }

  .post-row {
    min-height: 42px;
  }

  .post-date {
    font-size: 11px;
  }

  .detail-head {
    padding-right: 0;
  }

  .detail-actions {
    display: none;
  }

  .mobile-back {
    position: absolute;
    left: 10px;
    top: 18px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 30px;
    padding: 0 10px;
    border-radius: 4px;
    background: #f4f4f4;
    color: #888;
    font-size: 14px;
    z-index: 10;
  }

  .mobile-back svg {
    width: 16px;
    height: 16px;
  }

  .meta-action {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    height: 24px;
    padding: 0 10px;
    border: 0;
    border-radius: 4px;
    background: var(--green);
    color: #fff;
    font-size: 12px;
    line-height: 24px;
    cursor: pointer;
  }

  .detail-title {
    font-size: 19px;
  }

  .detail-actions {
    position: static;
    margin-top: 14px;
  }

  .wx-plane {
    position: fixed;
    left: 50%;
    top: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    width: 180px;
    padding: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
  }

  .wx-plane img {
    width: 150px;
    height: 150px;
  }

  .content {
    font-size: 15px;
    line-height: 27px;
  }

  .archive-row time {
    width: 40px;
  }

  .search-btn {
    width: 78px;
  }

  .links-grid {
    grid-template-columns: 1fr;
  }

  .apply-row {
    grid-template-columns: 1fr;
  }
}