/* ============================================================
   在 app.css（原站原件）之上补充原站没有的元素。
   ============================================================ */

/* ---------- 手机首页：日历排在通知之前 ---------- */
.home-notice-panels { display: flex; flex-direction: column; gap: 32px; }
@media (max-width: 767px) {
  .home-notice-panels > .home-calendar { order: -1; }
}

/* ---------- 导航「更多」：用原生 <details>，不依赖 JS ---------- */
.nav-more { position: relative; }
.nav-more > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::marker { content: ""; }
.nav-more[open] > summary { background: oklch(var(--color-paper-2)); color: oklch(var(--color-ink)); }

.nav-drop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 11rem;
  padding: 6px;
  border-radius: 10px;
  background: oklch(var(--color-surface));
  border: 1px solid oklch(var(--color-rule) / 0.6);
  box-shadow: 0 8px 24px oklch(var(--color-ink) / 0.08);
  z-index: 60;
}
.nav-drop a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: oklch(var(--color-ink));
  white-space: nowrap;
}
.nav-drop a:hover { background: oklch(var(--color-paper-2)); }

/* 移动端：「更多」占满一格，弹层从底部浮起 */
.nav-more.mobile-more { flex: 1; display: flex; }
.nav-more.mobile-more > summary { flex: 1; width: 100%; }
.nav-more.mobile-more > .nav-drop {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 72px;
  top: auto;
  min-width: 0;
}

/* ---------- 活动详情页的元信息表（原站该页无此表） ---------- */
.meta-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 12px; }
.meta-table th {
  width: 5rem;
  padding: 8px 0;
  text-align: left;
  vertical-align: top;
  font-weight: 400;
  color: oklch(var(--color-muted));
}
.meta-table td { padding: 8px 0; color: oklch(var(--color-ink)); }
.meta-table tr + tr th,
.meta-table tr + tr td { border-top: 1px dashed oklch(var(--color-rule) / 0.8); }

