/* ============================================================
   馆内皮肤 v3 — 把门页那套铜框・石板・像素字铺到 library.html
   加载顺序：style.css → ambient.css → frame.css → hub.css → realm.css → 本文件。
   只覆盖视觉；布局、交互、id 都不动。app.js 生成的类名见 js/app.js 与 js/hub/*.js。
   ============================================================ */

/* ── 0. 世界层：静底整幅 cover，墨罩退到 .62，面板四周再压一圈暗 ── */
body.hub-body { background: #0a0a12; color: var(--g-cream); }
.hub-still__base {
  left: 0; top: 0;
  width: 100%; height: 100%;
  transform: none;
  object-fit: cover;
  object-position: 50% 58%;
}
.hub-still__ink {
  background:
    radial-gradient(ellipse 80% 80% at 50% 45%, rgba(10, 10, 18, .35) 0%, rgba(10, 10, 18, .75) 100%),
    rgba(11, 11, 18, .62);
}

/* ── 1. 铜框配方（按类名铺）──
   重框：弹窗、时钟/周报浮层
   轻框：顶栏、侧栏、仪表卡、列表项、简报百叶帘、文件区、链接书架 */
.modal.lib-frame,
.hub-overlay__panel.lib-frame,
.link-modal.lib-frame {
  --frame-bg: var(--g-slate);
  background: var(--g-noise) repeat, var(--g-slate);
  border: 10px solid var(--g-bronze);
  border-top-color: var(--g-bronze-hi);
  border-left-color: #553019;
  border-bottom-color: var(--g-bronze-lo);
  border-right-color: #2e170b;
  border-radius: 0;
  box-shadow: var(--g-frame-heavy);
  color: var(--g-cream);
}
.modal.lib-frame--ornate::before,
.hub-overlay__panel.lib-frame--ornate::before {
  inset: 0;
  border: 0;
  box-shadow: inset 0 0 48px rgba(0, 0, 0, .45);
}
.modal.lib-frame--ornate::after,
.hub-overlay__panel.lib-frame--ornate::after {
  /* frame.css 的角花与铆钉改成四角铜帽 */
  background: var(--g-caps);
  image-rendering: auto;
}
.hub-overlay__panel.lib-frame--ornate::after {
  background: var(--g-caps);
}

.hub-card.lib-frame,
.dash-card.lib-frame,
.content-item.lib-frame,
.links-grid.lib-frame,
.file-upload-zone,
.file-manager,
.accordion-group,
.search-filters {
  --frame-bg: var(--g-slate);
  background: var(--g-noise) repeat, var(--g-slate);
  border: 4px solid var(--g-bronze);
  border-top-color: var(--g-bronze-hi);
  border-bottom-color: var(--g-bronze-lo);
  border-radius: 0;
  box-shadow: var(--g-frame-lite);
  color: var(--g-cream);
}
.hub-card.lib-frame--plain::before,
.dash-card.lib-frame--plain::before,
.content-item.lib-frame--plain::before,
.links-grid.lib-frame--plain::before {
  inset: 0;
  border: 0;
  background: var(--g-caps);
  box-shadow: inset 0 0 32px rgba(0, 0, 0, .35);
}
.hub-card.lib-frame:hover,
.dash-card.lib-frame:hover,
.content-item.lib-frame:hover {
  border-color: #6a3a1c;
  border-top-color: #7a4523;
  border-bottom-color: #2a1408;
  background: var(--g-noise) repeat, #1e262f;
  box-shadow: var(--g-frame-lite);
  transform: none;
}
.hub-card[data-state="placeholder"] { opacity: .6; }

/* ── 2. 顶栏：石板横梁，底沿一道铜 ── */
.topbar.lib-frame--plain {
  background: var(--g-noise) repeat, rgba(20, 25, 32, .97);
  box-shadow: inset 0 -1px 0 var(--g-ink);
}
.topbar.lib-frame--plain::after {
  height: 6px;
  border: 0;
  background:
    linear-gradient(var(--g-brass), var(--g-brass)) 0 0 / 100% 1px no-repeat,
    linear-gradient(var(--g-bronze-hi), var(--g-bronze-hi)) 0 1px / 100% 3px no-repeat,
    linear-gradient(var(--g-ink), var(--g-ink)) 0 4px / 100% 2px no-repeat;
}
.logo-text {
  font-family: var(--g-font-pixel);
  font-size: 24px; line-height: 32px;
  color: var(--g-title);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .6);
}
.sidebar-toggle { color: var(--g-title); }
.search-box input[type="text"],
.search-filter-row select,
.search-filter-row input[type="date"],
.link-field input,
.upload-folder-select {
  background: var(--g-slate-deep);
  border: 2px solid #2a3148;
  border-radius: 4px;
  color: var(--g-cream);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .55);
}
.search-box input[type="text"]:focus,
.search-filter-row select:focus,
.search-filter-row input[type="date"]:focus,
.link-field input:focus,
.upload-folder-select:focus {
  border-color: var(--g-btn);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .55), 0 0 0 2px rgba(220, 158, 92, .25);
}
.search-box input[type="text"]::placeholder { color: var(--g-faint); }
.search-icon { color: var(--g-faint); }
.clock-time {
  font-size: 16px; color: var(--g-title);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .6);
}
.clock-date, .weather-desc { color: var(--g-muted); }
.weather-temp { color: var(--g-cream); }
.weather-icon { filter: sepia(1) saturate(1.6) hue-rotate(-12deg) brightness(.95); }
button.clock-widget:hover,
button.clock-widget[aria-expanded="true"],
button.weather-widget:hover,
button.weather-widget[aria-expanded="true"] {
  background: rgba(220, 158, 92, .10);
  border-bottom-color: var(--g-brass-hi);
}

