/* ============================================================
   铝箔的收纳箱 · 站点样式
   配色：浅灰为主 + 靛蓝/青绿点缀；动效克制、可被 prefers-reduced-motion 关闭
   ============================================================ */

:root {
  --bg: #f1f2f5;
  --bg-soft: #e8eaef;
  --panel: rgba(255, 255, 255, 0.76);
  --panel-solid: #ffffff;
  --ink: #191c22;
  --ink-2: #454b57;
  --muted: #858d9c;
  --line: rgba(19, 24, 33, 0.085);
  --line-strong: rgba(19, 24, 33, 0.16);
  --accent: #0d9aaa;
  --accent-soft: rgba(13, 154, 170, 0.13);
  --accent-2: #34d3c0;
  --warm: #f5a524;
  --danger: #e5484d;
  --ok: #1a9d63;

  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 10px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 14px 34px -12px rgba(16, 24, 40, 0.16);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, 0.04), 0 28px 60px -20px rgba(16, 24, 40, 0.24);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --maxw: 1000px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(19, 24, 33, 0.06);
  padding: 0.12em 0.4em;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--panel-solid);
  padding: 10px 16px;
  border-radius: 0 0 12px 0;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ------------------------- 动态背景 ------------------------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 12% -8%, #ffffff 0%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(900px 520px at 92% 4%, #e9f7f8 0%, rgba(238, 241, 255, 0) 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

.bg__orb {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  will-change: transform;
}

.bg__orb--a {
  width: 46vw;
  height: 46vw;
  min-width: 320px;
  min-height: 320px;
  left: -8vw;
  top: -6vw;
  background: radial-gradient(circle at 30% 30%, rgba(13, 154, 170, 0.5), rgba(13, 154, 170, 0) 70%);
  animation: drift-a 26s ease-in-out infinite;
}

.bg__orb--b {
  width: 40vw;
  height: 40vw;
  min-width: 280px;
  min-height: 280px;
  right: -6vw;
  top: 12vh;
  background: radial-gradient(circle at 60% 40%, rgba(52, 211, 192, 0.4), rgba(52, 211, 192, 0) 70%);
  animation: drift-b 32s ease-in-out infinite;
}

.bg__orb--c {
  width: 34vw;
  height: 34vw;
  min-width: 240px;
  min-height: 240px;
  left: 34vw;
  bottom: -14vw;
  background: radial-gradient(circle at 50% 50%, rgba(245, 165, 36, 0.24), rgba(245, 165, 36, 0) 70%);
  animation: drift-c 38s ease-in-out infinite;
}

.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(19, 24, 33, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(19, 24, 33, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 78%);
  opacity: 0.7;
}

@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4vw, 3vh, 0) scale(1.08); }
}
@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-5vw, 5vh, 0) scale(1.12); }
}
@keyframes drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-3vw, -4vh, 0) scale(1.06); }
}

/* ------------------------- 顶栏 ------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  background: rgba(244, 245, 248, 0.72);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.01em;
  flex: 0 0 auto;
}
.brand:hover {
  text-decoration: none;
}

.brand__mark {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: conic-gradient(from 140deg, var(--accent), var(--accent-2), var(--warm), var(--accent));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7) inset, 0 4px 14px -4px var(--accent);
  animation: spin-slow 14s linear infinite;
}
@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

.brand__text {
  font-size: 15.5px;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav__link {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14.5px;
  transition: background 0.18s ease, color 0.18s ease;
}
.nav__link:hover {
  background: rgba(19, 24, 33, 0.05);
  color: var(--ink);
  text-decoration: none;
}
.nav__link.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.topbar__account {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* ------------------------- 主区域 ------------------------- */
.main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 22px 96px;
  min-height: 60vh;
  /* 建一个层叠上下文：这样 .peel（z-index:-1）是「压在本页内容下面、
     但仍在 .bg 壁纸之上」的一层，而且能正常接收指针事件。
     不给它上下文的话，负 z-index 的 .peel 会被 body 的背景盖住，
     看得见却点不到。 */
  position: relative;
  z-index: 1;
}

.hero {
  text-align: center;
  padding: 54px 0 46px;
}

.hero__eyebrow {
  margin: 0 0 14px;
  font-size: 12.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.hero__title {
  margin: 0;
  font-size: clamp(2.1rem, 6.2vw, 3.9rem);
  line-height: 1.12;
  font-weight: 750;
  letter-spacing: -0.035em;
  background: linear-gradient(96deg, #171a20 8%, var(--accent) 46%, var(--accent-2) 72%, #171a20 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 12s ease-in-out infinite;
}
@keyframes sheen {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* 标题下方小字。原来这里还有一行 hero__sub（英文欢迎语），
   和上面的英文站名 eyebrow 完全重复，已删掉，间距相应调宽一点 */
.hero__note {
  margin: 32px auto 0;
  max-width: 44ch;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  padding-top: 22px;
  position: relative;
}
.hero__note::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 1px;
  background: var(--line-strong);
}

/* ------------------------- 面板 ------------------------- */
.panel {
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  outline: 1px solid var(--line);
  outline-offset: -1px;
  border-radius: var(--radius-lg);
  padding: 26px 26px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 26px;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.28s ease;
}
.panel:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.panel--center {
  text-align: center;
}
.panel--narrow {
  max-width: 460px;
  margin: 40px auto;
}
.panel--article {
  padding: 40px 44px 44px;
}
.panel--guestbook {
  padding-bottom: 22px;
}

.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.panel__title {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
  padding-left: 16px;
}
.panel__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.34em;
  width: 4px;
  height: 1.02em;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.panel__title--lg {
  font-size: 1.6rem;
}

.panel__sub {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.panel__note {
  margin: -4px 0 18px;
  font-size: 12.5px;
  color: var(--muted);
  /* 保留一行高度：小字留空时两个模块的列表仍能左右对齐 */
  min-height: 1.5em;
}

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

/* ------------------------- 列表 ------------------------- */
.tick-list,
.track-list,
.mini-list,
.edit-list,
.admin-comments,
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tick-list__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink-2);
}
.tick-list__item:last-child {
  border-bottom: 0;
}

.tick-list__dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 0.6em;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 2.8s ease-in-out infinite;
}
.tick-list__item:nth-child(2) .tick-list__dot { animation-delay: 0.3s; }
.tick-list__item:nth-child(3) .tick-list__dot { animation-delay: 0.6s; }
.tick-list__item:nth-child(4) .tick-list__dot { animation-delay: 0.9s; }
@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 4px var(--accent-soft); }
  50% { transform: scale(1.18); box-shadow: 0 0 0 7px rgba(13, 154, 170, 0.07); }
}

.track-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}
.track-list__item:last-child {
  border-bottom: 0;
}