/* ---------- 相册格子的说明文字 ---------- */
.photo-tile { position: relative; overflow: hidden; display: flex; align-items: flex-end; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile .cap {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: oklch(var(--color-muted));
  background: oklch(var(--color-surface) / 0.85);
}

/* ---------- 时间线筛选（JS 可选，无 JS 时全部显示） ---------- */
ol.timeline > li[hidden] { display: none; }

/* ---------- 改造层新增：工具条 / 置顶按钮 / 选中态 ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px; margin-bottom: 16px;
}
.chip.active {
  background: oklch(var(--color-accent-soft));
  color: oklch(var(--color-accent));
  border-color: oklch(var(--color-accent) / .35);
}
button.chip {
  cursor: pointer; border: 1px solid oklch(var(--color-rule) / .7);
  background: oklch(var(--color-surface));
}
button.chip:hover { border-color: oklch(var(--color-accent) / .5); }

.pin-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  color: oklch(var(--color-muted)); cursor: pointer; user-select: none;
  font-size: 16px; line-height: 1;
}
.pin-btn:hover { background: oklch(var(--color-paper-2)); color: oklch(var(--color-brass, var(--color-accent))); }
.pin-btn[aria-pressed="true"] { color: oklch(var(--color-brass, var(--color-accent))); }
.pin-btn-lg {
  width: auto; height: auto; padding: 4px 10px; font-size: 12px;
  border: 1px solid oklch(var(--color-rule) / .7);
}

.notice-card.is-pinned {
  border-color: oklch(var(--color-brass, var(--color-accent)) / .45);
  background: oklch(var(--color-brass-pale, var(--color-paper-2)) / .25);
}
.notice-card .chip.bg-brass-pale { display: none; }
.notice-card.is-pinned .chip.bg-brass-pale { display: inline-flex; }

/* 通知日历 */
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.calendar-grid .cal-dow{font-size:11px;color:oklch(var(--color-muted));text-align:center;padding-bottom:2px}
.cal-day{position:relative;display:flex;align-items:center;justify-content:center;min-height:40px;border-radius:8px;font-size:13px;border:1px solid transparent;background:none;color:inherit}
.cal-day.is-empty{visibility:hidden}
.cal-day.is-today{border-color:oklch(var(--color-rule)/.8)}
.cal-day.has-event{font-weight:600;text-decoration:underline;text-decoration-color:oklch(var(--color-danger));text-underline-offset:4px;cursor:pointer}
.cal-day.has-event:after{content:"";position:absolute;bottom:4px;width:5px;height:5px;border-radius:9999px;background:oklch(var(--color-danger))}
.cal-day.is-active{background:oklch(var(--color-accent-soft));border-color:oklch(var(--color-accent)/.4)}
.cal-item{display:block;padding:8px 10px;border-radius:8px;background:oklch(var(--color-paper-2))}
.cal-item strong{font-weight:600}
.cal-empty{font-size:12px;color:oklch(var(--color-muted))}
.cal-head{font-size:12px;color:oklch(var(--color-muted));margin-bottom:2px}
.cal-day-head{margin-top:10px;font-size:12px;font-weight:600;color:oklch(var(--color-muted))}
.cal-day-head:first-of-type{margin-top:0}
.picked-row{display:flex;align-items:center;gap:12px;padding:8px;border:1px solid oklch(var(--color-rule)/.6);border-radius:8px}
.picked-thumb{width:44px;height:44px;flex:none;object-fit:cover;border-radius:6px;display:block}
.picked-icon{display:flex;width:44px;height:44px;flex:none;align-items:center;justify-content:center;border-radius:6px;background:oklch(var(--color-paper-2));font-size:10px;letter-spacing:.04em;color:oklch(var(--color-muted))}
.picked-meta{min-width:0;flex:1}
.picked-name{margin:0;font-size:14px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.picked-size{margin:2px 0 0;font-size:12px;line-height:1.3;color:oklch(var(--color-muted))}
.picked-ok{padding:12px;border-radius:8px;background:oklch(var(--color-accent-soft))}
.picked-bad{padding:12px;border-radius:8px;background:oklch(var(--color-danger)/.1)}
.picked-del{min-height:36px;padding:4px 10px;border-radius:6px;border:1px solid oklch(var(--color-rule)/.6);font-size:13px;line-height:1;background:none;color:oklch(var(--color-muted))}
.picked-del:hover{border-color:oklch(var(--color-danger)/.5);color:oklch(var(--color-danger))}
.admin-media-row{display:flex;align-items:flex-start;gap:12px;padding:12px;border-bottom:1px solid oklch(var(--color-rule)/.4)}
.admin-media-row:last-child{border-bottom:0}
.admin-media-thumb{width:56px;height:56px;flex:none;display:block;object-fit:cover;border-radius:6px;background:oklch(var(--color-paper-2))}
.admin-media-icon{display:flex;width:56px;height:56px;flex:none;align-items:center;justify-content:center;border-radius:6px;background:oklch(var(--color-paper-2));font-size:10px;letter-spacing:.04em;color:oklch(var(--color-muted))}
.admin-media-body{min-width:0;flex:1}
.admin-media-name{margin:0;font-size:14px;font-weight:600;line-height:1.4;overflow-wrap:anywhere;word-break:break-word}
.admin-media-meta{margin:3px 0 0;font-size:12px;line-height:1.4;color:oklch(var(--color-muted));overflow-wrap:anywhere;word-break:break-word}
.admin-media-open{margin-top:6px;padding:0;border:0;background:none;font-size:12px;color:oklch(var(--color-accent));text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.admin-media-actions{display:flex;flex:none;flex-direction:column;gap:6px;align-items:stretch}
.admin-lightbox{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:16px;background:oklch(var(--color-ink)/.88);cursor:zoom-out}
.admin-lightbox img{max-width:100%;max-height:100%;object-fit:contain;border-radius:6px;background:oklch(var(--color-surface))}
@media (min-width:640px){.admin-media-actions{flex-direction:row;align-items:center}}



/* Muse 推荐 App 图标 */
.muse-icon{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:9px;background:oklch(var(--color-accent));color:#fff;flex-shrink:0;box-shadow:0 2px 8px oklch(var(--color-accent)/.25)}
.muse-icon svg{width:20px;height:20px}

/* Muse 推荐图标（图片版）——尺寸跟随大标题 */
.muse-head{display:flex;align-items:center;gap:.45em;font-size:var(--text-display);line-height:1}
.muse-head h1{font-size:inherit;line-height:1.15;margin:0}
img.muse-icon{width:1em;height:1em;border-radius:.24em;object-fit:cover;flex-shrink:0;background:oklch(var(--color-accent-soft));box-shadow:0 2px 8px oklch(var(--color-ink)/.14)}

/* 推荐动态卡片：左上角配图 + 操作栏 */
.feed-head{display:flex;gap:12px;align-items:flex-start}
.feed-thumb{width:64px;height:64px;border-radius:10px;object-fit:cover;flex-shrink:0;background:oklch(var(--color-paper-2))}
.feed-actions{display:flex;gap:6px;align-items:center;margin-top:14px;padding-top:10px;border-top:1px solid oklch(var(--color-rule)/.5)}
.feed-btn{display:inline-flex;align-items:center;gap:5px;min-height:34px;padding:4px 10px;border-radius:9999px;font-size:13px;color:oklch(var(--color-ink-2));border:1px solid transparent}
.feed-btn:hover{background:oklch(var(--color-paper-2))}
.feed-btn.is-on{background:oklch(var(--color-accent-soft));color:oklch(var(--color-accent));border-color:oklch(var(--color-accent)/.3)}
.feed-comments{margin-top:10px;display:flex;flex-direction:column;gap:8px}
.feed-comment{font-size:13px;line-height:1.6;padding:8px 10px;border-radius:8px;background:oklch(var(--color-paper-2))}
.feed-comment b{font-weight:600;margin-right:6px}
.feed-comment-form{display:flex;gap:8px;margin-top:2px}
.feed-comment-form input{flex:1;min-width:0;border:1px solid oklch(var(--color-rule)/.6);border-radius:8px;padding:8px 10px;font-size:13px}

/* 学习资料的第二级分类，沿用侧栏链接样式。 */
.library-subcategories{flex-basis:100%;min-width:0;margin:0 0 8px 14px;border-left:1px solid var(--color-rule);padding-left:8px}
.library-subcategories a{font-size:12px;line-height:1.5;white-space:normal}
.library-subcategories a span:first-child{font-size:12px}
[data-liblist]>[hidden]{display:none!important}

/* 资料和照片共用的批量下载控件。 */
.batch-toolbar{margin:0 0 16px;padding:14px;border:1px solid oklch(var(--color-rule));border-radius:10px;background:oklch(var(--color-surface))}
.batch-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.batch-status{margin:10px 0 0;font-size:12px;line-height:1.6;overflow-wrap:anywhere;color:oklch(var(--color-muted))}
.batch-item{position:relative}
.batch-file-link{display:block;padding-right:40px}
.batch-check{position:absolute;top:8px;right:8px;z-index:1;display:flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;border-radius:8px;background:oklch(var(--color-surface));cursor:pointer}
.batch-check input{width:20px;height:20px;margin:0;accent-color:oklch(var(--color-accent));cursor:pointer}
.batch-item:has(.batch-check input:checked){outline:2px solid oklch(var(--color-accent));outline-offset:-2px}
[data-batch-save][hidden]{display:none!important}

/* 相册浏览时不遮挡原图，进入选择模式后才显示选择信息。 */
[data-photo-live]:not(.batch-selecting) .batch-check,
[data-photo-live]:not(.batch-selecting) .cap{display:none}
[data-photo-live] .cap{right:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.photo-tile img[role="button"]{cursor:zoom-in}
.batch-selecting .photo-tile img{cursor:pointer}
[data-batch-toolbar] [hidden]{display:none!important}
.batch-progress{display:flex;align-items:center;gap:10px;margin-top:12px;min-width:0}
.batch-progress progress{display:block;flex:1;min-width:60px;height:12px;accent-color:oklch(var(--color-accent))}
.batch-progress span{font-size:12px;overflow-wrap:anywhere}
.photo-viewer{width:min(1080px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:12px;border:0;border-radius:12px;background:oklch(var(--color-surface));color:oklch(var(--color-ink));overflow:auto}
.photo-viewer::backdrop{background:rgba(20,22,18,.88)}
.photo-viewer-bar{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.photo-viewer-title{flex:1;min-width:0;margin:0;font-size:13px;overflow-wrap:anywhere}
.photo-viewer-bar a,.photo-viewer-bar button{flex-shrink:0}
.photo-viewer-image{display:block;width:auto;height:auto;max-width:100%;max-height:calc(100dvh - 120px);object-fit:contain;margin:auto}
