.links-category-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.links-cat-tab {
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
  padding: 6px 14px; border-radius: var(--radius-pill); position: relative;
  transition: color .2s, background .2s;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  font-family: inherit; line-height: 1.5;
}
.links-cat-tab:hover {
  color: var(--text); background: rgba(0,0,0,0.08);
}
.links-cat-tab:focus {
  outline: none;
}
.links-cat-tab.active {
  color: #fff; font-weight: 600;
  background: var(--accent);
  box-shadow: 0 2px 8px var(--accent-glow);
}
.links-cat-tab.active:hover {
  background: var(--accent-hover);
  box-shadow: 0 3px 12px var(--accent-glow);
}
.links-cat-tab.active .links-cat-count {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
.links-cat-count {
  font-size: 11px; font-weight: 600;
  background: rgba(0,0,0,0.04);
  color: var(--text-light);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  transition: all .2s;
}
html.dark .links-cat-count {
  background: rgba(255,255,255,0.06);
}

.links-category-group {
  margin-bottom: 24px;
}
.links-category-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 12px; padding: 8px 0;
}
.links-category-title i {
  color: var(--accent); font-size: 13px;
}
.links-category-count {
  font-size: 11px; font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}



.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.link-card {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  text-decoration: none; color: inherit;
  transition: all .25s;
  overflow: hidden; position: relative;
  opacity: 0; transform: translateY(16px);
}
.link-card.card-visible {
  animation: cardFadeIn 0.8s ease both;
}
.link-card::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none;
  background: var(--glass-highlight); z-index: 1;
}
.link-card:hover {
  background: var(--glass-bg-strong);
  box-shadow: var(--shadow-md);
  border-color: rgba(255,255,255,0.7);
}
html.dark .link-card { box-shadow: var(--shadow-sm); }
html.dark .link-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(255,255,255,0.1);
}
@media (hover: hover) and (pointer: fine) {
  .link-card:hover .link-avatar img { transform: scale(1.08); }
}