.track-list__index {
  counter-increment: track;
  flex: 0 0 auto;
  width: 22px;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.track-list__index::before {
  content: counter(track, decimal-leading-zero);
}
.track-list {
  counter-reset: track;
}

.track-list__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}
.track-list__title {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-list__artist {
  font-size: 12.5px;
  color: var(--muted);
}
.track-list__link {
  flex: 0 0 auto;
  font-size: 13px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  transition: background 0.18s ease, transform 0.18s ease;
}
.track-list__link:hover {
  background: rgba(13, 154, 170, 0.2);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ------------------------- 留言板 ------------------------- */
.gb-form {
  margin: 0 0 22px;
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
}

.gb-form__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.gb-form__hint {
  font-size: 12px;
}

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

.gb-item {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  margin-bottom: 12px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.gb-item:hover {
  border-color: var(--line-strong);
  transform: translateX(2px);
}

.gb-item__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.gb-item__name {
  font-weight: 650;
  font-size: 14.5px;
  color: var(--ink);
}

.gb-item__time {
  font-size: 12px;
  color: var(--muted);
}

.gb-item__body {
  color: var(--ink-2);
  font-size: 14.8px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.gb-item__reply {
  margin-top: 12px;
  padding: 10px 14px;
  border-left: 3px solid var(--accent-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(52, 211, 192, 0.09);
  font-size: 14px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.gb-item__reply-tag {
  display: inline-block;
  margin-right: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-2);
}

.gb-empty {
  text-align: center;
  padding: 22px 0;
}

/* ------------------------- 表单控件 ------------------------- */
.field {
  display: block;
  margin-bottom: 14px;
}

.field__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.input {
  width: 100%;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.input:hover {
  border-color: rgba(13, 154, 170, 0.4);
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: #fff;
}

.textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.7;
}
.textarea--mono {
  font-family: var(--font-mono);
  font-size: 13.5px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 10px;
  cursor: pointer;
}
.check input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  cursor: pointer;
}
.check--inline {
  margin-bottom: 0;
  white-space: nowrap;
}

.check-row {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin: 6px 0 16px;
}
.check-row--col {
  flex-direction: column;
  gap: 4px;
}

.stack-form {
  display: block;
}
.stack-form .btn {
  margin-top: 6px;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-form {
  display: inline;
}

/* ------------------------- 按钮 ------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent), #23c4cf);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 18px -8px rgba(13, 154, 170, 0.8);
  transition: transform 0.16s ease, box-shadow 0.18s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(13, 154, 170, 0.9);
  text-decoration: none;
}
.btn:active {
  transform: translateY(0) scale(0.99);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-2);
  border-color: var(--line-strong);
  box-shadow: none;
}
.btn--ghost:hover {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn--small {
  font-size: 13px;
  padding: 8px 14px;
}

.btn--wide {
  width: 100%;
}

.btn--icon {
  padding: 7px 10px;
  font-size: 13px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-2);
  border-color: var(--line-strong);
  box-shadow: none;
}
.btn--icon:hover {
  background: #fff;
  color: var(--ink);
}

.btn--danger {
  background: linear-gradient(135deg, #ef5350, var(--danger));
  box-shadow: 0 6px 18px -8px rgba(229, 72, 77, 0.8);
}
.btn--danger.btn--icon,
.btn--danger.btn--ghost {
  background: rgba(229, 72, 77, 0.1);
  color: var(--danger);
  border-color: rgba(229, 72, 77, 0.3);
  box-shadow: none;
}
.btn--danger.btn--icon:hover,
.btn--danger.btn--ghost:hover {
  background: var(--danger);
  color: #fff;
}

/* ------------------------- 提示 ------------------------- */
.notice {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-2);
}
.notice--ok {
  border-color: rgba(26, 157, 99, 0.32);
  background: rgba(26, 157, 99, 0.09);
  color: #10714a;
}
.notice--err {
  border-color: rgba(229, 72, 77, 0.32);
  background: rgba(229, 72, 77, 0.09);
  color: #b3262b;
}

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

.tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 650;
  padding: 2.5px 9px;
  border-radius: 999px;
  background: rgba(19, 24, 33, 0.07);
  color: var(--ink-2);
  vertical-align: middle;
}
.tag--ok {
  background: rgba(26, 157, 99, 0.14);
  color: #10714a;
}
.tag--warn {
  background: rgba(245, 165, 36, 0.18);
  color: #96650a;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.chip {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
}
.chip:hover {
  text-decoration: none;
  background: #fff;
}
.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ------------------------- 锁屏 ------------------------- */
.lock {
  text-align: center;
  padding: 70px 22px 80px;
  max-width: 440px;
  margin: 0 auto;
}

.lock__icon {
  color: var(--muted);
  margin-bottom: 18px;
  display: inline-block;
  animation: lock-bob 4.2s ease-in-out infinite;
}
@keyframes lock-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.lock__title {
  margin: 0 0 10px;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lock__note {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 14.5px;
}

.error-code {
  font-size: 3.4rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.04em;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ------------------------- 博客 ------------------------- */
.archive-year {
  margin-bottom: 28px;
}
.archive-year__label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.post-list__item {
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.post-list__item:last-child {
  border-bottom: 0;
}

.post-list__link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 600;
  flex-wrap: wrap;
}
.post-list__link:hover {
  color: var(--accent);
  text-decoration: none;
}

.post-list__date {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.post-list__title {
  flex: 1 1 auto;
}

.post-list__excerpt {
  margin: 5px 0 0 52px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.article__head {
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.article__title {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.article__sub {
  margin: 0 0 10px;
  color: var(--ink-2);
}

.article__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

.article__foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.article__nav--next {
  text-align: right;
  margin-left: auto;
}

.toc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.6);
  padding: 16px 20px;
  margin-bottom: 22px;
}
.toc__title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 24px;
}
.toc__item {
  font-size: 13.5px;
  padding: 3px 0;
  break-inside: avoid;
}
.toc__item--l2 {
  padding-left: 0;
}
.toc__item--l3 {
  padding-left: 14px;
}

/* ------------------------- 正文排版 ------------------------- */
.prose {
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-2);
}
.prose > *:first-child {
  margin-top: 0;
}
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin: 1.9em 0 0.6em;
  font-weight: 700;
  scroll-margin-top: 90px;
}
.prose h2 { font-size: 1.42rem; }
.prose h3 { font-size: 1.2rem; }
.prose h4 { font-size: 1.06rem; }
.prose h5, .prose h6 { font-size: 1rem; }
.prose p {
  margin: 0 0 1.05em;
}
.prose a {
  border-bottom: 1px solid rgba(13, 154, 170, 0.35);
}
.prose a:hover {
  text-decoration: none;
  border-bottom-color: var(--accent);
}
.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.4em;
}
.prose li {
  margin-bottom: 0.4em;
}
.prose li::marker {
  color: var(--accent);
}
.prose blockquote {
  margin: 1.3em 0;
  padding: 12px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(13, 154, 170, 0.07);
  color: var(--ink-2);
}
.prose blockquote p:last-child {
  margin-bottom: 0;
}
.prose hr {
  border: 0;
  height: 1px;
  background: var(--line-strong);
  margin: 2.2em 0;
}
.prose img {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  margin: 0.6em 0;
}
.prose .code-block {
  margin: 1.3em 0;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: #1c2030;
  color: #e6e9f2;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.prose .code-block code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.prose .table-wrap,
.table-wrap {
  overflow-x: auto;
  margin: 1.3em 0;
}
.prose table,
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.prose th,
.prose td,
.table th,
.table td {
  text-align: left;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose thead th,
.table thead th {
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
}
.prose del {
  color: var(--muted);
}

.prose--preview {
  max-height: 460px;
  overflow: auto;
  padding: 18px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
}

/* ------------------------- 分页 / 页脚 ------------------------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}
.pager__info {
  font-size: 13px;
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 26px 22px 34px;
  margin-top: 20px;
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.footer__inner a {
  color: var(--muted);
}
.footer__inner a:hover {
  color: var(--accent);
}
.footer__dot {
  opacity: 0.5;
}

/* 备案信息：规范展示核准编号并链接至工信部备案系统 */
.footer__filing {
  max-width: var(--maxw);
  margin: 12px auto 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.filing__link {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.filing__link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* 首页模块留空时的占位（无文案，仅三个呼吸的小点） */
.panel__blank {
  margin: 0;
  padding: 26px 0 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.panel__blank span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
  animation: blank-breathe 2.6s ease-in-out infinite;
}
.panel__blank span:nth-child(2) {
  animation-delay: 0.28s;
}
.panel__blank span:nth-child(3) {
  animation-delay: 0.56s;
}
@keyframes blank-breathe {
  0%, 100% { opacity: 0.28; transform: scale(0.86); }
  50% { opacity: 0.85; transform: scale(1.1); }
}

/* ------------------------- 入场动效 ------------------------- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero .reveal {
  animation: fade-up 0.72s cubic-bezier(0.16, 0.84, 0.3, 1) both;
}
.hero .hero__eyebrow { animation-delay: 0.02s; }
.hero .hero__title { animation-delay: 0.1s; }
.hero .hero__note { animation-delay: 0.2s; }

@supports (animation-timeline: view()) {
  .main .reveal {
    animation: fade-up linear both;
    animation-timeline: view();
    animation-range: entry 6% cover 26%;
  }
}

/* ------------------------- 后台 ------------------------- */
body.is-admin .main {
  max-width: 1240px;
  padding-top: 26px;
}

.admin {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.admin__side {
  position: sticky;
  top: 84px;
}

.admin__nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.7);
  outline: 1px solid var(--line);
  outline-offset: -1px;
  box-shadow: var(--shadow-sm);
}

.admin__nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink-2);
  transition: background 0.16s ease, color 0.16s ease;
}
.admin__nav-link:hover {
  background: rgba(19, 24, 33, 0.05);
  text-decoration: none;
  color: var(--ink);
}
.admin__nav-link.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
}
.admin__nav-icon {
  width: 16px;
  text-align: center;
  opacity: 0.8;
}

.admin__main {
  min-width: 0;
}

.admin__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.admin__title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.admin__sub {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

.admin__h2 {
  margin: 0 0 14px;
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 30px;
}

.stat {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.7);
  outline: 1px solid var(--line);
  outline-offset: -1px;
  box-shadow: var(--shadow-sm);
}
.stat__value {
  font-size: 1.85rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-top: 2px;
}
.stat__note {
  font-size: 12px;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.card {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.7);
  outline: 1px solid var(--line);
  outline-offset: -1px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.card__title {
  margin: 0 0 4px;
  font-size: 1.02rem;
  font-weight: 700;
}
.card__note {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
}
.card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.card__link {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  overflow-wrap: anywhere;
}

/* 「打开管理界面」等外部服务按钮 */
.btn--ext {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 6px 18px -8px rgba(13, 154, 170, 0.8);
}
.btn__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28);
}
.btn__arrow {
  font-size: 0.92em;
  opacity: 0.85;
}
.article__action {
  margin: 14px 0 0;
}

.mini-list__item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13.5px;
}
.mini-list__item:last-child {
  border-bottom: 0;
}
.mini-list__who {
  flex: 0 0 auto;
  font-weight: 650;
  color: var(--ink);
  font-size: 13px;
}
.mini-list__what {
  flex: 1 1 auto;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-list {
  margin-bottom: 18px;
}
.edit-list__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  flex-wrap: wrap;
}
.edit-list__row--track {
  align-items: center;
}
.edit-list__row--simple {
  justify-content: space-between;
}
.edit-list__info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.edit-list__form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}
.edit-list__form--track {
  flex-wrap: nowrap;
}
.edit-list__form .input {
  width: auto;
  flex: 1 1 160px;
  min-width: 90px;
}
.edit-list__form--track .input--wide {
  flex: 2 1 240px;
}
.edit-list__tools {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
}
.edit-list__tools form {
  display: inline;
}