/* ── 3. 侧栏：石板立柱，右沿铜线；导航是背包槽，选中格填实心金 ── */
.sidebar {
  background: var(--g-noise) repeat, rgba(18, 22, 29, .97);
  box-shadow:
    inset -1px 0 0 var(--g-ink),
    inset -2px 0 0 var(--g-brass),
    inset -5px 0 0 var(--g-bronze);
}
.sidebar-label {
  font-family: var(--g-font-pixel);
  font-size: 12px; line-height: 16px;
  letter-spacing: 0;
  color: var(--g-faint);
}
.sidebar .nav-item.lib-slot {
  font-family: var(--g-font-pixel);
  font-size: 18px; line-height: 24px;
  color: var(--g-muted);
  background: var(--g-slate-deep);
  border: 2px solid #3a2414;
  border-radius: 0;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .55), 0 0 0 1px var(--g-ink);
  padding: 9px 12px;
  margin-bottom: 6px;
}
.sidebar .nav-item.lib-slot:hover {
  color: var(--g-title);
  border-color: var(--g-brass);
  background: #141a24;
}
.sidebar .nav-item.lib-slot.active,
.sidebar .nav-item.lib-slot[aria-current] {
  color: var(--g-btn-text);
  background: var(--g-btn);
  border-color: #7a4f22 #2a1406 #130200 #5a3618;
  box-shadow: inset 0 2px 0 var(--g-btn-hi), inset 0 -3px 0 var(--g-btn-lo), 0 0 0 1px var(--g-ink);
  text-shadow: 1px 1px 0 rgba(255, 230, 190, .35);
}
.nav-icon { filter: sepia(1) saturate(1.6) hue-rotate(-12deg) brightness(.95); }
.sidebar .nav-item.lib-slot.active .nav-icon { filter: sepia(1) saturate(1.2) brightness(.55); }
.nav-badge.lib-slot__badge {
  font-size: 12px; line-height: 16px;
  padding: 2px 6px;
  color: var(--g-title);
  border: 1px solid var(--g-brass);
  background: rgba(0, 0, 0, .45);
  border-radius: 0;
}
.sidebar .nav-item.lib-slot.active .nav-badge.lib-slot__badge {
  color: var(--g-btn-text);
  border-color: var(--g-btn-text);
  background: rgba(255, 255, 255, .18);
}
.sidebar-footer { border-top: 1px solid var(--g-ink); box-shadow: inset 0 1px 0 #3a2414; }
.sidebar-credit {
  font-family: var(--g-font-pixel);
  font-size: 12px; line-height: 16px;
  color: var(--g-faint);
}

/* ── 4. 视图标题与分隔线 ── */
.view-header h1 {
  font-family: var(--g-font-pixel);
  font-size: 36px; line-height: 44px;
  color: var(--g-title);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, .6);
  margin-bottom: 6px;
}
.view-subtitle {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--g-muted);
}
.lib-rule {
  height: 4px;
  border-top: 1px solid var(--g-brass);
  border-bottom: 1px solid var(--g-ink);
  background: var(--g-bronze);
}
.dash-section-title {
  font-family: var(--g-font-pixel);
  font-size: 24px; line-height: 32px;
  color: var(--g-title);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .6);
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 8px;
}
.empty-state {
  font-family: var(--g-font-pixel);
  font-size: 18px; line-height: 24px;
  color: var(--g-faint);
}
.empty-state.is-error { color: #e07a6a; }

/* ── 5. 仪表卡 ── */
.hub-card { padding: 20px 22px 22px; }
.hub-card__title {
  font-family: var(--g-font-pixel);
  font-size: 24px; line-height: 32px;
  color: var(--g-title);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .6);
  margin-bottom: 10px;
}
.hub-card__date { font-size: 12px; color: var(--g-link); }
.hub-card__text { color: var(--g-cream); }
.hub-card__empty { color: var(--g-muted); }
.hub-card__mark { filter: sepia(1) saturate(1.6) hue-rotate(-12deg) brightness(.95); }