.link-avatar {
  flex-shrink: 0; width: 48px; height: 48px;
  border-radius: 50%; overflow: hidden;
  background: var(--glass-bg-strong);
  position: relative; z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.link-avatar img {
  width: 48px; height: 48px;
  transition: transform .3s;
  border-radius: 50%; object-fit: cover; display: block;
}
.link-avatar-text {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 700;
}

.link-info {
  flex: 1; min-width: 0;
  position: relative; z-index: 2;
}
.link-name {
  font-size: 14px; font-weight: 700; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .15s;
  line-height: 1.4;
}
.link-card:hover .link-name {
  color: var(--accent);
}
.link-desc {
  font-size: 11.5px; color: var(--text-light);
  margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  line-height: 1.4;
}
.link-meta {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.link-meta > span {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 4px;
  height: 18px; padding: 0 7px;
  box-sizing: border-box;
  border-radius: var(--radius-pill);
  font-size: 10.5px; line-height: 1; font-weight: 500;
  letter-spacing: .2px;
  white-space: nowrap;
}
.link-category-tag {
  color: var(--accent);
  background: var(--accent-soft);
}
.link-category-tag i {
  font-size: 9px; opacity: 0.75;
}

.link-last-comment {
  color: var(--text-secondary);
  background: rgba(0,0,0,0.035);
}
.link-last-comment i {
  font-size: 10px; color: var(--accent); opacity: 0.9;
}
.link-last-comment.is-none {
  color: var(--text-light);
  background: rgba(0,0,0,0.02);
}
.link-last-comment.is-none i { color: var(--text-secondary); opacity: 0.65; }
html.dark .link-last-comment { background: rgba(255,255,255,0.07); }
html.dark .link-last-comment.is-none { background: rgba(255,255,255,0.035); color: rgba(255,255,255,0.55); }

.link-status {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 4px;
  height: 18px; padding: 0 7px;
  box-sizing: border-box;
  border-radius: var(--radius-pill);
  font-size: 10.5px; line-height: 1; font-weight: 500;
  white-space: nowrap;
  color: var(--text-light);
  background: rgba(0,0,0,0.035);
  transition: color .3s, background .3s;
}
html.dark .link-status { background: rgba(255,255,255,0.07); }
.link-status::before {
  content: ''; width: 5px; height: 5px;
  border-radius: 50%; background: #9ca3af;
  flex-shrink: 0; transition: background .3s;
}
.link-status.checking {
  color: var(--text-light);
}
.link-status.checking::before {
  width: 9px; height: 9px;
  border: 1.5px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--accent);
  border-radius: 50%;
  background: transparent;
  box-sizing: border-box;
  animation: linkCheckSpin 0.8s linear infinite;
}
@keyframes linkCheckSpin {
  to { transform: rotate(360deg); }
}
.link-status.online {
  color: #047857;
  background: rgba(16,185,129,0.09);
}
.link-status.online::before {
  background: #10b981;
  box-shadow: 0 0 4px rgba(16,185,129,0.4);
}
.link-status.offline {
  color: #b91c1c;
  background: rgba(239,68,68,0.09);
}
.link-status.offline::before {
  background: #ef4444;
  box-shadow: 0 0 4px rgba(239,68,68,0.35);
}
.link-status.unknown {
  color: var(--text-light);
  background: rgba(0,0,0,0.035);
}
html.dark .link-status.online { color: #6ee7b7; background: rgba(16,185,129,0.14); }
html.dark .link-status.offline { color: #fca5a5; background: rgba(239,68,68,0.14); }
html.dark .link-status.unknown { background: rgba(255,255,255,0.07); }
.link-status.unknown::before {
  background: #9ca3af;
}

.links-empty {
  text-align: center; color: var(--text-secondary);
  padding: 40px 20px; font-size: 14px;
}

@media (max-width: 768px) {
  .links-grid { grid-template-columns: 1fr; }
  .links-category-tabs { gap: 6px; }
}

/* 友链申请：与留言板 / 弹窗同源的浅色玻璃卡 */
.link-apply {
  margin-top: 22px;
  padding: 22px 22px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
  animation: cardFadeIn 0.8s ease both;
}
.link-apply::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none;
  background: var(--glass-highlight); z-index: 0;
}
.link-apply > * { position: relative; z-index: 1; }
.link-apply-deco {
  position: absolute; right: 4px; top: -6px;
  font-size: 104px; line-height: 1;
  color: var(--accent); opacity: .13;
  transform: rotate(-8deg);
  pointer-events: none; user-select: none; z-index: 0;
}
html.dark .link-apply-deco { opacity: .1; }

.link-apply-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.link-apply-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.5);
  border: 1px solid var(--glass-border);
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-hover);
}
html.dark .link-apply-badge { background: rgba(255,255,255,.06); color: var(--accent); }
.link-apply-badge i { font-size: 10px; }
.link-apply-head-text { flex: 1; min-width: 200px; }
.link-apply-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 21px; font-weight: 800; color: var(--text); margin: 0;
  letter-spacing: -.02em; line-height: 1.3;
}
.link-apply-badge { flex: none; }
.link-apply-sub { font-size: 12.5px; color: var(--text-secondary); margin: 5px 0 0; line-height: 1.6; }
.link-apply-btn {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 10px 14px 10px 20px; flex-shrink: 0;
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 6px 16px -8px rgba(93,116,163,.75);
  transition: transform .2s var(--ease-out-quint), box-shadow .2s var(--ease-out-quint), filter .2s var(--ease-out-quint);
}
.link-apply-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(93,116,163,.85); filter: brightness(1.04); }
.link-apply-btn i { font-size: 14px; opacity: .88; transition: transform .22s var(--ease-out-quint); }
.link-apply-btn:hover i { transform: translateX(2px); }

.link-apply-body {
  display: grid; grid-template-columns: 1fr 1fr;
  margin-top: 20px; border-top: 1px solid var(--border);
}
.link-apply-panel { min-width: 0; padding: 16px 18px 2px 0; }
.link-apply-panel + .link-apply-panel { padding-left: 20px; border-left: 1px solid var(--border); }
.link-apply-col-title {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  color: var(--text-light); margin-bottom: 8px;
}