.inline-add {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.inline-add .input {
  flex: 1 1 200px;
  width: auto;
}
.inline-add--track .input--wide {
  flex: 2 1 260px;
}

.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.ta-r {
  text-align: right;
}

.admin-comment {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.5);
}
.admin-comment.is-hidden {
  opacity: 0.62;
  border-style: dashed;
}
.admin-comment__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.admin-comment__name {
  font-weight: 650;
  font-size: 14px;
}
.admin-comment__body {
  font-size: 14px;
  color: var(--ink-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-bottom: 10px;
}
.admin-comment__reply {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.admin-comment__reply .input {
  flex: 1 1 240px;
  width: auto;
}

.secret-box {
  background: #1c2030;
  color: #9ff5d0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 14px;
  letter-spacing: 0.06em;
}
.secret-box code {
  background: none;
  color: inherit;
}
.secret-box--uri {
  letter-spacing: 0;
  font-size: 12.5px;
}

/* ------------------------- 桌宠（图片形象） ------------------------- */
.pet {
  /* 桌宠大小：想再大/小一点只改这一行（移动端在下面的 media query 里单独覆盖） */
  --pet-size: 80px;
  /* 重力状态，由 pet.js 每帧写入：离地高度 / 影子缩放 / 影子浓度 */
  --pet-air: 0px;
  --pet-shadow-s: 1;
  --pet-shadow-o: 1;
  /* 位置完全由 JS 用 transform 驱动（重力系统），不再用 right/bottom */
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  width: var(--pet-size);
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.pet[hidden] {
  display: none;
}

.pet__stage {
  position: relative;
  display: block;
  cursor: grab;
  outline: none;
  /* 落地压扁 / 被拎起来时轻微倾斜，都由变量驱动。
     过渡要短：压扁是「瞬间到位 + 一小段回弹」，拖长了就不像撞击了。
     幅度在 pet.js 的 SQUASH_MAX/SQUASH_MIN 里调，这里只管回收速度 */
  transform-origin: 50% 96%;
  transform: rotate(var(--pet-tilt, 0deg)) scale(var(--pet-sx, 1), var(--pet-sy, 1));
  transition: transform 0.1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pet.is-dragging .pet__stage {
  --pet-tilt: -4deg;
  transform-origin: 50% 25%;
}
.pet__stage:active {
  cursor: grabbing;
}
.pet.is-dragging .pet__stage {
  cursor: grabbing;
}

/* 图片本身：呼吸浮动 + 换色靠 CSS 变量 */
.pet__sprite {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
  filter: hue-rotate(var(--pet-hue, 0deg)) saturate(var(--pet-sat, 1));
  transform-origin: 50% 92%;
  animation: pet-breathe 4s ease-in-out infinite;
  will-change: transform;
}
@keyframes pet-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.012, 0.99); }
}

/* 地面投影，让角色不像浮在空中 */
/* 地面投影：宠物被拎到空中时，影子留在地面并变小变淡（--pet-air 反向平移） */
.pet__shadow {
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 62%;
  height: 10px;
  margin-left: -31%;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(16, 24, 40, 0.3), rgba(16, 24, 40, 0) 72%);
  transform: translateY(var(--pet-air, 0px)) scale(var(--pet-shadow-s, 1));
  opacity: calc(0.85 * var(--pet-shadow-o, 1));
  animation: pet-shadow 4s ease-in-out infinite;
}
@keyframes pet-shadow {
  0%, 100% {
    transform: translateY(var(--pet-air, 0px)) scale(var(--pet-shadow-s, 1));
    opacity: calc(0.85 * var(--pet-shadow-o, 1));
  }
  50% {
    transform: translateY(var(--pet-air, 0px)) scale(calc(var(--pet-shadow-s, 1) * 0.92));
    opacity: calc(0.6 * var(--pet-shadow-o, 1));
  }
}

/* ---------- 特效层：默认全隐藏，按状态出现 ---------- */
.pet__fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.pet__fx i {
  position: absolute;
  font-style: normal;
  font-weight: 800;
}

