/* ============================================================
   摸鱼星球 · 现代简约样式
   ============================================================ */

:root {
  --bg: #f5f7fa;
  --bg-soft: #eaeef5;
  --card: #ffffff;
  --card-hover: #ffffff;
  --text: #101623;
  --text-soft: #3a4558;
  --muted: #78849a;
  --line: #e3e8f0;
  --line-soft: #eef2f8;
  --accent: #2563eb;          /* 主色：科技蓝 */
  --accent-soft: #eef4ff;
  --accent-text: #1d4ed8;
  --accent-2: #5b7cfa;        /* 渐变辅色（蓝紫） */
  --blue: #2563eb;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow: 0 2px 6px rgba(16, 24, 40, .05), 0 12px 28px -16px rgba(16, 24, 40, .18);
  --shadow-lg: 0 24px 60px -24px rgba(16, 24, 40, .28);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --topbar-h: 128px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

html[data-theme="dark"] {
  --bg: #0b0f17;
  --bg-soft: #121826;
  --card: #141b28;
  --card-hover: #18202f;
  --text: #e8edf7;
  --text-soft: #c0c9da;
  --muted: #828fa6;
  --line: #212a3b;
  --line-soft: #1a2233;
  --accent: #4c8dff;          /* 暗色下提亮 */
  --accent-soft: #14243f;
  --accent-text: #7fb0ff;
  --accent-2: #8b7cff;
  --blue: #4c8dff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 2px 8px rgba(0, 0, 0, .35), 0 18px 36px -20px rgba(0, 0, 0, .7);
  --shadow-lg: 0 30px 70px -28px rgba(0, 0, 0, .85);
}

* { box-sizing: border-box; }

/* 关键：避免 .overlay{display:flex} 之类的类选择器盖掉 [hidden] 的默认 display:none */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  overflow-x: hidden;      /* 兜底：任何元素都不允许把整页撑宽 */
  max-width: 100%;
}

body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg-soft);
  color: var(--muted);
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
::selection { background: var(--accent); color: #fff; }

/* ============================ 顶栏 ============================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-fish {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 3px 8px rgba(37, 99, 235, .28));
  animation: swim 4.5s var(--ease) infinite;
}
@keyframes swim {
  0%, 100% { transform: translateX(0) rotate(-4deg); }
  50% { transform: translateX(3px) rotate(4deg); }
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text h1 { margin: 0; font-size: 16.5px; font-weight: 700; letter-spacing: .3px; }
.brand-text em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .4px;
}

.search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 420px;
  padding: 0 12px;
  height: 40px;
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  transition: border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.search:focus-within {
  background: var(--card);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}
.search svg { width: 17px; height: 17px; fill: var(--muted); flex-shrink: 0; }
.search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: none;
  font-size: 14px;
  color: var(--text);
  min-width: 0;
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 15px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform .14s var(--ease), background .18s var(--ease),
              box-shadow .18s var(--ease), color .18s var(--ease);
}
.btn:active { transform: scale(.96); }
.btn i { font-style: normal; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 80%, transparent);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--bg-soft); color: var(--text-soft); }
.btn-ghost:hover { background: var(--line-soft); color: var(--text); }
html[data-theme="dark"] .btn-ghost:hover { background: #22262d; }
.btn-icon { width: 38px; padding: 0; background: var(--bg-soft); }
.btn-icon:hover { background: var(--line-soft); }
.btn-mini { height: 26px; padding: 0 10px; font-size: 12px; background: var(--bg-soft); }
html[data-theme="dark"] .ico-dark, html[data-theme="light"] .ico-light { display: none; }

/* ---------------------------- 过滤条 ---------------------------- */
.filterbar {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 22px 4px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.tabs, .sorts { display: flex; gap: 4px; }
/* 频道多起来会超出屏幕，以前被 body 的 overflow-x:hidden 直接裁掉（视频频道点不到） */
.tabs {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; }
.sorts { margin-left: auto; flex: 0 0 auto; }
.tab, .sort {
  height: 32px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  color: var(--muted);
  transition: all .18s var(--ease);
}
.tab:hover, .sort:hover { color: var(--text); background: var(--line-soft); }
.tab.is-on {
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}
.sort.is-on { color: var(--accent); font-weight: 600; background: var(--accent-soft); }

.tagbar {
  max-width: 1320px;
  margin: 0 auto;
  padding: 8px 22px 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tagbar::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 4px 11px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  transition: all .16s var(--ease);
}
.chip:hover { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-1px); }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip em { font-style: normal; opacity: .6; margin-left: 3px; font-size: 11px; }

.active-filter {
  max-width: 1320px;
  margin: 14px auto 0;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--muted);
}
.active-filter #activeFilterText { color: var(--text); font-weight: 500; }

/* ============================ 瀑布流 ============================ */
main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 22px 40px;
  min-height: 60vh;
}

.masonry { column-count: 3; column-gap: 18px; }

.card {
  break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              border-color .2s var(--ease), background .2s var(--ease);
  animation: rise .38s var(--ease) both;
  cursor: pointer;
  position: relative;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
  background: var(--card-hover);
}
/* 卡片现在可 Tab 聚焦（role=button），给键盘用户一个看得见的焦点环 */
.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.card:focus-visible .card-media img { transform: scale(1.035); }

.card-media { position: relative; background: var(--bg-soft); }
.card-media img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 120px;
  object-fit: cover;
  transition: transform .45s var(--ease);
}
.card:hover .card-media img { transform: scale(1.035); }
.media-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  font-size: 34px;
  background: linear-gradient(135deg, var(--bg-soft), var(--line-soft));
}

.play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, .04), rgba(0, 0, 0, .38));
}
.play-badge span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #111;
  display: grid;
  place-items: center;
  font-size: 19px;
  padding-left: 4px;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, .5);
  transition: transform .2s var(--ease);
}
.card:hover .play-badge span { transform: scale(1.08); }
.video-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #2b2f38, #171a20);
  overflow: hidden;
}
.video-cover img.video-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s var(--ease);
}
.card:hover .video-cover img.video-thumb { transform: scale(1.05); }
.video-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .06) 30%, rgba(0, 0, 0, .62));
  pointer-events: none;
}
.video-cover .play-badge { z-index: 2; }
.video-cover-title {
  position: absolute;
  left: 14px;
  bottom: 12px;
  right: 14px;
  z-index: 3;
  color: #f2f4f8;
  font-size: 13.5px;
  font-weight: 600;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-up {
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 3;
  font-size: 11.5px;
  color: #fff;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(4px);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
}
.bili-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--blue);
  font-weight: 500;
}

.card-body { padding: 15px 17px 13px; }
.card-kind {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--accent-text);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: 9px;
}
.kind-text { color: var(--accent-text); }
.kind-img { color: var(--accent-text); }
.kind-video { color: var(--accent-text); }

.card-title {
  margin: 0 0 7px;
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: .1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.78;
  color: var(--text-soft);
  white-space: pre-wrap;
  word-break: break-word;
  letter-spacing: .1px;
}
.card-text.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 9;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-text.big { font-size: 16px; line-height: 1.85; }