.dash-gold { background: var(--g-noise) repeat, var(--g-slate); }
.dash-gold-label {
  font-family: var(--g-font-pixel);
  font-size: 12px; line-height: 16px;
  letter-spacing: 0; text-transform: none;
  color: var(--g-faint);
}
.dash-gold-icon { filter: sepia(1) saturate(1.6) hue-rotate(-12deg) brightness(.95); }
.dash-gold-price {
  font-family: var(--g-font-pixel);
  font-size: 24px; line-height: 32px;
  color: var(--g-title);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .6);
}
.dash-gold-right { border-left: 1px solid #3a2414; box-shadow: inset 1px 0 0 var(--g-ink); }
.dash-gold-summary { color: var(--g-cream); }
.dash-gold-source { color: var(--g-faint); }

/* ── 6. 列表项、标签、简报百叶帘 ── */
.content-item.lib-frame { padding: 14px 18px; }
.content-item-title { color: var(--g-cream); font-weight: 500; }
.content-item-summary { color: var(--g-muted); }
.content-item-date {
  font-family: var(--g-font-pixel);
  font-size: 12px; line-height: 16px;
  color: var(--g-link);
}
.content-item-icon { filter: sepia(1) saturate(1.6) hue-rotate(-12deg) brightness(.95); }
.briefing-item { border-left: 4px solid var(--briefing-color, var(--g-brass)); padding-left: 16px; }
.briefing-item:hover { transform: none; }
.tag,
.briefing-type-badge,
.accordion-count,
.accordion-price,
.deprecated-badge {
  font-family: var(--g-font-pixel);
  font-size: 12px; line-height: 16px;
  padding: 2px 6px;
  border-radius: 0;
  background: rgba(0, 0, 0, .45);
  border: 1px solid var(--g-brass);
  color: var(--g-title);
}
.accordion-price { color: var(--g-btn); }

.accordion-group { margin-bottom: 10px; overflow: visible; }
.accordion-header.lib-slot {
  background: var(--g-slate-deep);
  border: 0;
  border-left: 4px solid var(--g-brass);
  border-radius: 0;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .55);
  padding: 12px 16px;
}
.accordion-header.lib-slot:hover,
.accordion-group.open .accordion-header.lib-slot {
  background: #141a24;
  border-left-color: var(--g-btn);
}
.accordion-arrow { color: var(--g-btn); }
.accordion-date {
  font-family: var(--g-font-pixel);
  font-size: 18px; line-height: 24px;
  font-weight: 400;
  color: var(--g-cream);
}
.accordion-body { background: transparent; }
.accordion-content { padding: 12px; }

/* ── 7. 按钮：主动作实心金，次动作空心铜 ── */
.btn-primary,
.hub-card__open.lib-btn,
.upload-btn,
.link-modal-save.lib-btn,
.links-add-btn.lib-btn {
  font-family: var(--g-font-pixel);
  font-weight: 400;
  color: var(--g-btn-text);
  background: var(--g-btn);
  border: 3px solid;
  border-color: #7a4f22 #2a1406 #130200 #5a3618;
  border-radius: 4px;
  box-shadow:
    inset 0 2px 0 var(--g-btn-hi),
    inset 0 -3px 0 var(--g-btn-lo),
    3px 3px 0 rgba(0, 0, 0, .55);
  text-shadow: 1px 1px 0 rgba(255, 230, 190, .35);
  transition: background var(--transition), box-shadow var(--transition);
}
.btn-primary:hover,
.hub-card__open.lib-btn:hover,
.upload-btn:hover,
.link-modal-save.lib-btn:hover,
.links-add-btn.lib-btn:hover {
  color: var(--g-btn-text);
  background: var(--g-btn-hover);
  border-color: #8a5a28 #2a1406 #130200 #6a4320;
  box-shadow:
    inset 0 2px 0 #f8d7a0,
    inset 0 -3px 0 var(--g-btn-lo),
    3px 3px 0 rgba(0, 0, 0, .55);
}
.btn-primary:active,
.hub-card__open.lib-btn:active,
.upload-btn:active,
.link-modal-save.lib-btn:active,
.links-add-btn.lib-btn:active {
  background: #c98d4e;
  border-color: #2a1406 #7a4f22 #5a3618 #130200;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .25), 1px 1px 0 rgba(0, 0, 0, .55);
}
.hub-card__open.lib-btn { font-size: 18px; line-height: 24px; min-height: 40px; padding: 6px 16px; }
.upload-btn { font-size: 18px; line-height: 24px; min-height: 40px; }
.link-modal-save.lib-btn { font-size: 18px; line-height: 24px; }
.links-add-btn.lib-btn { font-family: var(--font-sans); font-size: 22px; width: 40px; height: 40px; }