/* 睡觉：Zzz 往上飘 */
.pet__fx--zzz i {
  right: 6%;
  color: #6b8f9c;
  font-size: 15px;
  text-shadow: 0 1px 0 #fff;
}
.pet__fx--zzz i:nth-child(1) { top: 22%; font-size: 20px; animation: zzz 3s ease-in-out infinite; }
.pet__fx--zzz i:nth-child(2) { top: 12%; right: 16%; animation: zzz 3s ease-in-out 0.7s infinite; }
.pet__fx--zzz i:nth-child(3) { top: 4%; right: 26%; font-size: 12px; animation: zzz 3s ease-in-out 1.4s infinite; }
@keyframes zzz {
  0% { opacity: 0; transform: translateY(6px) rotate(-8deg); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-14px) rotate(10deg); }
}

/* 开心：周围冒星星 */
.pet__fx--spark i { color: #ffd166; font-size: 13px; text-shadow: 0 0 6px rgba(255, 209, 102, 0.9); }
.pet__fx--spark i:nth-child(1) { top: 10%; left: 8%; animation: spark 1.1s ease-out infinite; }
.pet__fx--spark i:nth-child(2) { top: 6%; right: 12%; font-size: 10px; animation: spark 1.1s ease-out 0.25s infinite; }
.pet__fx--spark i:nth-child(3) { top: 34%; right: 2%; animation: spark 1.1s ease-out 0.5s infinite; }
.pet__fx--spark i:nth-child(4) { top: 28%; left: 0%; font-size: 9px; animation: spark 1.1s ease-out 0.75s infinite; }
@keyframes spark {
  0% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  40% { opacity: 1; transform: scale(1.1) rotate(40deg); }
  100% { opacity: 0; transform: scale(0.5) rotate(90deg); }
}

/* 被摸：飘心 */
.pet__fx--heart i { color: #ff6b95; font-size: 14px; }
.pet__fx--heart i:nth-child(1) { top: 18%; right: 4%; animation: heart 1.4s ease-out infinite; }
.pet__fx--heart i:nth-child(2) { top: 26%; right: 20%; font-size: 10px; animation: heart 1.4s ease-out 0.5s infinite; }
@keyframes heart {
  0% { opacity: 0; transform: translateY(4px) scale(0.5); }
  30% { opacity: 1; transform: translateY(-4px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-18px) scale(0.8); }
}

/* 被搬烦了：怒气符号 */
.pet__fx--anger i {
  top: 8%;
  right: 10%;
  color: #e5484d;
  font-size: 20px;
  animation: anger-pop 0.5s ease-out infinite alternate;
}
@keyframes anger-pop {
  from { transform: scale(0.9) rotate(-6deg); }
  to { transform: scale(1.15) rotate(6deg); }
}

.pet.is-sleeping .pet__fx--zzz,
.pet.is-happy .pet__fx--spark,
.pet.is-petted .pet__fx--heart,
.pet.is-angry .pet__fx--anger {
  opacity: 1;
}
.pet.is-sleeping .pet__fx--spark,
.pet.is-happy .pet__fx--zzz {
  opacity: 0;
}

/* ---------- 各种动作 ---------- */

/* 开心：原地蹦两下 */
.pet.is-happy .pet__sprite {
  animation: pet-hop 0.34s cubic-bezier(0.3, 0.7, 0.4, 1) 3;
}
@keyframes pet-hop {
  0%, 100% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-16px) scale(1.05, 0.95); }
  70% { transform: translateY(0) scale(0.97, 1.04); }
}

/* 睡觉：歪倒 + 缓慢呼吸 */
.pet.is-sleeping .pet__sprite {
  animation: pet-sleep 4.6s ease-in-out infinite;
  transform: rotate(78deg) translateY(6px);
}
@keyframes pet-sleep {
  0%, 100% { transform: rotate(78deg) translateY(6px) scale(1); }
  50% { transform: rotate(78deg) translateY(4px) scale(1.02, 0.985); }
}
.pet.is-sleeping .pet__stage {
  transform: translateX(14%) translateY(6%);
  transition: transform 0.5s ease;
}
.pet.is-sleeping .pet__shadow {
  animation: none;
  opacity: 0.5;
  width: 76%;
  margin-left: -38%;
}

/* 跳舞：左右摇摆 */
.pet.is-dancing .pet__sprite {
  animation: pet-dance 0.62s ease-in-out infinite;
}
@keyframes pet-dance {
  0%, 100% { transform: rotate(-9deg) translateY(0) scale(1); }
  50% { transform: rotate(9deg) translateY(-7px) scale(1.03, 0.98); }
}

/* 转圈：整只转一圈 */
.pet.is-spinning .pet__sprite {
  animation: pet-spin 1.4s cubic-bezier(0.45, 0, 0.55, 1) 1;
}
@keyframes pet-spin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(190deg) scale(0.9); }
  100% { transform: rotate(360deg) scale(1); }
}

/* 拖拽中：歪一下表示被拎起来 */
.pet.is-dragging .pet__sprite {
  animation: none;
  transform: rotate(-7deg) scale(1.02);
}

.pet.is-dragging .pet__shadow {
  animation: none;
  opacity: 0.4;
  transform: scale(0.85);
}

/* ---------- 气泡与菜单 ---------- */
.pet__bubble {
  position: absolute;
  bottom: calc(100% - 6px);
  right: 4px;
  /* 关键一：桌宠只有 80px 宽，而它是气泡的包含块。若用默认的 width:auto，
     收缩到合适宽度的可用空间就只有 80-4=76px，max-width 再大也轮不到生效，
     文字会被压成一行四五个字。所以必须给一个显式宽度（max-content），
     让宽度只受下面的 max-width 约束。
     关键二：上限要放得下最长的一句台词。上限一旦小于某句的宽度，那
     句就会折行，而盒子仍占满上限——第二行右边会空出一大片（曾经的 bug）。
     现在所有台词都能放进一行，max-content 就是精确贴合文字。 */
  width: max-content;
  max-width: 320px; /* 老浏览器不认 min() 时的兜底 */
  max-width: min(320px, calc(100vw - 20px));
  padding: 9px 13px;
  border-radius: 14px 14px 4px 14px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  /* 两行时让两行长短接近，比留个孤字好看；老浏览器会忽略这一行 */
  text-wrap: pretty;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  opacity: 0;
  transform: translateY(6px) scale(0.94);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
  white-space: pre-wrap;
}
/* 桌宠跑到屏幕左半边时翻到右侧，免得气泡顶出屏幕（尾巴方向也跟着翻） */
.pet__bubble.is-flipped {
  right: auto;
  left: 4px;
  border-radius: 14px 14px 14px 4px;
}
.pet__bubble.is-on {
  opacity: 1;
  transform: none;
}