.link-apply-list { list-style: none; margin: 0; padding: 0; }
.link-apply-list li {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px; align-items: start;
  font-size: 12.5px; line-height: 1.7;
  padding: 6px 0;
  border-top: 1px solid rgba(0,0,0,.045);
}
.link-apply-list li:first-child { border-top: 0; padding-top: 0; }
html.dark .link-apply-list li { border-top-color: rgba(255,255,255,.06); }
.link-apply-list .lk { color: var(--text-light); font-size: 11.5px; }
.link-apply-list .lv { color: var(--text); font-weight: 500; word-break: break-word; min-width: 0; }
.link-apply-list a.lv { color: var(--accent); font-weight: 500; text-decoration: none; }
.link-apply-list a.lv:hover { text-decoration: underline; }
/* 复制按钮 */
.lk-copy {
  width: 20px; height: 20px; padding: 0; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 6px; background: transparent;
  color: var(--text-light); font-size: 12px; line-height: 1; cursor: pointer;
  opacity: .5; transition: opacity .18s, background .18s, color .18s;
}
.lk-copy:hover { opacity: 1; background: rgba(0,0,0,.055); color: var(--accent); }
html.dark .lk-copy:hover { background: rgba(255,255,255,.09); }
.lk-copy.is-done { opacity: 1; color: var(--accent); }

