:root {
  --bg: #05070d;
  --panel: rgba(12, 16, 28, 0.72);
  --ink: #e8eef8;
  --muted: #8b96a8;
  --line: rgba(232, 238, 248, 0.1);
  --accent: #6ec8ff;
  --accent-dim: rgba(110, 200, 255, 0.12);
  --shell: 1120px;
  --side: 280px;
  /* 系统字体栈，不依赖 Google Fonts（国内网络常不可用） */
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  --display: "Segoe UI", system-ui, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* 通用滚动条（主题色） */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(110, 200, 255, 0.35) transparent;
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgba(110, 200, 255, 0.28);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(110, 200, 255, 0.5);
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.nebula {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 15% 0%, rgba(60, 100, 180, 0.2), transparent 55%),
    radial-gradient(ellipse 50% 35% at 90% 15%, rgba(80, 160, 220, 0.1), transparent 50%),
    radial-gradient(ellipse 45% 30% at 60% 100%, rgba(40, 70, 140, 0.14), transparent 55%);
}

.shell {
  width: min(var(--shell), calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(5, 7, 13, 0.55);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.topbar.is-on {
  border-bottom-color: var(--line);
  background: rgba(5, 7, 13, 0.88);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}
.logo {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  white-space: nowrap;
}
.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
}
.topnav a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.topnav a.topnav__end {
  margin-left: auto;
}
.topnav a:hover,
.topnav a.is-on {
  color: var(--ink);
  background: var(--accent-dim);
}
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  margin: 7px 0;
  background: var(--ink);
}

/* —— 左右分栏：内容页主区在左、个人信息在右；工具/状态等全宽 —— */
.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 28px 0 calc(48px + var(--safe-b));
}
.layout--profile {
  grid-template-columns: minmax(0, 1fr) var(--side);
}
.layout--solo {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 72px;
}
.profile {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(10px);
}
.profile__head {
  display: flex;
  gap: 14px;
  align-items: center;
}
.profile__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(110, 200, 255, 0.35);
  object-fit: cover;
  flex-shrink: 0;
}
.profile__name {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.profile__role {
  margin: 4px 0 0;
  color: var(--accent);
  font-size: 0.8rem;
}
.profile__tag,
.profile__bio,
.profile__loc {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.profile__loc {
  font-size: 0.8rem;
  opacity: 0.85;
}
.profile__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.stat {
  text-align: center;
  padding: 10px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.stat strong {
  display: block;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
}
.stat span {
  color: var(--muted);
  font-size: 0.75rem;
}
.profile__block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.profile__block h2 {
  margin: 0 0 10px;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
}
.cat-cloud,
.profile__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cat-cloud a,
.profile__links a {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.cat-cloud a:hover,
.profile__links a:hover {
  color: var(--ink);
  border-color: rgba(110, 200, 255, 0.4);
  background: var(--accent-dim);
}

.content { min-width: 0; }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(10px);
  padding: 22px 22px 8px;
}
.panel__head { margin-bottom: 8px; }
.eyebrow {
  margin: 0 0 8px;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  color: var(--accent);
}
.panel__title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.panel__desc {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.list { margin-top: 8px; }
.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  padding: 18px 4px;
  border-top: 1px solid var(--line);
  transition: background 0.2s;
}
.row:hover {
  background: linear-gradient(90deg, transparent, rgba(110, 200, 255, 0.05), transparent);
}
.row h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.35;
}
.row p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.row time {
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
  padding-top: 3px;
}
.empty {
  padding: 36px 8px 44px;
  text-align: center;
  color: var(--muted);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 18px 0 22px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
.pager a { color: var(--accent); }
.pager span,
.pager em { color: var(--muted); font-style: normal; }

.article { padding-bottom: 28px; }
.article__head {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.article__title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.55rem, 4vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.article__time,
.article__lead {
  display: block;
  margin-top: 12px;
  color: var(--muted);
}
.article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}
.article__tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
  line-height: 1.5;
}
a.article__tag--link {
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
a.article__tag--link:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent, #6ea8fe) 55%, var(--line));
  background: rgba(255, 255, 255, 0.08);
}
a.article__tag--link:focus-visible {
  outline: 2px solid var(--accent, #6ea8fe);
  outline-offset: 2px;
}
.article__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.article__translate-tip {
  font-size: 0.82rem;
  color: var(--muted);
}
.lang-dd {
  position: relative;
  z-index: 5;
}
.lang-dd__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 0.88rem;
  cursor: pointer;
}
.lang-dd__toggle:hover {
  border-color: rgba(110, 200, 255, 0.45);
  color: var(--accent);
}
.lang-dd.is-loading .lang-dd__toggle {
  opacity: 0.7;
  pointer-events: none;
}
.lang-dd__icon {
  flex-shrink: 0;
}
.lang-dd__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 148px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0c1220;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.lang-dd__menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
}
.lang-dd__menu a:hover {
  background: rgba(255, 255, 255, 0.06);
}
.lang-dd__menu a.is-active {
  color: var(--accent);
  background: rgba(110, 200, 255, 0.12);
}
.article__body {
  font-size: 1.02rem;
  color: rgba(232, 238, 248, 0.92);
}
.article__body img {
  max-width: 100%;
  height: auto;
  margin: 1em auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}
.article__body img.is-zoomable {
  cursor: zoom-in;
}
.article__body img.js-lazy:not(.is-lazy-loaded) {
  min-height: 120px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.09), rgba(255,255,255,0.04));
  background-size: 200% 100%;
}