.pet__menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 4px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  width: 142px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.pet__menu[hidden] {
  display: none;
}
.pet__menu-btn {
  font: inherit;
  font-size: 13px;
  text-align: left;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.pet__menu-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.pet__menu-btn--hide {
  color: var(--danger);
}
.pet__menu-btn--hide:hover {
  background: rgba(229, 72, 77, 0.1);
  color: var(--danger);
}

.pet-restore {
  position: fixed;
  right: 20px;
  bottom: 18px;
  z-index: 60;
}
.pet-restore[hidden] {
  display: none;
}
.pet-restore__btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.pet-restore__btn:hover {
  transform: scale(1.08) rotate(-6deg);
}

@media (prefers-reduced-motion: reduce) {
  .pet__sprite, .pet__shadow, .pet__fx i { animation: none !important; }
}

/* ------------------------- 响应式 ------------------------- */
@media (max-width: 900px) {
  .admin {
    /* 必须是 minmax(0, 1fr)：用 1fr 的话，它的最小值是 min-content，
       下面那条「横着排、nowrap」的导航会把整列撑到一千多像素，
       于是手机和平板上整个后台都能左右晃。 */
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .admin__side,
  .admin__main {
    min-width: 0;
  }
  .admin__side {
    position: static;
  }
  .admin__nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    /* 右边渐隐一点，暗示这一条还能往左滑 */
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
  }
  .admin__nav-link {
    white-space: nowrap;
    flex: 0 0 auto;
  }
  .grid--3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .grid--2 {
    grid-template-columns: 1fr;
  }
  .main {
    padding: 24px 16px 110px;
  }
  .panel {
    padding: 20px 18px 22px;
    border-radius: var(--radius);
  }
  .panel--article {
    padding: 26px 20px 30px;
  }
  .topbar__inner {
    padding: 10px 16px;
    gap: 10px;
  }
  .brand__text {
    display: none;
  }
  .nav {
    gap: 2px;
  }
  .nav__link {
    padding: 6px 9px;
    font-size: 13.5px;
  }
  .toc__list {
    columns: 1;
  }
  .edit-list__form--track {
    flex-wrap: wrap;
  }
  .track-list__index {
    display: none;
  }
  .pet {
    --pet-size: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .bg__orb {
    animation: none;
  }
}

/* ============================================================

/* ============================================================
   趣味模块样式（塑料箱内壁 / 咸鱼标志 / 小游戏 / 铝箔 / 自习室 / 博物馆 / 成员）
   说明：视觉以「好看」为先，不再追求手作粗糙感。
   ============================================================ */

/* 花体英文字体（SIL OFL，自托管，仅用于铝箔上的 Al） */
@font-face {
  font-family: 'Great Vibes';
  src: url('/assets/fonts/great-vibes.woff2') format('woff2');
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  --font-hand: 'Bradley Hand', 'Chalkboard SE', 'Segoe Print', 'Kaiti SC', KaiTi,
    'STKaiti', 'KaiTi_GB2312', cursive;
}

/* ------------------------- 收纳箱内壁 -------------------------
   处于最底层（z-index 为负），永远不遮挡前面的组件；
   边框做成「左右两侧略深、中间偏淡」的水平渐变，并有两层缓慢流动的光。 */
.bg { z-index: -3; }

.plastic {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  border-radius: 26px;
}

/* 静边框：水平渐变，两侧深、中间淡 */
.plastic::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 11px;
  background: linear-gradient(
    90deg,
    rgba(126, 172, 184, 0.34) 0%,
    rgba(196, 226, 232, 0.3) 14%,
    rgba(255, 255, 255, 0.34) 32%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.34) 68%,
    rgba(196, 226, 232, 0.3) 86%,
    rgba(126, 172, 184, 0.34) 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

/* 两层反向流动的高光，模拟灯光在塑料内壁上的反光 */
.plastic__shine,
.plastic::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 11px;
  mix-blend-mode: screen;
  background-size: 280% 100%;
  background-repeat: no-repeat;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.plastic__shine {
  background-image: linear-gradient(
    104deg,
    rgba(255, 255, 255, 0) 36%,
    rgba(255, 255, 255, 0.8) 48%,
    rgba(190, 240, 245, 0.55) 53%,
    rgba(255, 255, 255, 0) 66%
  );
  animation: plastic-flow 12s ease-in-out infinite;
}
.plastic::after {
  background-image: linear-gradient(
    -74deg,
    rgba(255, 255, 255, 0) 40%,
    rgba(214, 246, 250, 0.6) 50%,
    rgba(255, 255, 255, 0) 62%
  );
  animation: plastic-flow-alt 19s ease-in-out infinite;
}
@keyframes plastic-flow {
  0%, 100% { background-position: 130% 0; }
  50% { background-position: -30% 0; }
}
@keyframes plastic-flow-alt {
  0%, 100% { background-position: -25% 0; }
  50% { background-position: 125% 0; }
}

/* 箱口加强边 + 四角卡扣 */
.plastic__lip {
  position: absolute;
  left: -11px;
  right: -11px;
  top: -11px;
  height: 12px;
  border-radius: 26px 26px 5px 5px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(233, 249, 251, 0.24));
  animation: plastic-glow 9s ease-in-out infinite;
}
.plastic__tab {
  position: absolute;
  width: 22px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(226, 245, 248, 0.4));
}
.plastic__tab--tl { left: 16px; top: -8px; }
.plastic__tab--tr { right: 16px; top: -8px; }
.plastic__tab--bl { left: 16px; bottom: -8px; }
.plastic__tab--br { right: 16px; bottom: -8px; }
@keyframes plastic-glow {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@media (max-width: 720px) {
  .plastic, .plastic::before, .plastic__shine, .plastic::after { border-radius: 20px; }
  .plastic::before, .plastic__shine, .plastic::after { padding: 8px; }
  .plastic__lip { left: -8px; right: -8px; top: -8px; height: 9px; }
  .plastic__tab--tl, .plastic__tab--tr { top: -6px; }
  .plastic__tab--bl, .plastic__tab--br { bottom: -6px; }
}
@media (prefers-reduced-motion: reduce) {
  .plastic__shine, .plastic::after, .plastic__lip { animation: none; }
}

/* ------------------------- 咸鱼标志 ------------------------- */
.brand__fish {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 42%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 4px 12px -4px rgba(13, 154, 170, 0.6);
  animation: spin-slow 18s linear infinite;
  transform-origin: 50% 50%;
}
.brand:hover .brand__fish { animation-duration: 2.4s; }
@media (prefers-reduced-motion: reduce) {
  .brand__fish { animation: none; }
}

/* ------------------------- 小游戏 ------------------------- */
.game-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 13px;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.game-btn:hover {
  background: #fff;
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.game-btn__paddle {
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 4px 3px 0 -1px rgba(19, 24, 33, 0.3);
}
@media (max-width: 860px) {
  .game-btn__label { display: none; }
  .game-btn { padding: 6px 10px; }
}

.game[hidden] { display: none; }
.game {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.game__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 24, 30, 0.42);
  backdrop-filter: blur(3px);
}
.game__panel {
  position: relative;
  width: min(640px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 20px 22px 18px;
  border-radius: 20px;
  background: var(--panel-solid);
  border: 1px solid rgba(19, 24, 33, 0.08);
  box-shadow: 0 40px 80px -30px rgba(10, 20, 30, 0.5);
  animation: game-in 0.24s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes game-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.game__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.game__title { margin: 0; font-size: 1.18rem; letter-spacing: -0.02em; }
.game__close {
  font: inherit;
  font-size: 14px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-2);
  cursor: pointer;
}
.game__close:hover { background: #fff; color: var(--ink); }
.game__hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.8; }
.game__canvas {
  display: block;
  width: 100%;
  aspect-ratio: 560 / 360;
  margin: 12px 0 10px;
  border-radius: 14px;
  touch-action: none;
  cursor: grab;
  background: #eaf4f5;
  box-shadow: inset 0 0 0 1px rgba(19, 24, 33, 0.08);
}
.game__canvas:active { cursor: grabbing; }
.game__bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.game__score {
  font-size: 1.3rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.game__score i { opacity: 0.4; font-style: normal; margin: 0 4px; }
.game__meta { font-size: 12.5px; color: var(--muted); margin-right: auto; }
.game__foot { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
body.is-playing { overflow: hidden; }

/* ------------------------- 壁纸下的铝箔（左上角撕开一角） -------------------------
   页面自己的壁纸就在那儿，这里不伪造它，只画两件东西：
     1. .peel__hole —— 被撕掉的左上角三角形，露出下面的铝箔
     2. .peel__flap —— 撕开的那一角翻折过来，贴在剩下的壁纸上
   撕开的边长由 --p 控制（由 foil.js 在拖动时改写）；整块 z-index 为负，
   压在内容下面、壁纸上面，所以只会在壁纸的留白处露出来。 */
.peel {
  --p: 44px;          /* 当前撕开的边长 */
  --p-base: 44px;     /* 天生就翘起来的那一点 */
  --p-max: 128px;     /* 最多能撕多大 */
  position: fixed;
  left: 0;
  top: 62px;          /* 正好从顶栏下沿开始，像是壁纸自己的角 */
  width: 260px;
  height: 260px;
  z-index: -1;
  /* 自己不接收指针事件：它为了待在壁纸层里用了负 z-index，
     命中测试会被 body / .main 挡掉；拖动改在 document 上按坐标判断。
     这样一来这块 260×260 的盒子也永远不会挡住页面内容。 */
  pointer-events: none;
  touch-action: none;
}

/* 洞：左上角三角形，里面是铝箔 */
.peel__hole {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0 0, var(--p) 0, 0 var(--p));
}
/* 壁纸投在铝箔上的影子：沿斜边最深，往墙角渐淡 */
.peel__hole::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: var(--p);
  height: var(--p);
  background: linear-gradient(135deg, rgba(16, 24, 40, 0) 30%, rgba(16, 24, 40, 0.45) 88%, rgba(16, 24, 40, 0.6) 100%);
  pointer-events: none;
}

.peel__foil {
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* 铝箔的关键是「明暗条带 + 折痕」而不是柔和渐变：
     硬停的重复渐变做出金属的镜面条纹，再叠一层大尺度明暗。 */
  background:
    repeating-linear-gradient(
      115deg,
      #fdfefe 0px, #e6eef2 5px, #a8bac5 11px, #f2f7f9 17px, #bccbd3 25px, #fbfdfe 33px
    ),
    linear-gradient(150deg, rgba(255, 255, 255, 0.5) 0%, rgba(120, 145, 160, 0.28) 52%, rgba(255, 255, 255, 0.35) 100%);
  background-blend-mode: overlay, normal;
}
.peel__crumple {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 40% at 22% 30%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 60%),
    radial-gradient(50% 34% at 74% 66%, rgba(150, 168, 178, 0.35), rgba(255, 255, 255, 0) 62%),
    radial-gradient(42% 30% at 46% 84%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 60%);
}
.peel__glare {
  position: absolute;
  inset: -20% -40%;
  background: linear-gradient(104deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 62%);
  transform: translateX(-24%);
  animation: foil-glare 6.5s ease-in-out infinite;
}
@keyframes foil-glare {
  0%, 62%, 100% { transform: translateX(-30%); opacity: 0.45; }
  36% { transform: translateX(28%); opacity: 0.95; }
}
/* 花体 Al（大写 A + 小写 l）。
   位置和字号都**不随撕口变化** —— 它是「印在铝箔上的字」，
   撕开多少就露出多少，而不是被放大。只在整块撕下来之后淡入。
   尺寸锚在 --p-max 上，这样各个断点都刚好落在撕满时的三角形里。 */
.peel__script {
  position: absolute;
  left: calc(var(--p-max) * 0.1);
  top: calc(var(--p-max) * 0.24);
  font-family: 'Great Vibes', 'Snell Roundhand', 'Apple Chancery', 'Segoe Script', cursive;
  font-size: calc(var(--p-max) * 0.24);
  line-height: 1;
  color: rgba(58, 74, 88, 0.72);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85), 0 -1px 0 rgba(90, 110, 125, 0.25);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.55s ease 0.12s;
  animation: foil-sheen 5.5s ease-in-out infinite;
}
.peel.is-torn .peel__script { opacity: 1; }
/* 微光用 filter 而不是 opacity，免得和上面的淡入打架 */
@keyframes foil-sheen {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.22); }
}