.card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px 13px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--muted);
}
.card-author { display: flex; align-items: center; gap: 6px; min-width: 0; }
.avatar {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  flex-shrink: 0;
}
.card-author span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-tags { display: flex; gap: 5px; overflow: hidden; margin-left: auto; }
.card-tags i {
  font-style: normal;
  color: var(--muted);
  font-size: 11.5px;
  opacity: .9;
  white-space: nowrap;
}
.acts { display: flex; align-items: center; gap: 3px; margin-left: auto; }
.act {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  color: var(--muted);
  transition: all .16s var(--ease);
}
.act:hover { background: var(--accent-soft); color: var(--accent-text); }
.act.is-on { color: var(--accent); font-weight: 600; }
.act.is-on svg { fill: var(--accent); }
.act svg { width: 14px; height: 14px; fill: currentColor; }

/* 骨架屏 */
.skeleton {
  break-inside: avoid;
  margin-bottom: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 15px 17px;
}
.sk-line {
  height: 11px;
  border-radius: 6px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--line-soft) 25%, var(--line) 37%, var(--line-soft) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
.sk-img { height: 150px; border-radius: var(--radius-sm); margin-bottom: 14px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ============================ 状态 ============================ */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px;
  color: var(--muted);
  font-size: 13.5px;
}
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty-emoji { font-size: 46px; margin-bottom: 12px; }
.empty p { margin: 0 0 18px; }

.sentinel { height: 1px; }

/* ============================ 页脚 ============================ */
.footer {
  border-top: 1px solid var(--line);
  padding: 24px 22px 40px;
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12.5px;
}
.footer-stats b { color: var(--text); font-weight: 650; }
.footer-stats span { margin: 0 4px; }

/* ============================ 弹窗 ============================ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: color-mix(in srgb, #0b0d10 62%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade .2s var(--ease);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-height: min(88vh, 900px);
  overflow-y: auto;
  animation: pop .26s var(--ease);
}
@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.modal-detail { max-width: 720px; }
.modal-form { max-width: 560px; padding: 26px 26px 22px; }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(8px);
  color: var(--muted);
  display: grid; place-items: center;
  transition: all .16s var(--ease);
}
.modal-close:hover { background: var(--accent); color: #fff; }

.detail-media img, .detail-media video {
  display: block;
  width: 100%;
  max-height: 64vh;
  object-fit: contain;
  background: #0b0d10;
}
.detail-media iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.detail-inner { padding: 22px 26px 8px; }
.detail-kind {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; letter-spacing: .5px;
  color: var(--accent-text); background: var(--accent-soft);
  padding: 2px 9px; border-radius: var(--radius-pill); margin-bottom: 12px;
}
.detail-title { margin: 0 0 12px; font-size: 21px; font-weight: 700; line-height: 1.4; letter-spacing: -.2px; }
.detail-text {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.9;
  color: var(--text-soft);
  white-space: pre-wrap;
  word-break: break-word;
}
.detail-meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  align-items: center;
  font-size: 12.5px; color: var(--muted);
  padding: 16px 0 4px;
  border-top: 1px dashed var(--line);
  margin-top: 18px;
}
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.detail-actions { display: flex; gap: 8px; padding: 14px 26px 24px; flex-wrap: wrap; }

/* ---------------------------- 表单 ---------------------------- */
.modal-form h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: -.2px; }
.form-sub { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.field { display: block; margin-bottom: 15px; }
.field > span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 7px;
}
.field > span i { font-style: normal; font-weight: 400; color: var(--muted); font-size: 12px; }
.field input[type="text"], .field textarea {
  width: 100%;
  padding: 10px 13px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  outline: none;
  resize: vertical;
  transition: all .18s var(--ease);
}
.field input[type="text"]:focus, .field textarea:focus {
  background: var(--card);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
}
.field-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.seg { display: flex; gap: 6px; background: var(--bg-soft); padding: 4px; border-radius: var(--radius-pill); }
.seg-item {
  flex: 1;
  height: 32px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--muted);
  transition: all .18s var(--ease);
}
.seg-item.is-on { background: var(--card); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
.upload-row { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.file-btn { cursor: pointer; height: 32px; font-size: 13px; }
.file-info { font-size: 12px; color: var(--muted); }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* ============================ 今日热梗专区 ============================ */
.spotlight {
  margin: 6px 0 22px;
  padding: 16px 18px 18px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  background:
    radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    var(--card);
  box-shadow: var(--shadow-sm);
  animation: rise .38s var(--ease) both;
}
.spotlight-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.spotlight-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .2px;
}
.spotlight-sub { font-size: 12.5px; color: var(--muted); }
.spotlight-head .btn-mini { margin-left: auto; }

.spotlight-track {
  /* 网格布局：不再横滑，也不会裁掉 hover/焦点时的卡片上半部分 */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 10px;
  padding: 4px;          /* 给 hover 上移和 focus 轮廓留出空间 */
  margin: -4px;
}

.meme-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  padding: 12px 13px;
  min-height: 82px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--bg);
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.meme-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  box-shadow: var(--shadow);
}
.meme-card:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 2px;
}
.meme-word {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-text);
  letter-spacing: .3px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meme-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kind-meme { color: var(--accent-text); background: var(--accent-soft); }

/* ============================ 梗百科独立视图 ============================ */
.meme-view {
  animation: rise .38s var(--ease) both;
}
.meme-view-head {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin: 6px 0 18px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  background:
    radial-gradient(120% 170% at 0% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 62%),
    var(--card);
  box-shadow: var(--shadow-sm);
}
.meme-view-head h2 {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .3px;
}
.meme-view-sub { margin: 0; font-size: 12.5px; color: var(--muted); }
.meme-view-sub b { color: var(--accent-text); font-size: 14px; }
.meme-view-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.meme-view-tools input[type=search] {
  width: 208px;
  padding: 9px 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.meme-view-tools input[type=search]:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}
.meme-sorts { display: flex; gap: 4px; }
.meme-sorts .sort {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all .18s var(--ease);
}
.meme-sorts .sort.is-on {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  font-weight: 600;
}

.meme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 12px;
}
.meme-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px 16px 13px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
  animation: rise .3s var(--ease) both;
}
.meme-tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  box-shadow: var(--shadow);
}
.meme-tile-word {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .3px;
  color: var(--accent-text);
  word-break: break-word;
}
.meme-tile-brief {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--text);
}
.meme-tile-origin {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meme-tile-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}
.meme-tile-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.meme-tile-tags i {
  font-style: normal;
  font-size: 11.5px;
  color: var(--accent-text);
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: 999px;
}
.meme-tile-like { margin-left: auto; font-size: 12px; color: var(--muted); }
.meme-more { display: block; margin: 20px auto 0; }
.meme-back { display: flex; justify-content: center; margin: 26px 0 6px; }

/* 梗详情：分区展示 */
.meme-detail-word {
  margin: 6px 0 14px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .4px;
  color: var(--accent-text);
}
.meme-sec {
  display: flex;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px dashed var(--line);
}
.meme-sec:first-of-type { border-top: none; }
.meme-sec-label {
  flex: 0 0 52px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding-top: 2px;
}
.meme-sec-body {
  flex: 1;
  font-size: 14px;
  line-height: 1.72;
  color: var(--text);
  word-break: break-word;
}
.meme-video-link {
  display: inline-block;
  margin: 12px 0 4px;
  padding: 9px 15px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #5b7cfa, #2563eb);
  text-decoration: none;
  transition: filter .18s var(--ease), transform .18s var(--ease);
}
.meme-video-link:hover { filter: brightness(1.08); transform: translateY(-1px); }

