/* 官网首页补充样式：更新日志模态框、页脚友情链接名录
 * 背景：首页由改版稿接管后，旧版的更新日志抽屉与友情链接模块不再随旧样式表加载，
 *   这里用改版稿的纸色、墨色与玫红重新实现，不引用旧 style.css。
 * 关键约束：模态框遮罩与内容分别控制动画；窄屏时对话框贴近全屏；尊重「减少动态效果」。 */

/* ── 更新日志模态框 ─────────────────────────────────────────── */
html.cl-lock { overflow: hidden; }
.cl-modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.cl-modal[hidden] { display: none; }
.cl-backdrop {
  position: absolute; inset: 0; background: rgba(42, 35, 32, 0.5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.28s ease;
}
.cl-dialog {
  position: relative; display: flex; flex-direction: column;
  width: min(720px, 100%); max-height: min(82vh, 760px);
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-lift);
  opacity: 0; transform: translateY(14px) scale(0.97);
  transition: opacity 0.32s ease 0.04s, transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.1) 0.04s;
  outline: none;
}
.cl-modal.is-open .cl-backdrop { opacity: 1; }
.cl-modal.is-open .cl-dialog { opacity: 1; transform: none; }
.cl-modal.is-closing .cl-dialog { transition-delay: 0s; transition-duration: 0.2s; }

.cl-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 24px 28px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.cl-label { display: block; margin-bottom: 4px; font-size: 12px; letter-spacing: 0.12em; color: var(--ink-soft); }
.cl-title { font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.3; color: var(--rose-deep); }
.cl-close {
  flex-shrink: 0; width: 36px; height: 36px; margin: -4px -8px 0 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-soft); cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.cl-close:hover { background: var(--rose-soft); color: var(--rose-deep); }
.cl-close:focus-visible, .cl-body a:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }

.cl-body { flex: 1; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; padding: 0 28px 32px; -webkit-overflow-scrolling: touch; }
.cl-body::-webkit-scrollbar { width: 6px; }
.cl-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.cl-loading, .cl-more { padding: 36px 0; text-align: center; font-size: 14px; color: var(--ink-soft); }
.cl-more { padding: 18px 0 0; font-size: 13px; }
.cl-error { padding: 36px 0; text-align: center; font-size: 14px; color: var(--ink-soft); }
.cl-error button {
  margin-top: 12px; padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--rose-deep); font: inherit; cursor: pointer;
}
.cl-error button:hover { background: var(--rose-soft); }

.cl-ver h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 28px 0 14px; font-size: 15px; font-weight: 700; }
.cl-ver:first-child h2 { margin-top: 22px; }
.cl-badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--rose); color: #fff; font-family: var(--latin); font-size: 15px; font-weight: 700; letter-spacing: 0.02em;
}
.cl-badge.is-wip { background: var(--pencil); }
.cl-date { font-size: 13px; font-weight: 400; color: var(--ink-soft); }
.cl-ver h3 { margin: 18px 0 8px; font-size: 14px; font-weight: 700; color: var(--rose-deep); }
.cl-ver h4 { margin: 14px 0 6px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.cl-ver ul { list-style: none; margin: 0; padding: 0; }
.cl-ver li { position: relative; padding: 3px 0 3px 16px; font-size: 14px; line-height: 1.75; color: var(--ink); }
.cl-ver li::before { content: ""; position: absolute; left: 3px; top: 0.95em; width: 5px; height: 5px; border-radius: 50%; background: var(--rose-soft); box-shadow: 0 0 0 1px var(--pencil) inset; }
.cl-ver li li { font-size: 13px; color: var(--ink-soft); }
.cl-ver strong { font-weight: 700; }
.cl-ver code { padding: 1px 6px; border-radius: 5px; background: var(--paper-2); font-size: 0.92em; }
.cl-ver a { color: var(--rose); text-decoration: underline; text-underline-offset: 3px; }
.cl-ver a:hover { color: var(--rose-deep); }

@media (max-width: 600px) {
  .cl-modal { padding: 12px; }
  .cl-dialog { max-height: 90vh; border-radius: 16px; }
  .cl-head { padding: 20px 20px 14px; }
  .cl-body { padding: 0 20px 26px; }
  .cl-title { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .cl-backdrop, .cl-dialog { transition-duration: 0.01s; transition-delay: 0s; }
  .cl-dialog { transform: none; }
}

/* ── 页脚友情链接（Web 2.0 Next 名录）──────────────────────────
 * 整块独占一行；默认 hidden，脚本拿到站主批准的站点后才取消隐藏。
 * 卡片只用边框与底色区分层级，不加左侧竖线色条。 */
.foot-w20 { flex: 1 0 100%; padding-top: 18px; border-top: 1px solid var(--line); }
.foot-w20[hidden], .foot-w20-all[hidden] { display: none; }
.foot-w20-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 14px; }
.foot-w20-label { font-size: 13px; font-weight: 700; color: var(--ink); }
.foot-w20-source { font-size: 12px; color: var(--ink-soft); }
.foot-w20-source:hover { color: var(--rose); }
.foot-w20-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); list-style: none; margin: 0; padding: 0; }
.foot-w20-grid li { min-width: 0; }
.footer-w20-card {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 13px 15px; text-align: left;
  background: rgba(255, 255, 255, 0.42); border: 1px solid var(--line); border-radius: 12px;
  transition: background 0.2s, border-color 0.2s;
}
.footer-w20-card:hover { background: rgba(255, 255, 255, 0.78); border-color: var(--pencil); }
.footer-w20-name { font-size: 14px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footer-w20-desc {
  font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.footer-w20-host { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--pencil); }
.foot-w20-all { display: block; width: fit-content; margin: 14px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.foot-w20-all:hover { color: var(--rose); }
@media (max-width: 600px) { .foot-w20-grid { grid-template-columns: 1fr; } }