/* 折角：把撕掉的那块三角形沿斜边翻折过来，落在剩下的壁纸上。
   三角形 (p,0)-(0,p)-(p,p) 正好是 (0,0)-(p,0)-(0,p) 关于斜边的镜像。 */
.peel__flap {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--p);
  height: var(--p);
  clip-path: polygon(100% 100%, 100% 0, 0 100%);
  /* 135deg 轴上：50% 处是折线（最亮），100% 是外角（略暗，像背面）。
     壁纸背面是白纸，所以要明显比壁纸亮，否则跟壁纸糊在一起。 */
  background: linear-gradient(135deg, #ffffff 0%, #f7fbfc 46%, #cfdde3 100%);
  filter: drop-shadow(-2px 3px 5px rgba(16, 24, 40, 0.3));
  transition: transform 0.18s ease, opacity 0.18s ease;
}
/* 撕下来的那一刻：这一角被拿走，只剩洞 */
.peel.is-torn .peel__flap {
  transform: translate(46%, 46%) rotate(-14deg);
  opacity: 0;
}


.peel__reset {
  position: absolute;
  left: 16px;
  bottom: 12px;
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink-2);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, background 0.18s ease;
}
.peel.is-open .peel__reset,
.peel.is-torn .peel__reset { opacity: 1; }
/* 只有这个小按钮需要可点 */
.peel.is-open .peel__reset,
.peel.is-torn .peel__reset,
.peel__reset { pointer-events: auto; }
.peel__reset:hover { background: #fff; color: var(--ink); }
.peel:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; }

