/* 暧灯WIKI · 前台静态样式（移动端优先，紫色调） */
:root {
  --primary: #6a0dad;
  --primary-d: #4b0a7a;
  --primary-l: #8e2fd0;
  --primary-soft: #f4ecfb;
  --ink: #1c1724;
  --ink-2: #4a4458;
  --ink-3: #857e93;
  --line: #eae4f2;
  --bg: #faf8fd;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 2px 14px rgba(74, 10, 122, .06);
  --shadow-h: 0 8px 24px rgba(74, 10, 122, .13);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; border: 0; }

.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* 页头 */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(120deg, var(--primary-d), var(--primary) 55%, var(--primary-l));
  color: #fff;
  box-shadow: 0 2px 16px rgba(74, 10, 122, .22);
}
.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand-mark {
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff 0 18%, #e3c6fb 19% 40%, rgba(255,255,255,.15) 41% 100%);
  box-shadow: 0 0 12px rgba(255, 255, 255, .55);
  flex: 0 0 auto;
}
.brand-text {
  font-size: 17px; font-weight: 700; letter-spacing: .5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.head-tip { font-size: 12px; opacity: .78; letter-spacing: 1px; white-space: nowrap; }
.head-back {
  font-size: 13px; padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
}
.head-back:active { background: rgba(255, 255, 255, .28); }

/* 主体 */
.main { padding-top: 16px; padding-bottom: 28px; }

/* 列表 */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-item {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.post-item:active { transform: scale(.995); box-shadow: var(--shadow-h); }
.post-item > a { display: flex; gap: 12px; padding: 14px; align-items: flex-start; }
.post-item.no-cover > a { display: block; }

.thumb {
  flex: 0 0 104px; width: 104px; height: 78px;
  border-radius: 10px; overflow: hidden; background: var(--primary-soft);
  position: relative;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(106, 13, 173, .07);
  border-radius: 10px;
}

.item-body { min-width: 0; flex: 1; }
.item-title {
  margin: 0 0 4px;
  font-size: 16.5px; font-weight: 700; line-height: 1.45;
  color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-sum {
  margin: 0 0 6px;
  font-size: 13.5px; color: var(--ink-2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-meta { font-size: 12px; color: var(--ink-3); letter-spacing: .3px; }
.item-meta time { position: relative; padding-left: 12px; }
.item-meta time::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 4px; height: 4px; margin-top: -2px; border-radius: 50%;
  background: var(--primary); opacity: .55;
}

.no-cover .item-title { font-size: 17px; }
.no-cover .item-sum { -webkit-line-clamp: 3; }

/* 空态 */
.empty {
  text-align: center; padding: 72px 20px; color: var(--ink-3);
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
}
.empty-title { margin: 0 0 6px; font-size: 16px; color: var(--ink-2); font-weight: 600; }
.empty-sub { margin: 0; font-size: 13px; }

/* 详情 */
.article {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 18px 24px;
}
.article-title {
  margin: 0 0 10px; font-size: 22px; line-height: 1.42; font-weight: 800;
  letter-spacing: .2px; word-break: break-word;
}
.article-meta {
  font-size: 12.5px; color: var(--ink-3); padding-bottom: 14px;
  border-bottom: 1px solid var(--line); margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.article-cover {
  margin: 0 0 16px; border-radius: 12px; overflow: hidden; background: var(--primary-soft);
}
.article-cover img { width: 100%; }

/* 媒体 */
.media-box { margin: 0 0 18px; }
.media-box video { width: 100%; border-radius: 12px; background: #000; display: block; }
.media-box.audio-box {
  background: var(--primary-soft); border: 1px solid #e8d9f8;
  border-radius: 12px; padding: 12px 14px;
}
.audio-label {
  font-size: 12px; color: var(--primary); font-weight: 700;
  letter-spacing: 2px; margin-bottom: 8px;
}
.media-box audio { width: 100%; }
.media-box iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; display: block; }

/* 正文 */
.article-content { font-size: 16px; color: #2a2436; word-break: break-word; }
.article-content > *:first-child { margin-top: 0; }
.article-content h1, .article-content h2, .article-content h3, .article-content h4 {
  margin: 1.5em 0 .6em; line-height: 1.45; font-weight: 700; color: var(--ink);
}
.article-content h1 { font-size: 21px; }
.article-content h2 {
  font-size: 19px; padding-left: 11px; border-left: 4px solid var(--primary);
}
.article-content h3 { font-size: 17px; }
.article-content p { margin: 0 0 1em; }
.article-content img { border-radius: 10px; margin: .6em 0; height: auto; }
.article-content a { color: var(--primary); border-bottom: 1px solid rgba(106, 13, 173, .3); }
.article-content blockquote {
  margin: 1.2em 0; padding: 10px 14px; color: var(--ink-2);
  background: var(--primary-soft); border-left: 3px solid var(--primary); border-radius: 6px;
}
.article-content ul, .article-content ol { padding-left: 1.3em; margin: 0 0 1em; }
.article-content li { margin: .3em 0; }
.article-content code {
  background: #f3eefb; color: var(--primary-d); padding: 2px 6px;
  border-radius: 5px; font-size: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.article-content pre {
  background: #241a33; color: #eee; padding: 14px; border-radius: 10px;
  overflow-x: auto; font-size: 13.5px; line-height: 1.6;
}
.article-content pre code { background: none; color: inherit; padding: 0; }
.article-content table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 14px; }
.article-content th, .article-content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.article-content th { background: var(--primary-soft); }
.article-content hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }

.article-foot { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.back-btn {
  display: inline-block; font-size: 14px; color: var(--primary);
  background: var(--primary-soft); border-radius: 999px; padding: 8px 18px;
}

/* 页脚 */
.site-foot {
  padding: 20px 0 34px; text-align: center;
  color: var(--ink-3); font-size: 12.5px;
}
.beian {
  display: inline-block; margin-bottom: 6px; color: var(--ink-3);
  border-bottom: 1px solid rgba(133, 126, 147, .35); padding-bottom: 1px;
}
.beian:active { color: var(--primary); }
.copy { margin: 0; opacity: .85; }

/* 锁定页 */
body.page-locked {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 0%, #efe3fb, #faf8fd 60%);
  padding: 24px;
}
.lock-wrap { width: 100%; max-width: 420px; }
.lock-card {
  background: var(--card); border-radius: 20px; padding: 44px 26px;
  text-align: center; box-shadow: 0 12px 40px rgba(74, 10, 122, .12);
}
.lock-icon {
  width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 30px; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-l));
  box-shadow: 0 8px 20px rgba(106, 13, 173, .3);
}
.lock-title { margin: 0 0 8px; font-size: 19px; font-weight: 700; }
.lock-sub { margin: 0 0 20px; font-size: 14px; color: var(--ink-3); }
.lock-brand { margin: 0; font-size: 12.5px; color: var(--primary); letter-spacing: 2px; }

/* 桌面端微调 */
@media (min-width: 640px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 24px; }
  .head-inner { height: 64px; }
  .brand-text { font-size: 19px; }
  .post-item > a { padding: 18px; gap: 16px; }
  .thumb { flex-basis: 148px; width: 148px; height: 104px; }
  .item-title { font-size: 18px; }
  .item-sum { font-size: 14px; }
  .article { padding: 30px 30px 34px; }
  .article-title { font-size: 26px; }
  .article-content { font-size: 16.5px; }
  .article-content h2 { font-size: 21px; }
  .post-item:hover { box-shadow: var(--shadow-h); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