.link-apply-rules { list-style: none; margin: 0; padding: 0; }
.link-apply-rules li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12.5px; color: var(--text-secondary); line-height: 1.65;
  padding: 5px 0;
}
.link-apply-rules .rule-dot {
  width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-strong);
}
.link-apply-rules .rule-dot i { font-size: 9px; }
html.dark .link-apply-rules .rule-dot { background: rgba(131,154,201,.2); color: #a9bde3; }
.link-apply-rules li > span:not(.rule-dot) { white-space: nowrap; }

.link-apply-note {
  margin-top: 16px; padding: 11px 14px;
  display: flex; gap: 9px; align-items: flex-start;
  font-size: 12.5px; line-height: 1.7; color: var(--text-secondary);
  background: rgba(0,0,0,.028);
  border-radius: 10px;
}
html.dark .link-apply-note { background: rgba(255,255,255,.05); }
.link-apply-note i { color: var(--accent); font-size: 13px; margin-top: 1px; flex-shrink: 0; }
.link-apply-note b { color: var(--text); font-weight: 600; }

.cmt-apply-tip {
  display: flex; gap: 9px; align-items: flex-start;
  margin-bottom: 14px; padding: 9px 13px;
  font-size: 12.5px; line-height: 1.65; color: var(--text-secondary);
  background: var(--accent-soft);
  border: 1px solid var(--accent-glow);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
}
.cmt-apply-tip i { color: var(--accent); font-size: 13px; margin-top: 2px; flex-shrink: 0; }
.cmt-apply-tip b { color: var(--text); font-weight: 600; }

.cmt-modal {
  position: fixed; inset: 0; z-index: 1200;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.cmt-modal.active { display: flex; }

/* 弹窗：遮罩淡入 + 卡片弹性入场；关闭时反向收起 */
.cmt-modal-mask {
  background: rgba(15,18,25,0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition: background .26s ease, backdrop-filter .26s ease;
}
.cmt-modal.active .cmt-modal-mask {
  background: rgba(15,18,25,.26);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
html.dark .cmt-modal.active .cmt-modal-mask { background: rgba(0,0,0,.44); }
.cmt-modal.active .cmt-modal-card { animation: modalIn .34s var(--ease-spring-soft) both; }
.cmt-modal.closing .cmt-modal-card { animation: modalOut .2s var(--ease-in-out) both; }
.cmt-modal.closing .cmt-modal-mask {
  background: rgba(15,18,25,0) !important;
  backdrop-filter: blur(0) !important;
  -webkit-backdrop-filter: blur(0) !important;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
@keyframes modalOut {
  to { opacity: 0; transform: translateY(8px) scale(.975); }
}

.cmt-modal-mask {
  position: absolute; inset: 0;
}

.cmt-modal-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 520px;
  max-height: calc(100vh - 40px); overflow-y: auto;
  padding: 22px 22px 20px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  box-shadow:
    0 24px 60px -18px rgba(0,0,0,.32),
    0 6px 18px -8px rgba(0,0,0,.2),
    inset 0 1px 0 rgba(255,255,255,.9),
    0 0 0 1px rgba(0,0,0,.03);
  animation: cmtCardIn .3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html.dark .cmt-modal-card {
  border-color: var(--glass-border);
  background: var(--glass-bg-strong);
  box-shadow:
    0 24px 60px -18px rgba(0,0,0,.7),
    0 6px 18px -8px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.06),
    0 0 0 1px rgba(0,0,0,.35);
}
.cmt-modal-card::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none;
  background: var(--glass-highlight);
}
.cmt-modal-head, .cmt-modal-body { position: relative; z-index: 1; }

.cmt-modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 30px; height: 30px; padding: 0;
  border: none; background: transparent; cursor: pointer;
  color: var(--text-light); font-size: 15px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.cmt-modal-close:hover { background: var(--accent-soft); color: var(--accent); }

.cmt-modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 0 32px 15px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.cmt-modal-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.35);
}
.cmt-modal-head-text { min-width: 0; }
.cmt-modal-title { font-size: 16px; font-weight: 700; color: var(--text); margin: 0; letter-spacing: .2px; }
.cmt-modal-sub { font-size: 12.5px; color: var(--text-light); margin: 4px 0 0; }

.cmt-modal-form {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0,0,0,.018);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
html.dark .cmt-modal-form { background: rgba(255,255,255,.03); }
.cmt-modal-form:focus-within {
  border-color: var(--accent-glow);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.cmt-modal-card .cmt-fields input { padding: 12px 14px; font-size: 13.5px; }
.cmt-modal-card .cmt-textarea-wrap textarea { padding: 12px 14px; min-height: 84px; font-size: 13.5px; }
.cmt-modal-card .cmt-submit {
  padding: 8px 22px; font-size: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  box-shadow: 0 3px 12px var(--accent-glow);
}
.cmt-modal-card .cmt-submit:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  box-shadow: 0 5px 16px var(--accent-glow);
}

body.cmt-modal-open { overflow: hidden; }
@keyframes cmtCardIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .link-apply { padding: 18px 16px 16px; }
  .link-apply-deco { font-size: 76px; right: 0; top: -4px; }
  .link-apply-title { font-size: 19px; }
  .link-apply-body { grid-template-columns: 1fr; }
  .link-apply-panel { padding: 14px 0 2px; }
  .link-apply-panel + .link-apply-panel {
    padding-left: 0; border-left: 0;
    border-top: 1px solid var(--border); margin-top: 6px;
  }
  .link-apply-btn { width: 100%; justify-content: center; }

  .cmt-modal { padding: 14px; }
  .cmt-modal-card {
    max-width: none;
    max-height: 86vh;
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
    border-radius: 18px;
  }
  .cmt-modal-close { top: 11px; right: 11px; }
  .cmt-modal-head { gap: 10px; margin-bottom: 14px; }
  .cmt-modal-icon { width: 36px; height: 36px; font-size: 16px; border-radius: 10px; }
  .cmt-modal-title { font-size: 15px; }
  .cmt-modal-sub { font-size: 12px; }
  .cmt-modal-card .cmt-fields { flex-direction: column; }
  .cmt-modal-card .cmt-fields input {
    font-size: 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .cmt-modal-card .cmt-fields input:last-child { border-bottom: none; }
  .cmt-modal-card .cmt-textarea-wrap textarea { min-height: 68px; font-size: 16px; padding: 10px 14px; }
  .cmt-modal-card .cmt-form-bar { padding: 8px 12px; }
  .cmt-modal-card .cmt-submit { padding: 8px 18px; font-size: 13px; }
}

/* ================= 相册页 ================= */
.album-page { display: flex; flex-direction: column; gap: 16px; }

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.album-card {
  display: flex; flex-direction: column;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none; color: inherit;
  position: relative;
  opacity: 0; transform: translateY(14px);
  transition: background .25s, border-color .25s, box-shadow .25s;
}
.album-card.card-visible { animation: albumFadeIn .5s ease forwards; }
@keyframes albumFadeIn {
  to { opacity: 1; transform: translateY(0); }
}
.album-card:hover {
  background: var(--glass-bg-strong);
  border-color: rgba(255,255,255,0.72);
  box-shadow: var(--shadow-md);
}
html.dark .album-card:hover { border-color: rgba(255,255,255,0.12); }

.album-cover {
  position: relative; display: block; width: 100%;
  aspect-ratio: 4/3; overflow: hidden;
  background: rgba(0,0,0,0.04);
}
@supports not (aspect-ratio: 1) {
  .album-cover { height: 0; padding-top: 75%; }
  .album-cover img, .album-cover-empty { position: absolute; inset: 0; }
  .album-cover-empty { height: auto; }
}
.album-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
/* 底部压暗，让左下角张数胶囊在亮图上也能读清 */
.album-cover::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 44%;
  background: linear-gradient(180deg, transparent, rgba(12,18,30,0.32));
  opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 1;
}
@media (hover: hover) and (pointer: fine) {
  .album-card:hover .album-cover img { transform: scale(1.04); }
  .album-card:hover .album-cover::after { opacity: 1; }
}