/* 文章图片放大预览 */
body.img-lightbox-open { overflow: hidden; }
.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 16px 72px;
}
.img-lightbox[hidden] { display: none !important; }
.img-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 12, 0.88);
  backdrop-filter: blur(6px);
}
.img-lightbox__frame {
  position: relative;
  z-index: 1;
  width: min(96vw, 1400px);
  height: min(86vh, 900px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.img-lightbox__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.img-lightbox__stage.is-zoomed { cursor: grab; }
.img-lightbox__stage.is-dragging { cursor: grabbing; }
.img-lightbox__img {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  margin-left: 0;
  translate: -50% -50%;
  transition: transform 0.08s ease-out;
  will-change: transform;
  pointer-events: none;
}
.img-lightbox__toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(16, 22, 32, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.4);
  margin: 0 auto;
}
.img-lightbox__btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #e8eef8;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.img-lightbox__btn:hover {
  background: var(--accent-dim, rgba(110, 200, 255, 0.2));
  color: #fff;
}
.img-lightbox__scale {
  min-width: 52px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted, #9aa8bc);
  font-variant-numeric: tabular-nums;
}
.article__body h2,
.article__body h3 {
  font-family: var(--display);
  margin: 1.45em 0 0.5em;
}
.article__body p { margin: 0.85em 0; }
.article__body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article__body blockquote {
  margin: 1.2em 0;
  padding: 10px 14px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  background: rgba(110, 200, 255, 0.05);
}
.article__body pre {
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  border-radius: 0 0 10px 10px;
  background: #0d1117;
  border: none;
  line-height: 1.55;
  font-size: 0.92rem;
}
.article__body .code-block {
  position: relative;
  margin: 1.2em 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0d1117;
  overflow: hidden;
}
.article__body .code-block__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.article__body .code-block__lang {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(232, 238, 248, 0.45);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.article__body .code-block__copy {
  appearance: none;
  border: 1px solid rgba(110, 200, 255, 0.28);
  background: rgba(110, 200, 255, 0.08);
  color: rgba(232, 238, 248, 0.88);
  font-size: 0.78rem;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.article__body .code-block__copy:hover {
  background: rgba(110, 200, 255, 0.16);
  border-color: rgba(110, 200, 255, 0.45);
  color: #fff;
}
.article__body .code-block__copy.is-copied {
  border-color: rgba(80, 200, 140, 0.5);
  background: rgba(80, 200, 140, 0.15);
  color: #9be7c4;
}
.article__body pre code,
.article__body code.hljs {
  background: transparent;
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: inherit;
  color: inherit;
  white-space: pre;
}
.article__body pre code.hljs {
  display: block;
  overflow-x: visible;
  padding: 0;
}
.article__body :not(pre) > code {
  padding: 0.12em 0.4em;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  color: #e6edf3;
  background: rgba(110, 200, 255, 0.12);
  border: 1px solid rgba(110, 200, 255, 0.18);
}
.article__back { margin: 28px 0 8px; }
.article__back a { color: var(--muted); font-size: 0.92rem; }
.article__back a:hover { color: var(--accent); }

.module__card {
  position: relative;
  margin: 12px 0 24px;
  padding: 28px 20px;
  border-radius: 14px;
  border: 1px dashed rgba(110, 200, 255, 0.35);
  background: rgba(110, 200, 255, 0.04);
  text-align: center;
  color: var(--muted);
  overflow: hidden;
}
.module__orbit {
  position: absolute;
  width: 160px;
  height: 160px;
  left: 50%;
  top: -40px;
  transform: translateX(-50%);
  border: 1px solid rgba(110, 200, 255, 0.2);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}
.module__orbit::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px var(--accent);
}
.module__btn {
  display: inline-flex;
  margin-top: 16px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(110, 200, 255, 0.4);
  color: var(--ink);
  background: var(--accent-dim);
}

.site-foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 20px 0 calc(20px + var(--safe-b));
}
.site-foot__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}
.site-foot .dot { opacity: 0.5; }
.site-foot a {
  color: var(--muted);
  text-decoration: none;
}
.site-foot a:hover { color: var(--accent); }