.lib-btn,
.logout-btn.lib-btn,
.hub-overlay__close.lib-btn,
.link-modal-cancel,
.file-refresh-btn,
.upload-mkdir-btn,
.file-action-btn {
  color: var(--g-title);
  background: var(--g-slate-deep);
  border: 2px solid var(--g-brass);
  border-radius: 4px;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .55), 2px 2px 0 rgba(0, 0, 0, .55);
}
.lib-btn:hover,
.logout-btn.lib-btn:hover,
.hub-overlay__close.lib-btn:hover,
.link-modal-cancel:hover,
.file-refresh-btn:hover,
.upload-mkdir-btn:hover,
.file-action-btn:hover {
  color: var(--g-title);
  background: #141a24;
  border-color: var(--g-brass-hi);
}
.file-delete-btn:hover { color: #e07a6a; border-color: #e07a6a; }
.link-modal-cancel { font-family: var(--g-font-pixel); font-size: 18px; }

/* ── 8. 弹窗：重铜框，标题像素 ── */
.modal-overlay { background: rgba(6, 6, 12, .7); }
.modal.lib-frame { max-width: min(800px, 100%); }
.modal-header { padding: 22px 26px 0; }
.modal-header h2 {
  font-family: var(--g-font-pixel);
  font-size: 24px; line-height: 32px;
  color: var(--g-title);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .6);
}
.modal-close { color: var(--g-muted); }
.modal-close:hover { color: var(--g-title); background: rgba(220, 158, 92, .12); }
.modal-meta { color: var(--g-muted); }
.modal-body {
  border-top: 1px solid var(--g-ink);
  box-shadow: inset 0 1px 0 #3a2414;
  color: var(--g-cream);
}
.modal-body h2 { font-family: var(--g-font-pixel); font-size: 24px; line-height: 32px; color: var(--g-title); }
.modal-body h3 { color: var(--g-title); }
.modal-body strong { color: var(--g-link); }
.modal-body th { color: var(--g-title); background: var(--g-slate-deep); }
.modal-body td { color: var(--g-cream); }
.modal-body table, .modal-body th, .modal-body td { border-color: #3a2414; }
.modal-body blockquote { border-left-color: var(--g-brass); background: rgba(0, 0, 0, .25); }
.modal-body hr { border-top-color: #3a2414; }
.modal-body code { background: var(--g-slate-deep); color: var(--g-link); }

/* 时钟 / 周报浮层 */
.hub-overlay__mask { background: rgba(6, 6, 12, .72); }
.hub-overlay__title {
  font-family: var(--g-font-pixel);
  font-size: 18px; line-height: 24px;
  color: var(--g-title);
  border-bottom: 1px solid #3a2414;
}
.hub-overlay__zh { font-family: var(--g-font-pixel); font-size: 18px; color: var(--g-muted); -webkit-font-smoothing: none; }
.hub-clock__time { color: var(--g-cream); text-shadow: 3px 3px 0 rgba(0, 0, 0, .6); }
.hub-clock__sec { color: var(--g-btn); }
.hub-clock__date, .hub-week__summary { color: var(--g-muted); }
.hub-overlay__note { color: var(--g-faint); }
.hub-dial { border-color: var(--g-brass); background: var(--g-slate-deep); box-shadow: inset 0 0 0 2px var(--g-ink); }
.hub-dial__tick { background: var(--g-rule); }
.hub-dial__tick[data-major="true"] { background: var(--g-brass-hi); }
.hub-dial__hand { background: var(--g-cream); }
.hub-dial__hand--second, .hub-dial__rivet { background: var(--g-btn); }
.hub-slot.lib-slot {
  background: var(--g-slate-deep);
  border: 2px solid #3a2414;
  border-radius: 0;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .55);
}
.hub-slot.lib-slot[data-today="true"] { border-color: var(--g-btn); background: rgba(220, 158, 92, .10); }
.hub-slot__day { font-family: var(--g-font-pixel); font-size: 12px; color: var(--g-muted); }
.hub-slot__temp { color: var(--g-cream); }

/* ── 9. 文件档案 ── */
.file-breadcrumb { font-family: var(--g-font-pixel); font-size: 18px; line-height: 24px; }
.breadcrumb-item, .breadcrumb-root { color: var(--g-link); }
.breadcrumb-current { color: var(--g-title); }
.breadcrumb-sep { color: var(--g-faint); }
.file-upload-zone { padding: 16px; }
.upload-drop-area {
  border: 2px dashed var(--g-brass);
  border-radius: 0;
  background: var(--g-slate-deep);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .55);
}
.upload-drop-area:hover, .upload-drop-area.drag-over {
  border-color: var(--g-btn);
  background: rgba(220, 158, 92, .08);
}
.upload-drop-icon { filter: sepia(1) saturate(1.6) hue-rotate(-12deg) brightness(.95); }
.upload-drop-text { font-family: var(--g-font-pixel); font-size: 18px; line-height: 24px; color: var(--g-cream); font-weight: 400; }
.upload-drop-hint { color: var(--g-faint); }
.upload-folder-select { font-family: var(--font-sans); }
.file-manager-header { border-bottom: 1px solid var(--g-ink); box-shadow: inset 0 -1px 0 #3a2414; }
.file-manager-title { font-family: var(--g-font-pixel); font-size: 18px; line-height: 24px; color: var(--g-title); font-weight: 400; }
.file-table thead th {
  font-family: var(--g-font-pixel);
  font-size: 12px; line-height: 16px;
  letter-spacing: 0; text-transform: none; font-weight: 400;
  color: var(--g-faint);
  background: var(--g-slate-deep);
  border-bottom: 1px solid #3a2414;
}
.file-table tbody .file-row { border-bottom: 1px solid #2a1a10; }
.file-table tbody .file-row:hover { background: rgba(220, 158, 92, .06); }
.file-table tbody td { color: var(--g-cream); }
.file-icon { filter: sepia(1) saturate(1.6) hue-rotate(-12deg) brightness(.95); }
.upload-progress-bar { background: var(--g-slate-deep); border: 1px solid #3a2414; border-radius: 0; }
.upload-progress-fill { background: var(--g-btn); border-radius: 0; }

/* ── 10. 链接书架：外框换铜，架内木纹保留 ── */
.links-grid.lib-frame::before { content: ""; }
.links-grid.lib-frame {
  background:
    linear-gradient(90deg, rgba(212,168,83,.10), transparent 12%, transparent 88%, rgba(212,168,83,.10)),
    repeating-linear-gradient(0deg, transparent 0 178px, rgba(61,35,15,.85) 178px 190px, rgba(24,15,9,.98) 190px 198px),
    var(--g-noise) repeat,
    linear-gradient(180deg, #1b1a1e, #0f1016);
}
.links-hint {
  font-family: var(--g-font-pixel);
  font-size: 18px; line-height: 24px;
  letter-spacing: 0;
  color: var(--g-muted);
  background: var(--g-slate-deep);
  border: 2px solid #3a2414;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .55);
}
.links-hint::before, .links-hint::after { color: var(--g-brass); }
.link-field span { font-family: var(--g-font-pixel); font-size: 18px; line-height: 24px; color: var(--g-muted); font-weight: 400; }
.link-modal-footer { border-top: 1px solid var(--g-ink); box-shadow: inset 0 1px 0 #3a2414; }
.color-swatch { border-radius: 0; border: 2px solid var(--g-ink); }
.color-swatch.active { border-color: var(--g-title); box-shadow: 0 0 0 2px var(--g-btn); }

/* ── 11. 窄屏 ── */
@media (max-width: 600px) {
  .view-header h1 { font-size: 24px; line-height: 32px; }
  .logo-text { font-size: 18px; line-height: 24px; }
  .hub-card__title, .dash-section-title { font-size: 18px; line-height: 24px; }
  .modal-header h2 { font-size: 18px; line-height: 24px; }
  .sidebar .nav-item.lib-slot { font-size: 16px; }
}

/* ── 12. 金价走势卡（js/hub/card-gold.js）：像素折线，单系列不配图例 ── */
.hub-gold__price {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px;
  margin: 0 0 10px;
  font-family: var(--g-font-pixel);
  font-size: 36px; line-height: 44px;
  color: var(--g-title);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, .6);
}
.hub-gold__delta {
  font-size: 18px; line-height: 24px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .6);
}
.hub-gold__delta--up   { color: #8fc98a; }
.hub-gold__delta--down { color: #e07a6a; }
.hub-gold__delta--flat { color: var(--g-muted); }
.hub-gold__plot {
  position: relative;
  padding: 8px 8px 6px;
  background: var(--g-slate-deep);
  border: 2px solid #2a3148;
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, .55);
}
.hub-gold__chart {
  display: block;
  width: 100%; height: 88px;
  overflow: visible;
  touch-action: none;
}
.hub-gold__base { stroke: #3a2414; stroke-width: 1; }
.hub-gold__line {
  fill: none;
  stroke: var(--g-btn);
  stroke-width: 2;
  stroke-linejoin: miter;
  stroke-linecap: square;
  vector-effect: non-scaling-stroke;
}
.hub-gold__dot { fill: var(--g-slate-deep); stroke-width: 2; vector-effect: non-scaling-stroke; }
.hub-gold__dot--hi   { stroke: #8fc98a; }
.hub-gold__dot--lo   { stroke: #e07a6a; }
.hub-gold__dot--last { fill: var(--g-title); stroke: var(--g-ink); }
.hub-gold__cursor { stroke: var(--g-brass-hi); stroke-width: 1; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.hub-gold__tip {
  position: absolute; top: -14px; left: 0;
  padding: 2px 6px;
  font-family: var(--g-font-pixel);
  font-size: 12px; line-height: 16px;
  color: var(--g-btn-text);
  background: var(--g-btn);
  border: 1px solid var(--g-ink);
  white-space: nowrap;
  pointer-events: none;
}
.hub-gold__range {
  margin: 8px 0 0;
  font-family: var(--g-font-pixel);
  font-size: 12px; line-height: 16px;
  color: var(--g-faint);
}
.hub-gold__table { margin-top: 8px; }
.hub-gold__table summary {
  cursor: pointer;
  font-family: var(--g-font-pixel);
  font-size: 12px; line-height: 16px;
  color: var(--g-link);
}
.hub-gold__table table {
  width: 100%; margin-top: 6px;
  border-collapse: collapse;
  font-family: var(--g-font-pixel);
  font-size: 12px; line-height: 16px;
}
.hub-gold__table th { text-align: left; color: var(--g-faint); font-weight: 400; padding: 2px 4px; border-bottom: 1px solid #3a2414; }
.hub-gold__table td { padding: 2px 4px; color: var(--g-cream); border-bottom: 1px solid #22160e; }

/* ── 13. 游戏界面层 ── */

/* 扫描线压在静底上，不压内容 */
.hub-still::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .14) 0 1px, transparent 1px 3px);
  pointer-events: none;
}

/* RPG 菜单光标：选中项左侧闪烁的小三角 */
.sidebar .nav-item.lib-slot { position: relative; }
.sidebar .nav-item.lib-slot.active::before,
.sidebar .nav-item.lib-slot[aria-current]::before {
  content: "";
  position: absolute;
  left: -13px; top: 50%;
  width: 0; height: 0;
  margin-top: -5px;
  border-left: 8px solid var(--g-btn);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  background: none; box-shadow: none; transform: none; opacity: 1;
  animation: g-blink 1s steps(1) infinite;
}
.nav-icon { display: inline-flex; align-items: center; justify-content: center; filter: none; }
.sidebar .nav-item.lib-slot.active .nav-icon { filter: brightness(.35) sepia(1) saturate(.6); }

/* 卡片标题下一条像素点线，像游戏窗口的标题栏 */
.hub-card__title::after,
.modal-header h2::after,
.dash-section-title::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 6px;
  background: repeating-linear-gradient(90deg, var(--g-brass) 0 4px, transparent 4px 8px);
}
.modal-header h2 { display: block; }

/* 列表卡（日程、馆务日志） */
.hub-list { list-style: none; margin: 0; padding: 0; }
.hub-list__row {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #22160e;
  font-family: var(--font-sans);
  font-size: 13px; line-height: 18px;
  color: var(--g-cream);
}
.hub-list__row:last-child { border-bottom: 0; }
.hub-list__row .px-icon { margin-top: 1px; }
.hub-list__main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hub-list__main a { color: var(--g-link); text-decoration: underline; text-underline-offset: 3px; }
.hub-list__note { display: block; font-size: 12px; color: var(--g-muted); }
.hub-list__meta {
  flex-shrink: 0; text-align: right;
  font-family: var(--g-font-pixel);
  font-size: 12px; line-height: 18px;
  color: var(--g-faint);
}
.hub-list__when { display: block; color: var(--g-link); }

/* 按钮按压：实心金钮按下去位移 2px */
.btn-primary:active,
.hub-card__open.lib-btn:active,
.upload-btn:active,
.link-modal-save.lib-btn:active,
.links-add-btn.lib-btn:active { transform: translate(2px, 2px); }

/* 提示框改成像素对话框 */
.file-toast {
  background: var(--g-noise) repeat, var(--g-slate);
  border: 4px solid var(--g-bronze);
  border-top-color: var(--g-bronze-hi);
  border-bottom-color: var(--g-bronze-lo);
  border-radius: 0;
  box-shadow: var(--g-frame-lite);
  font-family: var(--g-font-pixel);
  font-size: 18px; line-height: 24px;
  color: var(--g-cream);
  padding: 10px 18px;
}
.file-toast-success { border-color: var(--g-bronze); box-shadow: var(--g-frame-lite), inset 0 0 0 2px #5a9e6e; }
.file-toast-error   { border-color: var(--g-bronze); box-shadow: var(--g-frame-lite), inset 0 0 0 2px #e07a6a; }

/* 文件柜图标 */
.file-icon { display: inline-flex; filter: none; }
.content-item-icon { filter: none; display: flex; align-items: center; justify-content: center; }
.content-item-icon .px-icon { width: 32px; height: 32px; }
.modal-meta .px-icon { vertical-align: -3px; }

/* ── 14. 链接书架：像素封面（js/app.js createLinkCover） ── */
.link-cover-px {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  padding: 18px 14px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--card-accent, #c9956b) 28%, transparent) 0, transparent 46%),
    var(--g-noise) repeat,
    var(--g-slate);
  border: 2px solid #3a2414;
  box-shadow: inset 0 0 0 1px var(--g-ink), inset 0 0 40px rgba(0, 0, 0, .45), 0 10px 0 rgba(12, 8, 5, .94);
}
.link-cover-px::before { content: none; }
.link-cover-px::after  { inset: 6px; border-color: rgba(217, 149, 90, .22); }
.link-px-kicker,
.link-px-headline {
  font-family: var(--g-font-pixel);
  font-size: 12px; line-height: 16px;
  color: var(--g-faint);
  letter-spacing: 0;
}
.link-px-art {
  display: grid; place-items: center;
  width: 128px; height: 128px;
  background: var(--g-slate-deep);
  border: 2px solid #2a3148;
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, .55), 0 0 0 2px var(--g-ink);
}
.link-px-icon {
  width: 96px; height: 96px;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}
.link-px-name {
  font-family: var(--g-font-pixel);
  font-size: 18px; line-height: 24px;
  color: var(--g-title);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .6);
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.link-px-headline { color: var(--g-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-card-caption { background: var(--g-noise) repeat, var(--g-slate-deep); border-color: #3a2414; }
.link-card-name { font-family: var(--g-font-pixel); font-size: 12px; line-height: 16px; font-weight: 400; letter-spacing: 0; color: var(--g-title); }
.link-card-subtitle { font-family: var(--font-sans); color: var(--g-muted); }
.link-card:hover .link-px-art { border-color: var(--g-btn); }
@media (max-width: 600px) {
  .link-px-art { width: 96px; height: 96px; }
  .link-px-icon { width: 72px; height: 72px; }
}

/* ── 15. 炼金工坊入口卡 ── */
.forge-link { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; text-decoration: none; color: inherit; }
.forge-well {
  display: grid; place-items: center; flex-shrink: 0;
  width: 88px; height: 88px;
  background: var(--g-slate);
  border: 2px solid #2a3148;
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, .55), 0 0 0 2px var(--g-ink);
}
.forge-gif { width: 72px; height: 72px; image-rendering: crisp-edges; image-rendering: pixelated; }
.forge-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.forge-text .hub-card__text, .forge-text .hub-card__empty { margin: 0; }
.forge-link:hover .forge-well { border-color: var(--g-btn); }

/* ── 16. 班表 ── */
.shift-root { padding: 16px; }
.shift-root .empty-state { padding: 24px; }
.shift-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.shift-month {
  font-family: var(--g-font-pixel); font-size: 24px; line-height: 32px;
  color: var(--g-title); text-shadow: 2px 2px 0 rgba(0, 0, 0, .6);
  margin: 0 6px;
}
.shift-nav, .shift-save { font-family: var(--g-font-pixel); font-size: 18px; line-height: 24px; padding: 6px 12px; cursor: pointer; }
.shift-staff { display: inline-flex; align-items: center; gap: 8px; font-family: var(--g-font-pixel); font-size: 12px; line-height: 16px; color: var(--g-muted); }
.shift-staff__input {
  width: 160px; padding: 6px 10px;
  font-family: var(--font-sans); font-size: 14px;
  color: var(--g-cream); background: var(--g-slate-deep);
  border: 2px solid #2a3148; border-radius: 4px;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .55);
}
.shift-staff__input:focus { outline: none; border-color: var(--g-btn); }
.shift-import { display: inline-flex; align-items: center; font-family: var(--g-font-pixel); font-size: 18px; line-height: 24px; padding: 6px 14px; cursor: pointer; }
.shift-status { font-family: var(--g-font-pixel); font-size: 12px; line-height: 16px; color: var(--g-faint); flex-basis: 100%; }
.shift-top { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.shift-today {
  flex: 1 1 200px;
  padding: 12px 16px;
  background: var(--g-slate-deep);
  border: 2px solid #2a3148;
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, .55);
}
.shift-today .hub-card__date { margin-bottom: 4px; }
.shift-today__code {
  margin: 0;
  font-family: var(--g-font-pixel); font-size: 48px; line-height: 56px;
  color: var(--g-title); text-shadow: 3px 3px 0 rgba(0, 0, 0, .6);
}
.shift-today__code.is-off { color: #8fc98a; }
.shift-today__name { margin: 0; font-family: var(--g-font-pixel); font-size: 18px; line-height: 24px; color: var(--g-cream); }
.shift-today__brk { margin: 2px 0 0; font-family: var(--g-font-pixel); font-size: 12px; line-height: 16px; color: var(--g-muted); }
.shift-card { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.shift-card .shift-today { padding: 8px 10px; }
.shift-card .shift-today__code { font-size: 36px; line-height: 44px; }
.shift-source { flex: 1 1 200px; }
.shift-roster-img img { display: block; max-width: 100%; margin-top: 8px; border: 2px solid #3a2414; }
.shift-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px;
}
.shift-grid__head {
  font-family: var(--g-font-pixel); font-size: 12px; line-height: 16px;
  color: var(--g-faint); text-align: center; padding: 2px 0;
}
.shift-cell {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-height: 62px; padding: 6px 4px;
  background: var(--g-slate-deep);
  border: 2px solid #3a2414; border-radius: 0;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .55);
  color: var(--g-cream); cursor: pointer;
  font-family: var(--g-font-pixel);
}
.shift-cell.is-out { opacity: .25; cursor: default; }
.shift-cell:not([disabled]):hover { border-color: var(--g-brass); }
.shift-cell.is-today { border-color: var(--g-btn); box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .55), 0 0 0 2px rgba(220, 158, 92, .35); }
.shift-cell.is-selected { background: #141a24; border-color: var(--g-title); }
.shift-cell__day { font-size: 12px; line-height: 16px; color: var(--g-faint); }
.shift-cell.is-today .shift-cell__day { color: var(--g-btn); }
.shift-cell__dot { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; background: var(--g-btn); }
.shift-chip {
  display: inline-block; min-width: 28px; padding: 2px 6px;
  font-family: var(--g-font-pixel); font-size: 18px; line-height: 24px;
  text-align: center;
  border: 2px solid var(--g-brass); color: var(--g-title);
  background: rgba(0, 0, 0, .45);
}
.shift-chip--off { border-color: #5a9e6e; color: #8fc98a; }
.shift-chip--none { border-color: transparent; color: var(--g-faint); background: none; }
.shift-picker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: 12px; padding: 10px;
  background: var(--g-noise) repeat, var(--g-slate);
  border: 2px solid var(--g-brass);
}
.shift-picker__label { font-family: var(--g-font-pixel); font-size: 18px; line-height: 24px; color: var(--g-title); margin-right: 6px; }
.shift-pick { font-family: var(--g-font-pixel); font-size: 18px; line-height: 24px; min-width: 44px; padding: 4px 8px; cursor: pointer; }
.shift-pick--reset { margin-left: auto; }
.shift-legend { margin-top: 14px; }
.shift-legend summary { cursor: pointer; font-family: var(--g-font-pixel); font-size: 12px; line-height: 16px; color: var(--g-link); }
.shift-legend table { width: 100%; margin-top: 8px; border-collapse: collapse; font-family: var(--g-font-pixel); font-size: 12px; line-height: 16px; }
.shift-legend th { text-align: left; font-weight: 400; color: var(--g-faint); padding: 4px; border-bottom: 1px solid #3a2414; }
.shift-legend td { padding: 4px; color: var(--g-cream); border-bottom: 1px solid #22160e; }
@media (max-width: 600px) {
  .shift-cell { min-height: 54px; }
  .shift-chip { font-size: 12px; line-height: 16px; min-width: 22px; padding: 1px 4px; }
  .shift-today__code { font-size: 36px; line-height: 44px; }
  .shift-card { grid-template-columns: 1fr; }
}

/* ── 17. 档案架（简报页底部）与馆务清点卡 ── */
.month-group .accordion-content { padding: 10px; }
.archive-shelf { margin-top: 28px; }
.archive-shelf .dash-section-title { margin-bottom: 4px; }
.archive-shelf__note { margin: 0 0 10px; font-family: var(--g-font-pixel); font-size: 12px; line-height: 16px; color: var(--g-faint); }
.archive-shelf__years { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.archive-year { font-family: var(--g-font-pixel); font-size: 18px; line-height: 24px; padding: 6px 12px; cursor: pointer; }
.archive-year.is-active { background: var(--g-btn); color: var(--g-btn-text); border-color: #7a4f22; }
.archive-year__count { font-size: 12px; line-height: 16px; opacity: .8; margin-left: 4px; }
.archive-shelf__status { font-family: var(--g-font-pixel); font-size: 12px; line-height: 16px; color: var(--g-link); min-height: 16px; margin-bottom: 8px; }
.archive-year-block { margin-top: 6px; }
.search-filter-row--check label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--g-muted); }
.search-filter-row--check input { width: 16px; height: 16px; accent-color: var(--g-btn); }
.stock-r2 { margin-top: 10px; }
.stock-r2 .hub-card__open { margin-top: 0; }
.stock-table { width: 100%; margin-top: 10px; border-collapse: collapse; font-family: var(--g-font-pixel); font-size: 12px; line-height: 16px; }
.stock-table th { text-align: left; font-weight: 400; color: var(--g-faint); padding: 3px 4px; border-bottom: 1px solid #3a2414; }
.stock-table td { padding: 3px 4px; color: var(--g-cream); border-bottom: 1px solid #22160e; }
.stock-warn { margin: 8px 0 0; font-family: var(--g-font-pixel); font-size: 12px; line-height: 16px; color: #e0b36a; }