.album-cover-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light); font-size: 26px;
}
.album-count {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.74);
  border: 1px solid rgba(255,255,255,0.6);
  backdrop-filter: blur(10px) saturate(1.6);
  -webkit-backdrop-filter: blur(10px) saturate(1.6);
  font-size: 10.5px; font-weight: 600; color: var(--text);
}
html.dark .album-count {
  background: rgba(20,26,40,0.62);
  border-color: rgba(255,255,255,0.14);
  color: #fff;
}
.album-count i { font-size: 10px; }

.album-info {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px 12px;
}
.album-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.album-title {
  font-size: 13.5px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .2s;
}
.album-meta {
  font-size: 10.5px; color: var(--text-light);
  font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.album-arrow {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  color: var(--text-light); font-size: 13px;
  transition: background .25s, color .25s, border-color .25s;
}
.album-card:hover .album-arrow {
  background: var(--accent); border-color: transparent; color: #fff;
}
.album-card:hover .album-title { color: var(--accent-hover); }

@media (max-width: 640px) {
  .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .album-info { padding: 9px 10px 10px; gap: 8px; }
  .album-arrow { display: none; }
  .album-title { font-size: 12.5px; }
}
@media (max-width: 430px) {
  .album-grid { grid-template-columns: 1fr; }
}

/* ================= 朋友圈 ================= */
.friends-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  align-items: start;
}
.friends-loading { font-size: 13px; color: var(--text-light); text-align: center; padding: 24px; grid-column: 1 / -1; }
.friends-empty { text-align: center; padding: 40px 20px; grid-column: 1 / -1; }
.friends-empty i { font-size: 32px; display: block; margin-bottom: 12px; color: var(--text-light); }

.friend-feed-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 13px 15px 6px;
  transition: background .25s, border-color .25s, box-shadow .25s;
}
.friend-feed-card:hover {
  background: var(--glass-bg-strong);
  border-color: rgba(255,255,255,0.72);
  box-shadow: var(--shadow-md);
}
html.dark .friend-feed-card:hover { border-color: rgba(255,255,255,0.12); }