@keyframes spin {
  to { transform: translateX(-50%) rotate(360deg); }
}

/* 平板 */
@media (max-width: 960px) {
  .layout--profile {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 20px;
  }
}

/* 手机：内容在上，简介在下 */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .topnav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    gap: 0;
    padding: 8px 16px 14px;
    background: rgba(5, 7, 13, 0.96);
    border-bottom: 1px solid var(--line);
  }
  .topnav.is-open { display: flex; }
  .topnav a {
    border-radius: 10px;
    padding: 12px 10px;
  }
  .topnav a.topnav__end {
    margin-left: 0;
  }

  .layout,
  .layout--profile {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 18px;
  }
  .sidebar { position: static; }
  .profile { padding: 16px; }
  .profile__stats { grid-template-columns: 1fr 1fr; }
  .panel { padding: 16px 14px 6px; }
  .row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .row time { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  .stars { display: none; }
  .module__orbit { animation: none; }
}

/* —— 评论 —— */
.comments { margin-top: 20px; }
.comments__count {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}
.c-form { margin: 12px 0 20px; }
.c-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.c-form input,
.c-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
}
.c-form textarea { resize: vertical; min-height: 96px; }
.c-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}
.c-btn {
  border: 0;
  border-radius: 999px;
  padding: 9px 18px;
  background: linear-gradient(135deg, #6ec8ff, #4a9fd8);
  color: #041018;
  font-weight: 600;
  cursor: pointer;
}
.c-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.c-btn--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}
.c-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.c-reply-tip {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.85rem;
}
.c-list { border-top: 1px solid var(--line); }
.c-item {
  padding: 16px 2px;
  border-bottom: 1px solid var(--line);
}
.c-item.is-reply {
  margin-left: 16px;
  padding-left: 14px;
  border-left: 2px solid rgba(110, 200, 255, 0.25);
}
.c-replies { margin-top: 8px; }
.c-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 8px;
}
.c-item__meta strong { color: var(--ink); font-weight: 600; }
.c-floor { color: var(--accent); font-family: var(--display); }
.c-badge {
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid rgba(110, 200, 255, 0.4);
  color: var(--accent);
  font-size: 0.72rem;
}
.c-at { color: var(--accent); }
.c-item__body {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}
.c-item__foot { margin-top: 8px; }
.c-reply-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
}
.c-reply-btn:hover { color: var(--accent); }