@media (max-width: 720px) {
  .peel {
    top: 56px;
    width: 200px;
    height: 200px;
    --p: 34px;
    --p-base: 34px;
    --p-max: 92px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .peel__glare, .peel__script { animation: none; }
}

/* ------------------------- .xyy 令牌登录 ------------------------- */
.token-login { margin-bottom: 6px; }
.token-login__hint { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 14px;
  border: 2px dashed rgba(13, 154, 170, 0.4);
  border-radius: 16px;
  background: rgba(13, 154, 170, 0.05);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.16s ease;
}
.dropzone:hover, .dropzone.is-over {
  background: rgba(13, 154, 170, 0.11);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.dropzone.is-loaded {
  border-style: solid;
  background: rgba(26, 157, 99, 0.09);
  border-color: rgba(26, 157, 99, 0.5);
}
.dropzone.is-shake { animation: dz-shake 0.4s ease; }
@keyframes dz-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.dropzone__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone__icon {
  display: inline-flex;
  align-items: center; font-size: 22px; }
.dropzone__text { font-size: 13.5px; color: var(--ink-2); }
.token-login__paste { margin: 12px 0; font-size: 13px; color: var(--muted); }
.token-login__paste summary { cursor: pointer; }
.token-login__paste textarea { margin-top: 8px; }
.token-login__only { margin-top: 14px; }
.login-sep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  color: var(--muted);
  font-size: 12.5px;
}
.login-sep::before, .login-sep::after { content: ''; flex: 1 1 auto; height: 1px; background: var(--line-strong); }
.token-status { font-size: 13.5px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-actions--start { justify-content: flex-start; margin: 12px 0; }
.token-note { margin-top: 14px; line-height: 1.8; }

.edit-list__time {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- 「最近在干啥 / 听啥」的历史记录 ----------
   后台里每块列表下面挂一个折叠区：被替换或删掉的条目留档在这里，
   文字和时间都能改。 */
.history {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}
.history > summary {
  padding: 11px 15px;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  user-select: none;
}
.history > summary:hover { color: var(--ink-2); }
.history[open] > summary { border-bottom: 1px solid var(--line); }
.history > p {
  margin: 12px 15px 0;
  font-size: 12.5px;
  line-height: 1.7;
}
.history__list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0 15px;
}
.history__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 0;
  border-top: 1px dashed var(--line-strong);
}
.history__row:first-child { border-top: 0; }
.history__form { flex: 1 1 auto; min-width: 0; }
.history__fields {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.history__fields .input { flex: 1 1 150px; min-width: 0; }
.history__meta {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 12px;
}
.history__time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.input--time {
  width: auto;
  padding: 4px 8px;
  font-size: 12px;
}
.history__clear {
  padding: 4px 15px 15px;
}

/* ---------- 登录 / 申请 / 找回：同页三块 ---------- */
/* .main 没有 gap，同一页并列的 panel 之间得自己补间距 */
.auth-block + .auth-block {
  margin-top: 22px;
}
/* 从 /login#apply、/login#recover 跳过来时，别被吸顶导航盖住标题 */
#login,
#apply,
#recover {
  scroll-margin-top: 86px;
}
/* 折叠块：站长的口令入口、以及「直接粘贴钥匙」 */
.auth__fold {
  margin: 0 0 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}
.auth__fold > summary {
  padding: 11px 15px;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  user-select: none;
}
.auth__fold > summary:hover {
  color: var(--ink-2);
}
.auth__fold[open] > summary {
  border-bottom: 1px solid var(--line);
}
.auth__fold .stack-form {
  padding: 15px 15px 3px;
}

/* ---------- 单选胶囊组（「保持登录」用）----------
   不用 <select>：原生下拉框各平台长得都不一样，跟这套界面不搭。 */
.pill-set {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}
.pill-set .field__label {
  display: block;
  margin-bottom: 7px;
}
.pill-set__row {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.pill {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}
/* 视觉隐藏但保留可聚焦：用 clip 而不是 left:-9999px，
   否则键盘聚焦时浏览器会为了把它滚进视口而跳页 */
.pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  white-space: nowrap;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}
.pill span {
  display: block;
  padding: 8px 4px;
  border-radius: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.pill span:hover {
  color: var(--ink-2);
}
.pill input:checked + span {
  background: var(--panel-solid);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1), 0 8px 18px -10px rgba(16, 24, 40, 0.3);
}
.pill input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.pill-set__hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- 登录页底部的两个小按键：注册 key / 丢了 key ----------
   普通用户平时只会用到上面的登录框，这两条是次要路径，所以做成两个
   并排的小卡片，点进去才是独立页面。 */
.auth-alt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
}
.auth-alt__btn {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease,
    transform 0.16s ease, box-shadow 0.16s ease;
}
.auth-alt__btn:hover {
  border-color: var(--accent);
  background: var(--panel-solid);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -12px rgba(16, 24, 40, 0.45);
}
.auth-alt__k {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.auth-alt__d {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}
.auth-alt__btn.is-off {
  opacity: 0.5;
  pointer-events: none;
}
/* 注册 / 找回 页面上的「回到登录」 */
.auth-back {
  margin: 22px 0 0;
  font-size: 13px;
}
.auth-back a {
  color: var(--muted);
  text-decoration: none;
}
.auth-back a:hover {
  color: var(--accent);
}

@media (max-width: 420px) {
  .pill span { font-size: 12px; padding: 8px 2px; }
  .auth-alt { grid-template-columns: 1fr; }
}

/* ------------------------- 赛博自习室 ------------------------- */
.study-id { margin: 4px 0 20px; }
.study-id__line { margin: 0; font-size: 14.5px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.study-id__nick { color: var(--accent); font-size: 1.06rem; }
.study-id__rename { font-size: 13px; }
.study-id__form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.field--inline { margin-bottom: 0; }

.study-room {
  padding: 18px 16px 20px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(244, 248, 249, 0.6));
  border: 1px solid var(--line);
}
.study-room__board {
  text-align: center;
  margin: -4px auto 18px;
  max-width: 460px;
  padding: 7px 14px;
  border-radius: 8px;
  background: #223038;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.study-room__board-text { font-size: 12.5px; color: #9fe8d8; letter-spacing: 0.04em; }
.study-row {
  display: grid;
  grid-template-columns: 34px repeat(6, minmax(0, 1fr));
  gap: 9px;
  align-items: center;
  margin-bottom: 9px;
}
.study-row__no { font-size: 11.5px; color: var(--muted); }
.seat {
  position: relative;
  min-height: 62px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 3px;
  transition: transform 0.16s ease, box-shadow 0.18s ease, background 0.2s ease;
}
.seat:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.seat.is-taken {
  background: linear-gradient(180deg, rgba(13, 154, 170, 0.13), rgba(52, 211, 192, 0.1));
  border-color: rgba(13, 154, 170, 0.3);
}
.seat.is-mine {
  background: linear-gradient(180deg, rgba(245, 165, 36, 0.18), rgba(245, 165, 36, 0.08));
  border-color: rgba(217, 136, 54, 0.45);
  box-shadow: 0 0 0 2px rgba(245, 165, 36, 0.22);
}
.seat__no {
  position: absolute;
  left: 5px;
  top: 3px;
  font-size: 10px;
  color: rgba(120, 130, 145, 0.7);
  font-variant-numeric: tabular-nums;
}
.seat__lamp {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(140, 150, 160, 0.35);
}
.seat.is-taken .seat__lamp {
  background: #35d0a5;
  box-shadow: 0 0 0 3px rgba(53, 208, 165, 0.18);
  animation: lamp 2.6s ease-in-out infinite;
}
@keyframes lamp {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.seat__who {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.seat__who--empty { color: rgba(140, 150, 160, 0.6); font-weight: 400; }
.seat__form { margin: 0; }
.seat__btn {
  font: inherit;
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 7px;
  border: 1px solid rgba(13, 154, 170, 0.35);
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  cursor: pointer;
}
.seat__btn:hover { background: var(--accent); color: #fff; }
.study-leave { margin-top: 18px; }

@media (max-width: 720px) {
  .study-row { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
  .study-row__no { display: none; }
  .seat { min-height: 52px; }
  .seat__who { font-size: 11px; }
}

/* ------------------------- 赛博博物馆 ------------------------- */
.museum__head { margin-bottom: 22px; }
.museum__eyebrow {
  margin: 0 0 6px;
  font-size: 11.5px;
  letter-spacing: 0.28em;
  color: var(--muted);
  font-weight: 600;
}
.museum__title {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 4.4vw, 2.3rem);
  font-weight: 750;
  letter-spacing: -0.03em;
}
.museum__sub { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.museum__halls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.hall {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}
.hall--open:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.hall--open { border-color: rgba(13, 154, 170, 0.35); background: linear-gradient(180deg, #fff, rgba(233, 248, 249, 0.9)); }
.hall--closed { opacity: 0.62; }
.hall__no { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.1em; }
.hall__name { font-size: 1.06rem; font-weight: 700; color: var(--ink); }
.hall__desc { font-size: 12.5px; color: var(--muted); }
.hall__count { margin-top: 8px; font-size: 11.5px; color: var(--accent); font-weight: 600; }
.hall--closed .hall__count { color: var(--muted); }
.museum__case {
  padding: 22px 20px 20px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 249, 250, 0.8));
  border: 1px solid var(--line);
}
.museum__case-title { margin: 0 0 14px; font-size: 1.04rem; font-weight: 700; }
.exhibit-list { list-style: none; margin: 0 0 16px; padding: 0; }
.exhibit { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px dashed var(--line); }
.exhibit:last-child { border-bottom: 0; }
.exhibit__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(19, 24, 33, 0.06);
}
.exhibit__link { flex: 1 1 auto; font-weight: 600; color: var(--ink); }
.exhibit__link:hover { color: var(--accent); }
.exhibit__date { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ------------------------- 成员申请 / 后台成员管理 ------------------------- */
.panel__head--stack { align-items: flex-start; flex-direction: column; gap: 8px; }
.member-form { max-width: 460px; }
.member-form .field { margin-bottom: 14px; }
.member-note { margin-top: 18px; font-size: 13px; line-height: 1.9; color: var(--muted); }
.member-list { list-style: none; margin: 0; padding: 0; }
.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-bottom: 1px dashed var(--line);
}
.member-row:last-child { border-bottom: 0; }
.member-row__who { display: flex; flex-direction: column; min-width: 180px; flex: 1 1 220px; }
.member-row__name { font-weight: 650; color: var(--ink); }
.member-row__mail { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.member-row__meta { font-size: 12px; color: var(--muted); }
.key-reveal {
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: #1c2030;
  color: #9ff5d0;
}
.key-reveal__label { margin: 0 0 8px; font-size: 12px; letter-spacing: 0.12em; color: #7fd8bb; }
.key-reveal__value {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  word-break: break-all;
  white-space: pre-wrap;
  cursor: pointer;
}
.key-reveal__hint { margin: 10px 0 0; font-size: 12px; color: #86c9b4; }
.admin__h3 {
  margin: 20px 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

/* 顶栏里已登录成员的小标记 */
.who {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line-strong);
}
.who:hover { text-decoration: none; color: var(--ink); background: #fff; }
.who__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #35d0a5;
  box-shadow: 0 0 0 3px rgba(53, 208, 165, 0.18);
}

/* 面包屑：说明「文字馆」属于赛博博物馆 */
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs__sep { opacity: 0.6; }
.crumbs__here { color: var(--ink-2); font-weight: 600; }

/* 小游戏：三维球台底部工具栏 */
.game__auto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.game__auto input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}
.game__hint kbd {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 1px 5px;
  margin: 0 1px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  background: rgba(255, 255, 255, 0.9);
}
.game__canvas { background: #dfecef; }

/* 小游戏：球速档位（分段按钮） */
.game__speed {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(19, 24, 33, 0.06);
  border: 1px solid var(--line);
}
.game__speed-label {
  font-size: 11.5px;
  color: var(--muted);
  padding: 0 6px 0 8px;
  white-space: nowrap;
}
.game__speed button {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.game__speed button:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
}
.game__speed button.is-on {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 3px 10px -4px rgba(13, 154, 170, 0.9);
}
@media (max-width: 560px) {
  .game__speed-label { display: none; }
  .game__speed button { padding: 4px 8px; font-size: 12px; }
}

/* ---------- 桌宠互动道具：摸摸的手 / 喂食的饭盆 ----------
   手是平涂线稿，分层描摹成 SVG 几乎无损（6KB）；
   饭盆是带柔和明暗的绘画，量化会把高光糊成色块，所以保留 PNG（14KB）。
   位置是拿真实尺寸合成预览调出来的，别随手动。 */
.pet__hand,
.pet__food {
  position: absolute;
  display: block;
  height: auto;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
  filter: drop-shadow(0 2px 4px rgba(16, 24, 40, 0.2));
  -webkit-user-drag: none;
}

/* 摸摸：手从右上方按下来，在头顶蹭两下再收回 */
.pet__hand {
  left: 27%;
  top: -16%;
  width: 56%;
  transform-origin: 64% 30%;
}
.pet.is-petting .pet__hand {
  animation: hand-pat 1.7s cubic-bezier(0.3, 0.8, 0.4, 1) 1;
}
@keyframes hand-pat {
  0% { opacity: 0; transform: translate(34%, -50%) rotate(-16deg) scale(0.94); }
  14% { opacity: 1; }
  28% { transform: translate(3%, 2%) rotate(-2deg) scale(1); }
  42% { transform: translate(1%, -8%) rotate(-6deg) scale(1.03); }
  56% { transform: translate(3%, 3%) rotate(-1deg) scale(1); }
  70% { transform: translate(1%, -7%) rotate(-5deg) scale(1.03); }
  84% { opacity: 1; }
  100% { opacity: 0; transform: translate(30%, -46%) rotate(-14deg) scale(0.95); }
}

/* 喂食：饭盆从左边端过来放在脚前，宠物低头吃，再端走 */
.pet__food {
  left: -20%;
  top: 64%;
  width: 64%;
  transform-origin: 32% 92%;
}
.pet.is-feeding .pet__food {
  animation: food-in 2.2s cubic-bezier(0.3, 0.8, 0.4, 1) 1;
}
@keyframes food-in {
  0% { opacity: 0; transform: translate(-66%, 18%) rotate(-5deg) scale(0.9); }
  16% { opacity: 1; }
  38% { transform: translate(0, 0) rotate(0deg) scale(1); }
  74% { transform: translate(0, -2%) rotate(0deg) scale(1); }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translate(-60%, 16%) rotate(-4deg) scale(0.92); }
}

/* 吃饭时宠物咀嚼（很轻的缩放抖动，只嚼一小会儿） */
.pet.is-feeding .pet__sprite {
  animation: pet-chew 0.2s ease-in-out 4;
}
@keyframes pet-chew {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.015, 0.982); }
}

@media (prefers-reduced-motion: reduce) {
  .pet__hand, .pet__food { animation: none !important; opacity: 0 !important; }
  .pet.is-feeding .pet__sprite { animation: none !important; }
}

/* ---------- 触屏设备（手机 / 平板）额外照顾 ----------
   用 hover/pointer 而不是宽度判断：iPad 竖屏 768px 也在这条范围内，
   而窄窗口的桌面浏览器不需要被改。 */
@media (hover: none) and (pointer: coarse) {
  /* iOS Safari 在 font-size < 16px 的输入框上聚焦时会自动放大整页，
     并把页面滚到控件上——填表时时体验很糟。16px 是那条门槛。 */
  /* 必须用类选择器：上面的 .input / .textarea--mono 都是 (0,1,0)，
     用元素选择器压不住它们。这里同优先级、位置更靠后，所以能赢。 */
  .input,
  .textarea,
  .textarea--mono,
  input:not([type='checkbox']):not([type='radio']),
  textarea,
  select {
    font-size: 16px;
  }
  /* 手指点得准：主要控件至少 44px 高，小按钮 40px */
  .btn {
    min-height: 44px;
  }
  .btn--small {
    min-height: 40px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .btn--icon {
    min-width: 40px;
    min-height: 40px;
  }
  /* 顶栏链接：多给一点纵向内边距，别只有 15px 高 */
  .nav__link {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  /* 独立成块的「次要链接」（不在正文句子里，属于独立控件）也放大到好点 */
  .auth-back a,
  .exhibit__link,
  .footer a,
  .crumbs a {
    display: inline-block;
    padding: 9px 0;
  }
  /* 页脚那一排用圆点分隔，加了 padding 之后要保证分隔符还对齐 */
  .footer__dot {
    display: inline-block;
    vertical-align: middle;
  }
  .auth-alt__btn {
    padding: 15px 14px;
  }
  /* 桌宠在触屏上默认小一号，别挡住角落里的按钮 */
  .peel__reset,
  .peel__hint {
    padding: 8px 13px;
    font-size: 13px;
  }
  .pill span {
    padding: 11px 4px;
  }
  .seat {
    min-height: 56px;
  }
  .seat__no {
    font-size: 11.5px;
  }
  /* 整行都是链接的列表项：多给点纵向空间，手指好点 */
  .post-list__link,
  .post-list li a {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  /* 正文句子里的行内链接：纵向 padding 不会改变行高，但能扩大命中区域
     （WCAG 2.5.8 对行内链接是有豁免的，这里再额外照顾一下） */
  p a,
  li a,
  .muted a {
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .who,
  .tag {
    padding-top: 5px;
    padding-bottom: 5px;
  }
}