.friend-feed-header {
  display: flex; align-items: center; gap: 11px;
  padding-bottom: 11px; margin-bottom: 2px;
  border-bottom: 1px solid var(--border);
}
.friend-feed-avatar {
  flex-shrink: 0; width: 40px; height: 40px;
  border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 1px 3px rgba(20,30,45,0.08);
  background: var(--glass-bg-strong);
}
html.dark .friend-feed-avatar { border-color: rgba(255,255,255,0.14); box-shadow: none; }
.friend-feed-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.friend-feed-avatar-text {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 700;
}
.friend-feed-info { flex: 1; min-width: 0; }
.friend-feed-name {
  display: block; font-size: 14px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.friend-feed-desc {
  font-size: 11px; color: var(--text-light); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.friend-feed-visit {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  color: var(--text-light); font-size: 13px;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.friend-feed-visit:hover {
  background: var(--accent); border-color: transparent; color: #fff;
}

.friend-feed-posts { display: flex; flex-direction: column; }
.friend-feed-item {
  display: block; padding: 9px 0;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: opacity .2s;
}
.friend-feed-posts .friend-feed-item:last-child { border-bottom: 0; }
.friend-feed-item-head {
  display: flex; align-items: baseline; gap: 8px;
}
.friend-feed-item-title {
  flex: 1; min-width: 0;
  font-size: 13px; font-weight: 500; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .2s;
}
.friend-feed-item:hover .friend-feed-item-title { color: var(--accent-hover); }
.friend-feed-item-date {
  flex: none; font-size: 10px; color: var(--text-light);
  font-variant-numeric: tabular-nums;
}
.friend-feed-item-desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 3px;
  font-size: 11.5px; line-height: 1.55; color: var(--text-secondary);
}
.friend-feed-no-posts {
  font-size: 12px; color: var(--text-light);
  text-align: center; padding: 14px 0 16px;
}

@media (max-width: 640px) {
  .friends-feed { grid-template-columns: 1fr; gap: 10px; }
  .friend-feed-card { padding: 12px 13px 4px; }
}




/* ---------------- 友链申请弹窗（独立接口提交，不走评论） ---------------- */
.apply-card {
  width: min(520px, calc(100vw - 32px));
  max-height: min(88vh, 760px);
  overflow-y: auto;
  padding: 26px 26px 22px;
  border-radius: 20px;
  position: relative;
}
.apply-close {
  position: absolute; top: 13px; right: 13px;
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: transparent; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer;
  transition: background .2s, color .2s;
}
.apply-close:hover { background: rgba(0,0,0,.05); color: var(--text); }
html.dark .apply-close:hover { background: rgba(255,255,255,.08); }
.apply-head { text-align: center; margin-bottom: 20px; }
.apply-badge svg {
  width: 21px; height: 21px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.apply-badge {
  width: 44px; height: 44px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--accent-strong);
  background: linear-gradient(150deg, rgba(131,154,201,.16), rgba(131,154,201,.06));
  border: 1px solid rgba(131,154,201,.22);
  margin-bottom: 10px;
}
html.dark .apply-badge {
  color: #a9bde3;
  background: linear-gradient(150deg, rgba(131,154,201,.22), rgba(131,154,201,.08));
  border-color: rgba(131,154,201,.28);
}
.apply-title { font-size: 17px; font-weight: 600; color: var(--text); margin: 0 0 5px; letter-spacing: -.01em; }
.apply-sub { font-size: 12.5px; color: var(--text-secondary); margin: 0; line-height: 1.5; }
.apply-form { display: flex; flex-direction: column; gap: 13px; }
.apply-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.apply-field { display: flex; flex-direction: column; gap: 6px; }
.apply-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
}
.apply-label i { font-size: 13px; color: var(--accent); }
.apply-field input,
.apply-field textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 13px; font-size: 13.5px; color: var(--text);
  background: rgba(255,255,255,.55);
  font-family: inherit; line-height: 1.5; resize: vertical; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
html.dark .apply-field input,
html.dark .apply-field textarea { background: rgba(255,255,255,.045); }
.apply-field input::placeholder,
.apply-field textarea::placeholder { color: var(--text-light); }
.apply-field input:focus,
.apply-field textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: rgba(255,255,255,.85);
  box-shadow: 0 0 0 3px rgba(131,154,201,.14);
}
html.dark .apply-field input:focus,
html.dark .apply-field textarea:focus {
  background: rgba(255,255,255,.07);
  box-shadow: 0 0 0 3px rgba(131,154,201,.22);
}
.apply-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.apply-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 4px; flex-wrap: wrap;
}
.apply-hint { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-light); }
.apply-hint i { color: var(--accent); font-size: 13px; }
.apply-submit {
  border: 0; border-radius: 11px; padding: 10px 22px;
  font-size: 13px; font-weight: 600; color: #fff; cursor: pointer; font-family: inherit;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 6px 16px -8px rgba(93,116,163,.7);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.apply-submit:hover { filter: brightness(1.04); box-shadow: 0 8px 20px -8px rgba(93,116,163,.8); }
.apply-submit:active { transform: scale(.97); }
.apply-submit:disabled { opacity: .7; cursor: default; }
.apply-done { text-align: center; padding: 14px 6px 6px; }
.apply-done-ico { font-size: 38px; color: var(--accent-strong); display: block; margin-bottom: 8px; }
html.dark .apply-done-ico { color: var(--accent); }
.apply-done h4 { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--text); }
.apply-done p { margin: 0 0 16px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; }
.apply-done-btn { width: 100%; }

/* 小屏也保持两列，只压缩内边距与字号 */
@media (max-width: 560px) {
  .apply-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .apply-field input, .apply-field textarea { padding: 9px 10px; font-size: 13px; }
  .apply-label { font-size: 11.5px; gap: 4px; }
  .apply-label i { font-size: 12px; }
}