.aj {
  margin-top: 12px;
  max-width: 340px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
}
.aj__hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}
.aj__hd button {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}
.aj__wrap {
  position: relative;
  width: 310px;
  height: 155px;
  overflow: hidden;
  border-radius: 8px;
  background: #0a0e16;
}
.aj__bg {
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
}
.aj__piece {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  pointer-events: none;
  user-select: none;
}
.aj__slider {
  position: relative;
  width: 310px;
  margin-top: 10px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  touch-action: none;
  user-select: none;
}
.aj__fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(110, 200, 255, 0.2);
}
.aj__btn {
  position: absolute;
  left: 0;
  top: 0;
  width: 42px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #041018;
  font-size: 1.2rem;
  cursor: grab;
  z-index: 2;
}
.aj__tip {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  pointer-events: none;
}
.aj__err { margin: 8px 0 0; color: #ff7b8a; font-size: 0.8rem; }
.aj__ok { margin: 8px 0 0; color: #6dffb0; font-size: 0.8rem; }

/* 验证码弹窗 */
body.c-modal-open { overflow: hidden; }
.c-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}
.c-modal[hidden] { display: none !important; }
.c-modal__mask {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 10, 0.72);
  backdrop-filter: blur(4px);
}
.c-modal__panel {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #0c1220;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  padding: 16px 16px 18px;
}
.c-modal__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.c-modal__hd h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
}
.c-modal__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.c-modal__close:hover { color: var(--ink); background: rgba(255,255,255,0.06); }
.c-modal .aj {
  margin-top: 0;
  max-width: none;
  border: 0;
  background: transparent;
  padding: 0;
}
/* AJ-Captcha 标准画布：必须 310x155，否则坐标校验必失败 */
.c-modal .aj__wrap {
  width: 310px;
  max-width: 100%;
  height: 155px;
  margin: 0 auto;
}
.c-modal .aj__bg,
.c-modal .aj__piece {
  object-fit: fill;
}
.c-modal .aj__slider {
  width: 310px;
  max-width: 100%;
  margin: 10px auto 0;
}