@media (max-width: 720px) {
  .spotlight { padding: 14px; border-radius: 16px; }
  .spotlight-track { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .meme-card { padding: 11px 12px; min-height: 76px; }
  .meme-word { font-size: 14.5px; }
  .meme-desc { font-size: 12px; -webkit-line-clamp: 2; }

  .meme-view-head { padding: 15px; border-radius: 16px; gap: 10px; }
  .meme-view-head h2 { font-size: 17px; }
  .meme-view-tools { margin-left: 0; width: 100%; }
  .meme-view-tools input[type=search] { width: 100%; }
  .meme-grid { grid-template-columns: 1fr; gap: 10px; }
  .meme-tile { padding: 13px 14px 11px; border-radius: 14px; }
  .meme-tile-word { font-size: 16px; }
  .meme-tile-brief { font-size: 13px; }
  .meme-detail-word { font-size: 22px; }
  .meme-sec { gap: 8px; }
  .meme-sec-label { flex-basis: 46px; }
  .meme-sec-body { font-size: 13.5px; }
}


/* ============================ Toast ============================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 400;
  padding: 11px 20px;
  font-size: 13.5px;
  color: #fff;
  background: rgba(20, 22, 26, .94);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  animation: toastIn .22s var(--ease);
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ============================ 老板键 ============================ */
.boss {
  position: fixed;
  inset: 0;
  z-index: 999;
  overflow-y: auto;
  background: #f2f4f7;
  color: #1b1f26;
  font-family: "Segoe UI", "Microsoft YaHei", -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.55;
}
.boss-inner { max-width: 1180px; margin: 0 auto; padding: 26px 30px 60px; }
.boss-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 2px solid #1b3a6b;
  padding-bottom: 12px;
  margin-bottom: 20px;
}
.boss-head h2 { margin: 0 0 4px; font-size: 19px; font-weight: 700; color: #14305c; letter-spacing: .2px; }
.boss-meta { margin: 0; font-size: 12px; color: #6b7280; }
.boss-live { font-size: 11.5px; color: #2e7d32; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.boss-live i { width: 7px; height: 7px; border-radius: 50%; background: #2e7d32; animation: blink 1.6s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.boss-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 24px; }
.kpi {
  background: #fff;
  border: 1px solid #dfe3ea;
  border-left: 3px solid #1b3a6b;
  border-radius: 3px;
  padding: 11px 13px;
}
.kpi label { display: block; font-size: 11.5px; color: #6b7280; margin-bottom: 3px; }
.kpi b { display: block; font-size: 17px; font-weight: 700; color: #14305c; letter-spacing: -.2px; }
.kpi em { display: block; font-style: normal; font-size: 11px; margin-top: 2px; }
.up { color: #c62828; }
.down { color: #2e7d32; }

.boss-h2 { font-size: 14px; color: #14305c; margin: 22px 0 10px; padding-left: 9px; border-left: 3px solid #1b3a6b; }
.boss-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 12.3px;
  border: 1px solid #dfe3ea;
}
.boss-table th, .boss-table td { border: 1px solid #e6e9ef; padding: 6px 9px; text-align: left; }
.boss-table thead th { background: #eef1f6; color: #14305c; font-weight: 600; }
.boss-table tbody tr:nth-child(even) { background: #fafbfc; }
.boss-table tbody tr:hover { background: #f0f5ff; }
.boss-table-sm td:nth-child(1) { width: 40px; text-align: center; }
.boss-list { margin: 0; padding: 0; list-style: none; background: #fff; border: 1px solid #dfe3ea; }
.boss-list li { padding: 7px 12px; border-bottom: 1px solid #eef1f6; }
.boss-list li:last-child { border-bottom: 0; }
.boss-foot { margin-top: 22px; font-size: 11.5px; color: #8a93a3; text-align: right; }

/* ============================ 响应式 ============================ */
@media (max-width: 1120px) {
  .masonry { column-count: 2; }
  .boss-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .masonry { column-count: 1; column-gap: 0; }
  .topbar-inner { padding: 10px 14px; gap: 12px; flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .filterbar, .tagbar, main, .footer, .active-filter { padding-left: 14px; padding-right: 14px; }
  .btn i { display: none; }
  .brand-text em { display: none; }
  /* 顶栏收缩：筛选条压成一行，标签云已移出 sticky */
  .filterbar { flex-wrap: nowrap; gap: 8px; }
  .tabs { flex: 1 1 auto; min-width: 0; order: 1; }
  .sorts { order: 2; flex: 0 0 auto; margin-left: 0; }
  .tagbar { padding-top: 4px; padding-bottom: 8px; }
  .overlay { padding: 12px; align-items: flex-end; }
  .modal { border-radius: 20px; max-height: 92vh; }
  .modal-form { padding: 22px 18px 18px; }
  .field-2col { grid-template-columns: 1fr; }
  .detail-inner { padding: 18px 18px 6px; }
  .detail-actions { padding: 12px 18px 20px; }
  .card-tags { display: none; }
  .boss-kpis { grid-template-columns: repeat(2, 1fr); }
  .boss-inner { padding: 18px 14px 50px; }
  .boss-table { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================ 今日早报 /briefing ============================ */
.bp-body { background: var(--bg); padding-bottom: 30px; }
.bp-head { padding: 22px 18px 6px; max-width: 720px; margin: 0 auto; }
.bp-head-inner { }
.bp-date-row { display: flex; align-items: flex-end; gap: 12px; }
.bp-date-row h1 {
  margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.5px;
  color: var(--text); line-height: 1.1;
}
.bp-home {
  margin-left: auto; font-size: 12.5px; color: var(--muted); text-decoration: none;
  padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); white-space: nowrap;
}
.bp-home:hover { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.bp-sub { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

.bp-main { max-width: 720px; margin: 0 auto; padding: 12px 14px 0; }
.bp-loading { padding: 60px 20px; text-align: center; color: var(--muted); font-size: 13.5px; }

.bp-card {
  background: var(--card); border-radius: 20px; padding: 18px 18px 14px;
  margin: 14px 0; border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(16, 24, 40, .04);
}
.bp-card-main { border-color: color-mix(in srgb, var(--accent) 20%, var(--line)); }
.bp-card-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.bp-card-head h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: .5px; }
.bp-badge {
  font-size: 11.5px; color: var(--muted); background: var(--bg);
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line);
}
.bp-more { margin-left: auto; font-size: 12.5px; color: var(--accent-text); text-decoration: none; }

/* 早报条目：现代编号 + 内联摘要 */
.bp-list { list-style: none; margin: 0; padding: 0; }
.bp-item {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 13px 2px; border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background .15s var(--ease);
  border-radius: 10px;
}
.bp-item:last-child { border-bottom: none; }
.bp-item:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.bp-item:active { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.bp-idx {
  flex: 0 0 auto; width: 26px; padding-top: 2px;
  font-family: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 15px; font-weight: 600; letter-spacing: -0.5px;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.bp-item.is-top .bp-idx {
  color: transparent;
  background: linear-gradient(135deg, #ff7a45, #ff4d6d);
  -webkit-background-clip: text; background-clip: text;
  font-weight: 800;
}
.bp-item-body { flex: 1; min-width: 0; }
.bp-item-t {
  margin: 0; font-size: 15.5px; font-weight: 600; line-height: 1.5;
  color: var(--text); letter-spacing: .1px;
}
.bp-item-s {
  margin: 5px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bp-item-meta {
  margin-top: 7px; display: flex; gap: 6px; align-items: center;
  font-size: 11.5px; color: var(--muted); opacity: .9;
}
.bp-arrow {
  flex: 0 0 auto; color: var(--line); font-size: 20px; line-height: 1; padding-top: 2px;
  transition: color .15s var(--ease), transform .15s var(--ease);
}
.bp-item:hover .bp-arrow { color: var(--accent); transform: translateX(2px); }
.bp-tip {
  margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line);
  font-size: 12.5px; color: var(--muted); line-height: 1.65;
}

/* 要闻 */
.bp-news-list, .bp-know-list, .bp-sspai-list, .bp-meme-list { list-style: none; margin: 0; padding: 0; }
.bp-news { padding: 11px 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.bp-news:last-child { border-bottom: none; }
.bp-news-src {
  font-size: 11px; color: var(--accent-text); background: var(--accent-soft);
  padding: 2px 7px; border-radius: 5px;
}
.bp-news h3 { margin: 6px 0 4px; font-size: 15.5px; font-weight: 600; line-height: 1.5; color: var(--text); }
.bp-news p {
  margin: 0; font-size: 13px; line-height: 1.65; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 榜单 */
.bp-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.bp-tabs::-webkit-scrollbar { display: none; }
.bp-tab {
  flex: 0 0 auto; font-size: 12.5px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); color: var(--muted);
  cursor: pointer; transition: all .16s var(--ease);
}
.bp-tab.is-on {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600;
}
.bp-hot-list { list-style: none; margin: 0; padding: 0; }
.bp-hot {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed var(--line); cursor: pointer;
}
.bp-hot:last-child { border-bottom: none; }
.bp-rank {
  flex: 0 0 auto; min-width: 20px; height: 20px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--muted); background: var(--bg);
}
.bp-rank.r1 { background: #ff5a4f; color: #fff; }
.bp-rank.r2 { background: #ff8a3d; color: #fff; }
.bp-rank.r3 { background: #ffb02e; color: #fff; }
.bp-hot-t { flex: 1; font-size: 15px; line-height: 1.5; color: var(--text); }
.bp-hot-n { font-style: normal; font-size: 11.5px; color: var(--muted); padding-top: 3px; white-space: nowrap; }

/* 热知识 */
.bp-know {
  display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); cursor: pointer;
}
.bp-know:last-child { border-bottom: none; }
.bp-know img {
  flex: 0 0 62px; width: 62px; height: 62px; border-radius: 12px; object-fit: cover;
  background: var(--bg);
}
.bp-know-body { min-width: 0; }
.bp-know h3 { margin: 0 0 4px; font-size: 14.5px; font-weight: 600; line-height: 1.45; }
.bp-know span { font-size: 12px; color: var(--muted); }

/* 少数派 */
.bp-sspai { padding: 11px 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.bp-sspai:last-child { border-bottom: none; }
.bp-sspai h3 { margin: 0 0 4px; font-size: 14.5px; font-weight: 600; line-height: 1.45; }
.bp-sspai p {
  margin: 0 0 4px; font-size: 12.5px; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bp-sspai span { font-size: 11.5px; color: var(--accent-text); }

/* 热梗 */
.bp-meme {
  display: flex; gap: 10px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px dashed var(--line); cursor: pointer;
}
.bp-meme:last-child { border-bottom: none; }
.bp-meme-w { flex: 0 0 auto; font-size: 15px; font-weight: 700; color: var(--accent-text); }
.bp-meme-d {
  font-size: 12.5px; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

/* 详情 */
.bp-detail-src { font-size: 12px; color: var(--accent-text); }
.bp-detail-title { margin: 8px 0 12px; font-size: 20px; line-height: 1.45; font-weight: 700; }
.bp-detail-sum { margin: 0 0 16px; font-size: 14.5px; line-height: 1.75; color: var(--text); }
.bp-detail-sum.muted { color: var(--muted); }
.bp-detail-acts { display: flex; gap: 10px; flex-wrap: wrap; }

/* 页脚 */
.bp-foot { max-width: 720px; margin: 10px auto 0; padding: 0 18px; }
.bp-foot-line { margin: 4px 0; font-size: 12px; color: var(--muted); text-align: center; }
.bp-foot-line.muted { opacity: .75; }

@media (max-width: 420px) {
  .bp-date-row h1 { font-size: 26px; }
  .bp-card { padding: 16px 15px 12px; border-radius: 18px; }
  .bp-card-head h2 { font-size: 18px; }
  .bp-line-t, .bp-news h3, .bp-hot-t { font-size: 15px; }
}

/* ============================ 首页早报 · 文件夹卡 ============================ */
.bp-hero { display: block; margin: 8px 0 18px; }

.bp-folder {
  --bp-folder-size: 112px;
  --bp-pocket-ease: cubic-bezier(.22, 1.18, .36, 1);
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  background:
    radial-gradient(120% 180% at 0% 0%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 62%),
    var(--card);
  box-shadow: 0 2px 12px rgba(16, 24, 40, .05);
  transition: box-shadow .22s var(--ease), border-color .22s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.bp-folder:hover {
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  box-shadow: 0 14px 32px -20px rgba(37, 99, 235, .6);
}
.bp-folder:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.bp-folder * { box-sizing: border-box; }

/* 文件夹图标：遮罩轮廓 + 四张新闻页 + 磨砂前盖 */
.bp-folder-icon {
  position: relative;
  flex: 0 0 var(--bp-folder-size);
  width: var(--bp-folder-size);
  height: var(--bp-folder-size);
  perspective: 700px;
  perspective-origin: 50% 75%;
}

.bp-folder-back {
  --pocket-shape: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20180%20154%22%20preserveAspectRatio%3D%22none%22%3E%0A%20%20%3Cpath%20fill%3D%22white%22%20d%3D%22M16%202H59C65%202%2069%204%2073%208L81%2016C85%2020%2088%2021%2094%2021H163C172%2021%20178%2027%20177%2036L168%20131C167%20142%20160%20149%20149%20149H30C19%20149%2012%20143%2011%20132L2%2020C1%209%207%202%2016%202Z%22%2F%3E%0A%3C%2Fsvg%3E%0A");
  position: absolute;
  inset: 12% 4% 4%;
  background: linear-gradient(155deg, color-mix(in srgb, var(--accent) 34%, #232c3a), #0f1621 66%);
  -webkit-mask: var(--pocket-shape) center / 100% 100% no-repeat;
  mask: var(--pocket-shape) center / 100% 100% no-repeat;
}

.bp-folder-back::before,
.bp-folder-front::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .05) 62%, rgba(255, 255, 255, .14));
  -webkit-mask-image: var(--pocket-shape), var(--pocket-shape);
  mask-image: var(--pocket-shape), var(--pocket-shape);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 100% 100%, calc(100% - 2px) calc(100% - 2px);
  mask-size: 100% 100%, calc(100% - 2px) calc(100% - 2px);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-composite: source-out;
  mask-composite: subtract;
  pointer-events: none;
}
.bp-folder-back::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .08) 28%, transparent 52%);
}

.bp-folder-leaves { position: absolute; inset: 0; }

.bp-leaf {
  --lx: -3%; --ly: 6%; --la: -5deg;
  --ox: -5%; --oy: -12%; --oa: -13deg;
  --d: 30ms;
  position: absolute;
  top: 18%;
  left: 18%;
  width: 64%;
  height: 64%;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 3px 9px rgba(0, 0, 0, .32);
  background: linear-gradient(150deg, #7ea6ff, #2f4b86 70%);
  transform-origin: 50% 95%;
  transform: translate(var(--lx), var(--ly)) rotate(var(--la));
  transition: transform 320ms cubic-bezier(.22, .8, .24, 1);
  display: grid;
  place-items: end start;
  padding: 3px 5px;
  overflow: hidden;
}
.bp-leaf::before {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 6px;
  height: 20%;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .55) 0 2px, transparent 2px 5px);
  border-radius: 2px;
  opacity: .5;
}
.bp-leaf::after {
  content: attr(data-no);
  font: 700 8px/1 ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: .5px;
  color: rgba(255, 255, 255, .94);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}
.bp-leaf.l2 {
  --lx: 3%; --ly: 7%; --la: 6deg;
  --ox: 5%; --oy: -8%; --oa: 13deg;
  --d: 120ms;
  background: linear-gradient(150deg, #9ad6c4, #2f6b5c 70%);
}
.bp-leaf.l3 {
  --lx: -1%; --ly: 1%; --la: -2deg;
  --ox: -2%; --oy: -21%; --oa: -4deg;
  --d: 90ms;
  background: linear-gradient(150deg, #ffc98a, #9a5a24 70%);
}
.bp-leaf.l4 {
  --lx: 1%; --ly: 4%; --la: 2deg;
  --ox: 2%; --oy: -16%; --oa: 4deg;
  --d: 60ms;
  background: linear-gradient(150deg, #d9b3ff, #5a3a92 70%);
}

.bp-folder-front {
  --pocket-shape: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20180%20124%22%20preserveAspectRatio%3D%22none%22%3E%0A%20%20%3Cpath%20fill%3D%22white%22%20d%3D%22M16%205H54C60%205%2064%207%2068%2011L78%2021C82%2025%2086%2027%2092%2027H163C172%2027%20178%2033%20177%2042L170%20106C169%20117%20162%20122%20151%20122H27C16%20122%209%20116%208%20106L2%2025C1%2013%206%205%2016%205Z%22%2F%3E%0A%3C%2Fsvg%3E%0A");
  position: absolute;
  inset: 34% 4% 3%;
  z-index: 2;
  background: linear-gradient(125deg, rgba(150, 178, 220, .45), rgba(24, 32, 46, .8) 42%, rgba(58, 74, 98, .7));
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  -webkit-mask: var(--pocket-shape) center / 100% 100% no-repeat;
  mask: var(--pocket-shape) center / 100% 100% no-repeat;
  transform-origin: 50% 100%;
  transform: rotateX(-9deg);
  transition: transform 360ms cubic-bezier(.22, .8, .24, 1);
}

.bp-folder-mark {
  position: absolute;
  right: 9px;
  bottom: 3px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .5), 0 -1px 0 rgba(255, 255, 255, .22);
  opacity: .94;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .bp-folder:hover .bp-leaf,
  .bp-folder:focus-visible .bp-leaf {
    transform: translate(var(--ox), var(--oy)) rotate(var(--oa));
    transition: transform 680ms var(--bp-pocket-ease) var(--d);
  }
  .bp-folder:hover .bp-folder-front,
  .bp-folder:focus-visible .bp-folder-front {
    transform: rotateX(-43deg);
    transition: transform 680ms var(--bp-pocket-ease);
  }
}
.bp-folder.is-open .bp-leaf {
  transform: translate(var(--ox), var(--oy)) rotate(var(--oa));
  transition: transform 680ms var(--bp-pocket-ease) var(--d);
}
.bp-folder.is-open .bp-folder-front {
  transform: rotateX(-43deg);
  transition: transform 680ms var(--bp-pocket-ease);
}
@media (prefers-reduced-motion: reduce) {
  .bp-leaf, .bp-folder-front { transition: none !important; }
}

.bp-folder-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bp-folder-headline { display: none; }
.bp-folder-top { display: flex; align-items: center; gap: 8px; }
.bp-folder-top b { font-size: 16.5px; font-weight: 800; letter-spacing: -.2px; color: var(--text); }
.bp-folder-top em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .5px;
  color: #fff;
  background: linear-gradient(135deg, #ff7a45, #ff4d4f);
  padding: 2px 7px;
  border-radius: 999px;
}
.bp-folder-sub {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-folder-hint { font-size: 11.5px; color: var(--accent-text); opacity: .85; }
.bp-folder-cta { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.bp-folder-upd { font-size: 11.5px; color: var(--muted); margin-right: 8px; white-space: nowrap; }
.bp-folder-cta-txt { font-size: 12.5px; font-weight: 600; color: var(--accent-text); white-space: nowrap; }
.bp-folder-chev { font-size: 12px; color: var(--accent-text); transition: transform .3s var(--ease); }
.bp-folder.is-open .bp-folder-chev { transform: rotate(180deg); }

@media (min-width: 900px) {
  .bp-folder { --bp-folder-size: 132px; gap: 18px; padding: 14px 20px; }
  .bp-folder-top b { font-size: 18px; }
  .bp-folder-sub { font-size: 13px; }
  .bp-folder-copy { flex: 0 0 auto; min-width: 250px; }
  .bp-folder-headline {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 16px 0 24px;
    padding-left: 20px;
    border-left: 1px dashed var(--line);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .bp-folder-headline em {
    font-style: normal;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-text);
    background: var(--accent-soft);
    padding: 2px 7px;
    border-radius: 4px;
    margin-right: 8px;
  }
}


/* 展开面板：JS 控制高度，0 → 内容高度 */
.bp-panel {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: height .44s var(--ease), opacity .3s var(--ease);
}
.bp-hero.is-open .bp-panel { opacity: 1; }
.bp-panel-inner {
  margin-top: 12px;
  padding: 6px 16px 4px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}
.bp-panel-inner .bp-list { margin: 0; }
/* 展开后的 10 条：连续列表，比「一堆小卡片」更紧凑 */
.bp-panel-inner .bp-item {
  border-radius: 0;
  border-bottom: 1px dashed var(--line);
  padding: 11px 0;
}
.bp-panel-inner .bp-item:first-child { padding-top: 8px; }
.bp-panel-inner .bp-item:last-child { border-bottom: none; }
.bp-panel-inner .bp-item:hover { background: transparent; }
.bp-panel-inner .bp-item:hover .bp-item-t { color: var(--accent-text); }

.bp-panel-foot {
  display: flex;
  justify-content: center;
  padding: 4px 0 10px;
  border-top: 1px dashed var(--line);
  margin-top: 2px;
}
.bp-collapse {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.bp-collapse:hover { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

@media (max-width: 720px) {
  .bp-folder { --bp-folder-size: 94px; gap: 12px; padding: 10px 12px; border-radius: 18px; }
  .bp-folder-top b { font-size: 15px; }
  .bp-folder-sub { font-size: 12px; }
  .bp-folder-hint { display: none; }
  .bp-folder-upd { display: none; }
  .bp-panel-inner { padding: 4px 12px 2px; border-radius: 18px; }
  .bp-panel-inner .bp-item-t { font-size: 14.5px; }
  .bp-panel-inner .bp-item { padding: 10px 0; }
}


/* ============================ 早报详情 · 报纸卡片（首页 / briefing 共用） ============================ */
.bp-sheet {
  position: relative;
  background: var(--card);
  border-radius: 21px;
  overflow: hidden;
}
.bp-sheet-ribbon {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 64px 13px 24px;
  color: #fff;
  background:
    radial-gradient(130% 220% at 0% 0%, rgba(255, 255, 255, .24), transparent 58%),
    linear-gradient(112deg, var(--accent-2), var(--accent) 62%, #1f4bd8);
}
.bp-sheet-kicker { font-size: 13px; font-weight: 900; letter-spacing: 3px; }
.bp-sheet-date { font-size: 12px; opacity: .92; letter-spacing: .5px; }
.bp-sheet-no {
  margin-left: auto;
  font: 700 11px/1 ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .22);
}
.bp-sheet-in { padding: 18px 24px 4px; }
.bp-sheet-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bp-sheet-src {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--accent-text);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 999px;
}
.bp-sheet-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); opacity: .7; }
.bp-sheet-time { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bp-sheet-tagline { margin-left: auto; font-size: 11px; color: var(--muted); opacity: .8; }
.bp-sheet-title {
  margin: 12px 0 0;
  font-size: 23px;
  line-height: 1.42;
  font-weight: 800;
  letter-spacing: -.3px;
  color: var(--text);
}
.bp-sheet-rule { display: flex; gap: 5px; align-items: center; margin: 14px 0 4px; }
.bp-sheet-rule i {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--accent) 42%, var(--line));
}
.bp-sheet-rule i:nth-child(1) { width: 46px; }
.bp-sheet-rule i:nth-child(2) { width: 14px; opacity: .6; }
.bp-sheet-rule i:nth-child(3) { width: 6px; opacity: .4; }
.bp-sheet-body { padding: 10px 0 4px; }
.bp-sheet-body p {
  margin: 0 0 13px;
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--text-soft);
  text-align: justify;
  letter-spacing: .15px;
  word-break: break-word;
}
.bp-sheet-body p:last-child { margin-bottom: 0; }
.bp-sheet-body p.bp-sheet-lead {
  padding: 11px 14px 11px 15px;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border-left: 3px solid color-mix(in srgb, var(--accent) 60%, transparent);
  border-radius: 0 12px 12px 0;
  color: var(--text);
}
.bp-sheet-body p.bp-sheet-lead.muted { color: var(--muted); }
.bp-sheet-acts { display: flex; gap: 10px; flex-wrap: wrap; padding: 18px 0 22px; }
.bp-sheet-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(115deg, var(--accent-2), var(--accent));
}
.bp-sheet-go em { font-style: normal; font-size: 12px; opacity: .85; }
.bp-sheet-go:hover { filter: brightness(1.06); transform: translateY(-1px); }

@media (max-width: 720px) {
  .bp-sheet-ribbon { padding: 13px 58px 11px 18px; }
  .bp-sheet-kicker { font-size: 12px; letter-spacing: 2px; }
  .bp-sheet-in { padding: 15px 18px 2px; }
  .bp-sheet-title { font-size: 20px; }
  .bp-sheet-body p { font-size: 15px; }
  .bp-sheet-acts { padding: 16px 0 18px; }
  .bp-sheet-tagline { display: none; }
}

/* 早报弹窗里关闭按钮落在蓝色栏头上，换成半透明白 */
.modal.is-bp .modal-close,
#bpOverlay .modal-close {
  background: rgba(255, 255, 255, .22);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .38);
  top: 10px;
  right: 12px;
}
.modal.is-bp .modal-close:hover,
#bpOverlay .modal-close:hover { background: #fff; color: var(--accent); }


/* 要闻列表（briefing 页） */
.bp-news-meta { display: block; margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.bp-news h3 { margin: 0 0 5px; }


/* ============================ SSR 独立页（/fun/p /fun/* /tag/*） ============================ */
.post-body { background: var(--bg); }
.post-top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  max-width: 860px; margin: 0 auto; padding: 16px 18px 6px;
}
.post-brand { font-size: 16px; font-weight: 800; color: var(--text); text-decoration: none; }
.post-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.post-nav a {
  font-size: 13px; color: var(--muted); text-decoration: none;
  padding: 5px 10px; border-radius: 999px; border: 1px solid transparent;
}
.post-nav a:hover { color: var(--accent-text); background: var(--accent-soft); }
.post-nav a.is-on { color: var(--accent-text); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }

.post-main { max-width: 860px; margin: 0 auto; padding: 8px 18px 40px; }

.post {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 22px 22px 18px; box-shadow: var(--shadow-sm); margin-top: 10px;
}
.post-kind {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; color: var(--accent-text);
  background: var(--accent-soft); padding: 3px 10px; border-radius: 999px;
}
.post-title { margin: 12px 0 14px; font-size: 24px; line-height: 1.4; font-weight: 800; letter-spacing: -.3px; color: var(--text); }
.post-figure { margin: 0 0 16px; }
.post-figure img { display: block; width: 100%; height: auto; border-radius: 14px; background: var(--bg-soft); }
.post-video { position: relative; margin: 0 0 16px; border-radius: 14px; overflow: hidden; background: #000; }
.post-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.post-text { font-size: 16px; line-height: 1.9; color: var(--text-soft); }
.post-text p { margin: 0 0 14px; }
.post-text p:last-child { margin-bottom: 0; }
.post-sec { margin: 0 0 14px; }
.post-sec-label { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent-text); background: var(--accent-soft); padding: 2px 8px; border-radius: 6px; margin-bottom: 6px; }
.post-sec-body { font-size: 15.5px; line-height: 1.85; color: var(--text-soft); }
.post-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); }
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.post-tag { font-size: 12.5px; color: var(--accent-text); background: var(--bg); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; text-decoration: none; }
.post-tag:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

.post-more { margin-top: 26px; }
.post-more h2 { font-size: 17px; font-weight: 800; margin: 0 0 12px; color: var(--text); }
.post-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.post-card {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; text-decoration: none; transition: border-color .16s var(--ease), transform .16s var(--ease);
}
.post-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); transform: translateY(-2px); }
.post-card-kind { font-size: 11px; color: var(--muted); }
.post-card-title { font-size: 14.5px; font-weight: 600; line-height: 1.45; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.post-card-desc { font-size: 12.5px; color: var(--muted); line-height: 1.55; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.post-list { margin-top: 6px; }
.post-list-title { font-size: 26px; font-weight: 800; letter-spacing: -.4px; margin: 6px 0 8px; color: var(--text); }
.post-list-intro { margin: 0 0 18px; font-size: 14px; color: var(--muted); line-height: 1.7; }
.post-list-more { margin-top: 20px; text-align: center; font-size: 13.5px; }
.post-list-more a { color: var(--accent-text); text-decoration: none; }
.post-list .post-cards { grid-template-columns: 1fr; }

.post-foot { max-width: 860px; margin: 0 auto; padding: 0 18px 40px; text-align: center; font-size: 12px; color: var(--muted); }
.post-foot a { color: var(--accent-text); text-decoration: none; }

@media (min-width: 720px) {
  .post-list .post-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-title { font-size: 28px; }
}

/* ============================ 工具站（/tools） ============================ */
.tool-tagline { margin: 4px 0 6px; font-size: 15px; color: var(--accent-text); font-weight: 600; }
.tool-desc { margin: 0 0 18px; font-size: 14.5px; line-height: 1.8; color: var(--text-soft); }
.tool-box {
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 16px 14px; margin: 6px 0 16px;
}
.tool-field { display: block; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.tool-field input, .tool-field select, .tool-field textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  font: inherit; font-size: 15px; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  outline: none;
}
.tool-field textarea { resize: vertical; line-height: 1.6; }
.tool-field input:focus, .tool-field select:focus, .tool-field textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}
.tool-result { text-align: center; padding: 14px 8px 6px; }
.tool-big { display: block; font-size: 40px; font-weight: 800; letter-spacing: -1px; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.tool-sub { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.tool-sentence { margin: 0; font-size: 17px; line-height: 1.75; color: var(--text); text-align: left; }
.tool-pre {
  margin: 0; padding: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; font-size: 13.5px; line-height: 1.75; white-space: pre-wrap;
  word-break: break-word; color: var(--text-soft); text-align: left; font-family: inherit;
}
.tool-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); }
.tool-row b { color: var(--text); }
.tool-btn { width: 100%; margin-top: 10px; }
.tool-note { margin: 14px 0 0; font-size: 12px; color: var(--muted); }
.tool-back { margin: 18px 0 0; font-size: 13px; color: var(--muted); }
.tool-back a { color: var(--accent-text); text-decoration: none; }

.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tool-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  text-decoration: none; min-width: 0;
  transition: border-color .16s var(--ease), transform .16s var(--ease);
}
.tool-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); }
.tool-card-emoji { font-size: 26px; line-height: 1; }
.tool-card-name { font-size: 15.5px; font-weight: 700; color: var(--text); }
.tool-card-desc { font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.tool-card-go { margin-top: auto; font-size: 12px; color: var(--accent-text); }

.skin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 6px; }
.skin-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.skin-card b { font-size: 14px; color: var(--text); }
.skin-card em { font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.skin-preview { display: block; height: 82px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 6px; }
.skin-report { background: repeating-linear-gradient(180deg, #eef1f6 0 8px, #fff 8px 16px); }
.skin-code { background: linear-gradient(160deg, #1e2430, #0e1116); }
.skin-doc { background: repeating-linear-gradient(180deg, #fff 0 10px, #e9edf5 10px 11px); }
.skin-term { background: #06090c; }

/* 首页工具区 */
.home-tools { margin: 6px 0 16px; }
.home-tools-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.home-tools-head h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.2px; }
.home-tools-head a { margin-left: auto; font-size: 12.5px; color: var(--accent-text); text-decoration: none; }
.home-tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.home-tool {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 6px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; text-decoration: none;
  transition: border-color .16s var(--ease), transform .16s var(--ease);
}
.home-tool:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); }
.home-tool i { font-style: normal; font-size: 20px; line-height: 1; }
.home-tool b { font-size: 12px; font-weight: 600; color: var(--text); text-align: center; }
.home-quota {
  display: flex; align-items: center; gap: 12px; margin: 10px 0 0;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 8%, var(--card)), var(--card));
}
.home-quota b { font-size: 18px; font-weight: 800; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.home-quota span { font-size: 12px; color: var(--muted); }
.home-quota a { margin-left: auto; font-size: 12px; color: var(--accent-text); text-decoration: none; white-space: nowrap; }

@media (max-width: 420px) {
  .home-tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-tool b { font-size: 11px; }
  .tool-big { font-size: 34px; }
}

/* 老板键弱入口：几乎看不见的小圆点 */
.boss-dot {
  width: 10px; height: 10px; padding: 0; flex: 0 0 auto;
  border-radius: 50%; background: var(--muted);
  opacity: .12; transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.boss-dot:hover, .boss-dot:focus-visible { opacity: .55; transform: scale(1.3); }

/* ============================ 老板键皮肤（2/3/4） ============================ */
.boss-skin { min-height: 100vh; }

/* 代码编辑器 */
.boss-skin-code { background: #1e1f22; color: #cfd2d8; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.code-top {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: #2b2d30; border-bottom: 1px solid #3a3d41; font-size: 12px; color: #9da3ae;
}
.code-dot { width: 9px; height: 9px; border-radius: 50%; background: #4b5058; }
.code-dot:first-child { background: #e05a5a; }
.code-dot:nth-child(2) { background: #d8a43c; }
.code-dot:nth-child(3) { background: #59a869; }
.code-file { margin-left: 8px; color: #c8ccd4; }
.code-tabs { margin-left: auto; font-size: 11.5px; color: #7f8694; }
.code-body { padding: 16px 18px 60px; }
.code-body pre { margin: 0; font-size: 12.5px; line-height: 1.62; color: #c9d1d9; white-space: pre; overflow-x: auto; }
.code-status {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 18px;
  padding: 5px 14px; background: #2b2d30; border-top: 1px solid #3a3d41;
  font-size: 11.5px; color: #8b93a1;
}

/* 需求文档 */
.boss-skin-doc { background: #e9ebef; padding: 26px 14px 60px; }
.doc-page {
  max-width: 780px; margin: 0 auto; background: #fff; padding: 46px 52px 60px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .1); font-size: 14px; line-height: 1.9; color: #1f2328;
}
.doc-crumb { margin: 0 0 6px; font-size: 12px; color: #8a919c; }
.doc-title { margin: 0 0 6px; font-size: 23px; font-weight: 700; color: #111; }
.doc-meta { margin: 0 0 22px; font-size: 12px; color: #7b8391; padding-bottom: 12px; border-bottom: 1px solid #e6e8ec; }
.doc-page h2 { margin: 22px 0 8px; font-size: 15.5px; font-weight: 700; color: #14305c; }
.doc-page p { margin: 0 0 10px; }
.doc-table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: 12.5px; }
.doc-table th, .doc-table td { border: 1px solid #dfe3ea; padding: 6px 9px; text-align: left; }
.doc-table thead th { background: #f2f4f8; }
.doc-sign { margin-top: 24px; font-size: 12px; color: #7b8391; text-align: right; }

/* 终端 */
.boss-skin-term { background: #06090c; }
.term-body {
  margin: 0; padding: 18px 18px 60px; font-family: ui-monospace, Consolas, monospace;
  font-size: 12.5px; line-height: 1.65; color: #7ee787; white-space: pre; overflow-x: auto;
}

@media (max-width: 720px) {
  .code-body { padding: 12px 12px 50px; }
  .code-body pre { font-size: 11px; }
  .code-tabs { display: none; }
  .doc-page { padding: 24px 18px 40px; }
  .doc-title { font-size: 19px; }
  .term-body { font-size: 11px; padding: 12px 12px 50px; }
}

/* 收藏夹 /favs */
.chip-fav { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--accent-text); }
.fav-head { margin: 8px 0 10px; }
.fav-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.fav-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
.fav-empty {
  padding: 46px 20px; text-align: center; font-size: 14px; line-height: 2;
  color: var(--muted); background: var(--card); border: 1px dashed var(--line);
  border-radius: 16px;
}
.fav-empty a { color: var(--accent-text); text-decoration: none; }

/* 数据看板 /stats */
.stat-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 18px; }
.stat-tile {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 2px;
}
.stat-tile b { font-size: 26px; font-weight: 800; letter-spacing: -.5px; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.stat-tile span { font-size: 12.5px; color: var(--muted); }
.stat-tile em { font-style: normal; font-size: 11px; color: var(--muted); opacity: .75; }
.stat-h2 { margin: 22px 0 10px; font-size: 15px; font-weight: 700; color: var(--text); }
.stat-inline { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.stat-inline b { color: var(--text); font-size: 15px; }
.stat-bars { display: flex; flex-direction: column; gap: 7px; }
.stat-bar-row { display: grid; grid-template-columns: 92px 1fr 34px; align-items: center; gap: 10px; }
.stat-bar-label { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-bar { height: 8px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; }
.stat-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff)); border-radius: 99px; }
.stat-bar-num { font-size: 12px; color: var(--text-soft); text-align: right; font-variant-numeric: tabular-nums; }
.stat-empty { margin: 0; padding: 14px; font-size: 12.5px; color: var(--muted); background: var(--bg); border-radius: 12px; }

/* PC 端标签栏拖拽 */
@media (hover: hover) and (pointer: fine) {
  .tagbar, .tabs { cursor: grab; }
  .tagbar.is-dragging, .tabs.is-dragging { cursor: grabbing; }
  .tagbar.is-dragging, .tabs.is-dragging { scroll-behavior: auto; }
}
.tagbar.is-dragging, .tabs.is-dragging { user-select: none; -webkit-user-select: none; }
.tagbar.is-dragging *, .tabs.is-dragging * { pointer-events: none; }

/* PC 端：标签栏不横向滚动，直接换行全部摊开（不再出现右侧被截断） */
@media (min-width: 1024px) {
  .tagbar {
    flex-wrap: wrap;
    overflow-x: visible;
    row-gap: 8px;
    padding-bottom: 12px;
  }
  .tagbar .chip { flex: 0 0 auto; }
  .tagbar.is-dragging { cursor: default; }
}

/* 标签栏右侧渐隐：暗示「后面还有」，滚到底自动消失 */
.tagbar-wrap { position: relative; }
.tagbar-wrap::after {
  content: '';
  position: absolute; top: 0; right: 0; bottom: 0; width: 76px;
  background: linear-gradient(90deg, transparent, var(--bg) 62%);
  pointer-events: none;
  opacity: 1;
  transition: opacity .18s ease;
}
.tagbar-wrap.at-end::after { opacity: 0; }
@media (min-width: 1024px) {
  .tagbar-wrap::after { display: none; }
}

/* 标签页：相关标签块 */
.post-rel { margin-top: 26px; padding-top: 16px; border-top: 1px dashed var(--line); }
.post-rel h2 { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--text); }

/* ============================ PC 端布局收敛（>=1024） ============================ */
@media (min-width: 1024px) {
  .topbar-inner,
  .filterbar,
  .tagbar,
  main {
    max-width: 1180px;
  }
  /* 工具宫格：3 列太宽，改 6 列等宽小卡 */
  .home-tool-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
  .home-tool { padding: 14px 8px; }
  .home-tool b { font-size: 12.5px; }
  .home-tool i { font-size: 22px; }
  /* 瀑布流 4 列，卡片不再被拉成大图 */
  .masonry { column-count: 4; }
  /* 今日热梗：4 列，描述给 3 行 */
  .spotlight-track { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .meme-card { min-height: 96px; }
  .meme-desc { -webkit-line-clamp: 3; }
  /* 早报卡：内容区收一点，右侧不再空一大片 */
  .bp-hero, .bp-folder { max-width: none; }
}

@media (min-width: 1440px) {
  .masonry { column-count: 4; }
}

@media (min-width: 1024px) {
  /* 标签 chip 收一点，31 个能塞进两行，不会第三行只剩一个 */
  .tagbar .chip { padding: 4px 9px; font-size: 12px; }
  .tagbar .chip em { font-size: 10.5px; margin-left: 4px; }
}

/* ============================ SSR 页面 PC 布局 ============================ */
@media (min-width: 1024px) {
  .post-main { max-width: 1040px; }
  .post-top, .post-foot { max-width: 1040px; }
  /* 看板：四个数字排一行 */
  .stat-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .stat-tile b { font-size: 30px; }
  /* 工具索引：三列 */
  .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  /* 内容页：正文与配图不再被拉到 860 太窄/太宽之间反复 */
  .post { padding: 28px 32px 22px; }
  .post-title { font-size: 30px; }
}

/* ============================ 合规：法律页 / 页脚 / 举报 ============================ */
.legal-footer {
  margin-top: 26px;
  padding: 20px 16px 26px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.legal-footer .footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 6px; margin-bottom: 6px; }
.legal-footer a { color: var(--text-soft); text-decoration: none; }
.legal-footer a:hover { color: var(--accent-text); text-decoration: underline; }
.legal-footer .foot-sep { opacity: .45; }
.legal-footer .footer-legal { margin-top: 2px; }
.legal-footer .footer-beian { font-variant-numeric: tabular-nums; }
.legal-footer .icp-pending { opacity: .7; }
.legal-footer .footer-disclaimer {
  max-width: 720px; margin: 10px auto 0; font-size: 11.5px; line-height: 1.8; opacity: .78;
}

.legal { max-width: 760px; margin: 0 auto; }
.legal h2 { margin: 26px 0 8px; font-size: 17px; font-weight: 800; letter-spacing: -.2px; }
.legal p, .legal li { font-size: 14px; line-height: 1.95; color: var(--text-soft); }
.legal ul { padding-left: 20px; }
.legal li { margin: 4px 0; }
.legal a { color: var(--accent-text); }
.legal-lead { font-size: 15px; color: var(--text); }
.legal-meta { font-size: 12.5px; color: var(--muted); }
.legal-table { width: 100%; border-collapse: collapse; margin: 10px 0 16px; font-size: 13px; }
.legal-table th, .legal-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-table th { width: 34%; color: var(--muted); font-weight: 600; background: var(--bg-soft); }
.report-form { margin: 16px 0 8px; }
.report-agree { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 4px; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.report-agree input { margin-top: 3px; flex: 0 0 auto; }
.report-agree a { color: var(--accent-text); }
.report-hint { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.report-hint.is-ok { background: color-mix(in srgb, #1aa260 12%, transparent); color: #147a48; }
.report-hint.is-err { background: color-mix(in srgb, #d64545 12%, transparent); color: #b23232; }
[data-theme="dark"] .report-hint.is-ok { color: #7ee2a8; }
[data-theme="dark"] .report-hint.is-err { color: #ff9b9b; }

/* 视频：外链卡片，不加载第三方封面 */
.video-outlink {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 150px; padding: 16px; gap: 4px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--bg-soft)),
              color-mix(in srgb, var(--accent) 6%, var(--bg-soft)));
  border: 1px dashed color-mix(in srgb, var(--accent) 30%, var(--line));
}
.video-outlink .play-badge { position: absolute; top: 14px; right: 14px; }
.video-outlink .video-cover-title { font-size: 15px; font-weight: 800; line-height: 1.45; color: var(--text); }
.video-src-badge {
  align-self: flex-start; margin-top: 4px; padding: 2px 8px; border-radius: 99px;
  font-size: 11px; color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.post-outlink { margin: 16px 0; padding: 16px; border: 1px dashed var(--line); border-radius: 14px; background: var(--bg-soft); }
.post-outlink-btn {
  display: inline-block; padding: 10px 16px; border-radius: 10px;
  background: var(--accent); color: #fff; font-weight: 700; text-decoration: none;
}
.post-outlink-note { margin: 10px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.detail-outlink { padding: 22px 18px; text-align: center; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.detail-outlink .btn { display: inline-flex; }
.detail-outlink-note { margin: 10px auto 0; max-width: 520px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.post-report { margin: 18px 0 0; font-size: 12px; }
.post-report a { color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--line); }
.post-report a:hover { color: var(--accent-text); }
.submit-agree { margin: 14px 0 2px; }
.bp-sheet-note { margin: 14px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--muted); text-align: center; }