/* —— 在线工具 —— */
.crumb { color: var(--muted); text-decoration: none; }
.crumb:hover { color: var(--accent); }
.tool-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tool-list__item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 112px;
  padding: 22px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(110, 200, 255, 0.07), rgba(255, 255, 255, 0.02));
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.tool-list__item:hover {
  border-color: rgba(110, 200, 255, 0.5);
  background: linear-gradient(160deg, rgba(110, 200, 255, 0.12), rgba(255, 255, 255, 0.03));
  transform: translateY(-1px);
}
.tool-list__name {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}
.tool-list__desc {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}
.tool-box {
  margin-top: 8px;
}
.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.tool-tabs__btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.86rem;
}
.tool-tabs__btn.is-on,
.tool-tabs__btn:hover {
  color: var(--ink);
  border-color: rgba(110, 200, 255, 0.45);
  background: rgba(110, 200, 255, 0.1);
}
.tool-label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.84rem;
  color: var(--muted);
}
.tool-area,
.tool-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  line-height: 1.5;
}
.tool-area {
  resize: vertical;
  min-height: 120px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
}
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}
.tool-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.tool-row .tool-input { flex: 1; }
.tool-hint {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.tool-err {
  margin: 10px 0 0;
  color: #ff7b8a;
  font-size: 0.86rem;
}
.tool-now {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}
.tool-now code {
  color: var(--accent);
  font-size: 0.86rem;
}
.tool-now .dot { margin: 0 6px; opacity: 0.5; }
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.tool-result {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.tool-dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
}
.tool-dl > div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  align-items: start;
}
.tool-dl > div.is-full { grid-column: 1 / -1; }
.tool-dl dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.tool-dl dd {
  margin: 0;
  color: var(--ink);
  word-break: break-all;
}
.search-hit__snippet {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
.search-hit__snippet em {
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 8px;
}

/* —— 运行状态 —— */
.status-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 14px;
}
.status-hero > div { flex: 1; min-width: 0; }
.status-hero strong {
  display: block;
  font-size: 1.15rem;
  font-family: var(--display);
}
.status-hero__meta {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}
.status-hero__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}
.status-hero.is-ok .status-hero__dot {
  background: #3dcc7a;
  box-shadow: 0 0 0 4px rgba(61, 204, 122, 0.18);
}
.status-hero.is-bad .status-hero__dot {
  background: #ff7b8a;
  box-shadow: 0 0 0 4px rgba(255, 123, 138, 0.18);
}
.status-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.status-card {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.status-card__k {
  font-size: 0.78rem;
  color: var(--muted);
}
.status-card__v {
  font-size: 1.1rem;
  font-family: var(--display);
  color: var(--ink);
}
.status-card__v.is-ok { color: #3dcc7a; }
.status-card__v.is-bad { color: #ff7b8a; }
.status-card__m {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted);
}

/* —— 在线文件 —— */
.files-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.files-path {
  flex: 1;
  margin: 0;
  min-width: 0;
  font-size: 0.86rem;
  color: var(--muted);
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.files-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.files-empty {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.files-auth {
  max-width: 420px;
}
.files-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.files-item__main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
button.files-item__main { appearance: none; }
.files-item__icon {
  font-size: 1.05rem;
  line-height: 1;
  width: 1.35em;
  text-align: center;
  flex-shrink: 0;
}
.files-item__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.files-item__name {
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.files-item__sub {
  font-style: normal;
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--muted);
}
.files-item__action {
  font-size: 0.78rem;
  color: var(--accent);
  flex-shrink: 0;
}
.files-item__dl {
  font-size: 0.78rem;
  color: var(--muted);
  flex-shrink: 0;
  text-decoration: none;
}
.files-item__dl:hover { color: var(--accent); }
.files-item:hover {
  border-color: rgba(110, 200, 255, 0.45);
  background: rgba(110, 200, 255, 0.08);
}

/* 预览弹层 */
body.files-modal-open { overflow: hidden; }
.files-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.files-modal[hidden] { display: none !important; }
.files-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}
.files-modal__panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0c101c;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.files-modal--game .files-modal__panel {
  width: min(1100px, 100%);
}
.files-modal__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.files-modal__head strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--display);
}
.files-modal__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.files-modal__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.files-preview__img {
  max-width: 100%;
  max-height: calc(88vh - 100px);
  margin: 0 auto;
  object-fit: contain;
  border-radius: 8px;
}
.files-preview__pdf {
  width: 100%;
  height: calc(88vh - 100px);
  min-height: 420px;
  border: 0;
  border-radius: 8px;
  background: #111;
}
.files-preview__video,
.files-preview__audio {
  width: 100%;
  max-height: calc(88vh - 110px);
  background: #000;
  border-radius: 8px;
}
.files-game {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: min(70vh, 640px);
  width: 100%;
  background: #0a0c12;
  border-radius: 8px;
  overflow: hidden;
}
.files-game__player {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: min(70vh, 640px);
  height: min(70vh, 640px);
}
.files-game__player.ejs_parent {
  width: 100%;
  height: min(70vh, 640px);
}
.files-game-picker {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0 8px;
}
.files-game-picker__tip {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.files-game-picker__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.files-game-picker__btn {
  font-size: 0.85rem;
}
.files-archive {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  flex: 1;
}
.files-archive__bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
}
.files-archive__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(60vh, 520px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}
.files-archive__item {
  display: grid;
  grid-template-columns: 1.4em 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}
.files-archive__item:last-child {
  border-bottom: 0;
}
.files-archive__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: break-all;
}
.files-archive__size {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}
.files-archive__empty {
  padding: 20px 12px;
  color: var(--muted);
  text-align: center;
}
.files-media {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  flex: 1;
}
.files-media--audio .files-preview__audio,
.files-media--audio .plyr {
  max-height: none;
}
.files-lyrics-slot {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.files-lyrics {
  display: flex;
  flex-direction: column;
  min-height: 180px;
  max-height: min(42vh, 360px);
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
  flex: 1;
}
.files-lyrics__bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.files-lyrics__list {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 4px;
  flex: 1;
  min-height: 0;
  scroll-behavior: smooth;
}
.files-lyrics__line {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: center;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.55;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.files-lyrics__line:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}
.files-lyrics__line.is-active {
  color: #fff;
  background: rgba(110, 200, 255, 0.16);
  font-weight: 600;
  transform: scale(1.02);
}
.files-lyrics__empty {
  margin: 18px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
.files-preview__loading {
  margin: 24px 0;
  color: var(--muted);
  text-align: center;
}
.files-code {
  display: flex;
  flex-direction: column;
  min-height: 240px;
  max-height: calc(88vh - 110px);
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #0d1117;
}
.files-code__bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.files-code__pre {
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
}
.files-code__pre code {
  background: transparent !important;
  padding: 0 !important;
  font: inherit;
  white-space: pre;
}
.files-modal .plyr {
  --plyr-color-main: #6ec8ff;
  border-radius: 8px;
  overflow: hidden;
}

@media (max-width: 760px) {
  .c-form__row { grid-template-columns: 1fr; }
  .c-item.is-reply { margin-left: 8px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-dl { grid-template-columns: 1fr; }
  .tool-row { flex-direction: column; }
  .tool-list { grid-template-columns: 1fr; }
  .status-cards { grid-template-columns: 1fr 1fr; }
  .status-hero { flex-wrap: wrap; }
  .files-modal { padding: 10px; }
}

