* { box-sizing: border-box; }
html {
  scrollbar-gutter: stable;
}
html, body {
  width: 100%;
  margin: 0; padding: 0;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-serif);
  font-size: 16px; line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--paper-dark); }
::-webkit-scrollbar-thumb { background: var(--ink-fainter); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

.app-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  display: flex; justify-content: flex-start; align-items: center;
  gap: 16px; padding: 0 24px; height: 64px;
  background: var(--paper-dark);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px var(--shadow);
  /* 排版自成一体，不继承页面级排版，保证各页面渲染像素一致 */
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.85;
}
.app-nav .nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-serif); font-weight: 700; font-size: 20px;
  color: var(--ink); letter-spacing: 2px; margin-right: auto; text-decoration: none;
}
.app-nav .nav-logo {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
}
.search-box { position: relative; }
.nav-search {
  max-width: 100%; padding: 8px 16px; border: 1px solid var(--border);
  border-radius: 4px; font-size: 14px; width: 280px;
  background: var(--input-bg); color: var(--ink);
  font-family: var(--font-serif);
}
.nav-search::placeholder { color: var(--ink-faint); }
.nav-search:focus { outline: none; border-color: var(--ink-faint); }
.theme-toggle {
  flex-shrink: 0; width: 40px; height: 40px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  cursor: pointer; font-size: 18px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.theme-toggle:hover { border-color: var(--ink-faint); transform: scale(1.05); }
.theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: inline; }
.search-results {
  position: absolute; top: 100%; right: 0; background: var(--paper);
  border: 1px solid var(--border); border-radius: 4px; margin-top: 4px;
  min-width: 280px; max-height: 400px; overflow-y: auto;
  display: none; box-shadow: 0 4px 12px var(--shadow); z-index: 1000;
}
.search-results.active { display: block; }
.search-result-item {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--ink); display: block;
}
.search-result-item:hover { background: var(--paper-dark); }
.search-result-item:last-child { border-bottom: none; }
.search-result-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.search-result-desc { font-size: 12px; color: var(--ink-faint); }
.search-no-result { padding: 14px; text-align: center; color: var(--ink-faint); }

/* Wiki侧边栏 */
.content { display: flex; padding-top: 64px !important; }
    .wiki-sidebar {
      position: fixed; top: 64px; left: 0; bottom: 0;
      width: 240px; background: var(--sidebar-bg);
      border-right: 1px solid var(--sidebar-border);
      overflow-y: auto; padding: 0 0 20px 0;
      font-family: var(--font-serif); font-size: 14px;
      z-index: 50;
      transition: transform 0.3s ease, opacity 0.3s ease;
    }
/* 折叠时整体左移出屏，不改宽度，避免文字被挤压重排 */
.wiki-sidebar.collapsed { transform: translateX(-100%); opacity: 0; pointer-events: none; }
.sidebar-toggle {
  position: fixed; top: 72px; left: 240px;
  width: 22px; height: 36px; border-radius: 0 4px 4px 0;
  background: var(--btn-bg); color: var(--color-on-primary);
  border: none; cursor: pointer; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  transition: left 0.3s ease; z-index: 51;
}
.sidebar-toggle:hover { background: var(--btn-hover); }
.sidebar-toggle.collapsed { left: 0; }
.sidebar-title {
  font-weight: 700; font-size: 13px; color: var(--color-on-primary-muted);
  text-transform: uppercase; letter-spacing: 2px;
  padding: 0 20px 8px 20px; border-bottom: 1px solid var(--color-on-primary-border);
  margin-bottom: 0;
  position: sticky; top: 56px; background: var(--sidebar-bg); z-index: 10;
}
.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-item { margin: 0; }
.sidebar-link {
  display: block; padding: 8px 20px; color: var(--color-on-primary-strong) !important;
  text-decoration: none !important; border-bottom: none !important;
  transition: all 0.15s; border-left: 3px solid transparent;
}
.sidebar-link:hover {
  background: var(--color-on-primary-subtle); color: var(--color-on-primary) !important;
  border-left-color: var(--color-on-primary-border-strong);
}
.sidebar-link.has-children {
  font-weight: 600; color: var(--color-on-primary) !important;
}
.sidebar-link.has-children.active {
  color: var(--color-on-primary) !important;
  font-weight: 700;
  border-left-color: var(--color-primary-soft-strong);
  background: var(--color-primary-soft-translucent);
}
.sidebar-children .sidebar-link {
  padding: 6px 16px; font-size: 13px; font-weight: 400;
  color: var(--color-on-primary-muted) !important;
}
.sidebar-children .sidebar-link:hover {
  color: var(--color-on-primary) !important;
}
/* 当前子页面高亮 */
.sidebar-children .sidebar-link.active {
  color: var(--color-on-primary) !important;
  font-weight: 600;
  background: var(--color-primary-soft-translucent);
  border-left-color: var(--color-primary-soft-strong);
}
.sidebar-children {
  list-style: none; padding: 0; margin: 0;
  border-left: 1px solid var(--color-on-primary-border); margin-left: 20px;
}
/* 模块折叠箭头 */
.sidebar-link.has-children { position: relative; padding-right: 30px; }
.sidebar-item { position: relative; }
.sidebar-fold {
  position: absolute; right: 2px; top: 3px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-on-primary-faint); cursor: pointer; font-size: 20px;
  border-radius: 3px; user-select: none; z-index: 2;
  transition: color .15s, background .15s;
}
.sidebar-fold:hover { color: var(--color-on-primary); background: var(--color-on-primary-hover); }
.sidebar-item.collapsed > .sidebar-children { display: none; }
.wiki-main {
  /* 左右 margin 对称，保证正文块在视口中绝对居中 */
  margin-left: 240px; margin-right: 240px; flex: 1; min-width: 0;
}

/* 文章内容 */
.markdown-section {
  max-width: 920px; margin: 0 auto;
  padding: 48px 60px 80px !important; background: var(--paper);
  animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.markdown-section p {
  font-family: var(--font-serif); font-size: 16.5px; line-height: 1.9;
  color: var(--ink); margin: 1.2em 0; text-align: justify; text-indent: 2em;
}
.markdown-section h1, .markdown-section h2, .markdown-section h3, .markdown-section h4 { text-indent: 0; }
.markdown-section h1 {
  font-weight: 700; font-size: 28px; color: var(--ink);
  margin: 1.5em 0 0.8em; padding-bottom: 12px; border-bottom: 2px solid var(--ink); letter-spacing: 1px;
}
.markdown-section h2 {
  font-weight: 700; font-size: 22px; color: var(--ink);
  margin: 1.8em 0 0.6em; padding-bottom: 8px; border-bottom: 1px solid var(--border); position: relative;
}
.markdown-section h2::before { content: '§ '; color: var(--vermilion); font-weight: 400; }
.markdown-section h3 { font-weight: 600; font-size: 18px; color: var(--ink-light); margin: 1.4em 0 0.5em; }
.markdown-section h4 { font-weight: 600; font-size: 16px; color: var(--ink-light); margin: 1.2em 0 0.4em; }
.markdown-section a { color: var(--link); text-decoration: none; border-bottom: 1px solid var(--ink-fainter); transition: all 0.2s; }
.markdown-section a:hover { color: var(--vermilion); border-bottom-color: var(--vermilion); }
.markdown-section blockquote {
  margin: 1.5em 0; padding: 16px 20px; background: var(--blockquote-bg);
  border-left: 4px solid var(--ink-faint); border-radius: 0 4px 4px 0;
  color: var(--ink-light); font-style: italic;
}
.markdown-section blockquote p { text-indent: 0; margin: 0.5em 0; color: var(--ink-light); }
.markdown-section table {
  width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 15px; background: var(--paper);
}
.markdown-section thead th {
  background: var(--paper-dark); font-weight: 700; color: var(--ink);
  padding: 10px 14px; text-align: left; border-bottom: 2px solid var(--ink);
}
.markdown-section tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--ink); }
.markdown-section tbody tr:hover { background: var(--paper-dark); }
.markdown-section code {
  font-family: var(--font-mono); font-size: 14px; background: var(--paper-dark);
  border: 1px solid var(--border); border-radius: 3px; padding: 2px 6px; color: var(--ink-light);
}
.markdown-section pre {
  background: var(--paper-dark) !important; border: 1px solid var(--border);
  border-radius: 4px; padding: 20px !important; margin: 1.5em 0;
  overflow-x: auto; box-shadow: inset 0 1px 3px var(--shadow);
}
.markdown-section pre code { background: none; border: none; padding: 0; font-size: 14px; line-height: 1.7; color: var(--ink); }
.markdown-section ul, .markdown-section ol { padding-left: 1.8em; margin: 1em 0; }
.markdown-section li { font-size: 16px; line-height: 1.85; color: var(--ink); margin: 0.4em 0; }
.markdown-section ul li::marker { color: var(--vermilion); }
.markdown-section ol li::marker { color: var(--ink-faint); font-weight: 600; }
.markdown-section hr { border: none; height: 1px; background: var(--border); margin: 2.5em 0; }
.markdown-section strong { color: var(--ink); font-weight: 700; }
.markdown-section em { color: var(--ink-light); font-style: italic; }
.markdown-section input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; width: 16px; height: 16px;
  border: 2px solid var(--ink-faint); border-radius: 3px; background: var(--paper);
  cursor: pointer; position: relative; top: 3px; margin-right: 6px;
}
.markdown-section input[type="checkbox"]:checked { background: var(--ink); border-color: var(--ink); }
.markdown-section input[type="checkbox"]:checked::after {
  content: ''; color: var(--paper); font-size: 12px; position: absolute; top: -1px; left: 2px;
}
.markdown-section kbd {
  font-family: var(--font-mono); font-size: 13px; background: var(--paper-dark);
  border: 1px solid var(--border); border-bottom: 2px solid var(--ink-fainter);
  border-radius: 3px; padding: 1px 6px; color: var(--ink-light); box-shadow: 0 1px 1px var(--shadow);
}

/* PDF 内嵌查看器（桌面显示，手机隐藏改用链接） */
.pdf-embed { width: 100%; height: 680px; border: 1px solid var(--border); border-radius: 6px; background: var(--paper-dark); }

.doc-links {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 30px;
  padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.doc-links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 6px;
  background: var(--paper-dark); border: 1px solid var(--border);
  color: var(--ink) !important; font-size: 14px; font-weight: 600;
  text-decoration: none !important; border-bottom: none !important;
  transition: all 0.2s;
}
.doc-links a:hover {
  background: var(--ink); color: var(--paper) !important;
  border-color: var(--ink); transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--shadow);
}
body::before {
  content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 9999;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, var(--color-paper-grain-light) 2px, var(--color-paper-grain-light) 4px);
}
html[data-theme="dark"] body::before {
  background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, var(--color-paper-grain-dark) 2px, var(--color-paper-grain-dark) 4px);
}

/* 目录 */
.toc-sidebar {
  position: fixed; top: 70px; right: 20px; width: 200px;
  max-height: calc(100vh - 100px); overflow-y: auto;
  font-family: var(--font-serif); font-size: 13px; z-index: 100;
}
.toc-sidebar::-webkit-scrollbar { width: 3px; }
.toc-sidebar::-webkit-scrollbar-thumb { background: var(--ink-fainter); border-radius: 2px; }
.toc-title {
  font-weight: 700; font-size: 14px; color: var(--ink);
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border); letter-spacing: 1px;
}
.toc-title::before { content: ''; }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin: 0; padding: 0; }
.toc-list a {
  display: block; padding: 5px 0 5px 12px;
  color: var(--ink-faint) !important; text-decoration: none !important;
  border-left: 2px solid transparent; transition: all 0.2s;
  line-height: 1.5; border-bottom: none !important;
}
.toc-list a:hover { color: var(--ink) !important; border-left-color: var(--ink-faint); }
.toc-list a.active { color: var(--vermilion) !important; border-left-color: var(--vermilion); font-weight: 600; }
.toc-list .toc-h3 { padding-left: 24px; font-size: 12px; }
.toc-toggle {
  display: none; position: fixed; bottom: 20px; right: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--btn-bg); color: var(--paper); border: none;
  font-size: 20px; cursor: pointer; z-index: 200;
  box-shadow: 0 2px 8px var(--shadow);
}

/* 返回顶部 */
.back-to-top {
  position: fixed; bottom: 80px; right: 30px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--btn-bg); color: var(--paper); border: none;
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all 0.3s;
  box-shadow: 0 2px 8px var(--shadow); z-index: 150;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--btn-hover); transform: translateY(-2px); }

/* 评论区容器（id 沿用 Twikoo 约定，渲染前后都命中） */
#twikoo {
  max-width: 920px; margin: 60px auto 0; padding: 0 0 40px;
  border-top: 2px solid var(--ink); padding-top: 30px;
  /* 覆盖 Element UI 主题色变量，让按钮等组件跟随站点配色 */
  --el-color-primary: var(--vermilion, #c83c28);
}
.twikoo-title {
  font-family: var(--font-serif); font-size: 20px; font-weight: 700;
  color: var(--ink); margin-bottom: 20px; text-align: center;
}

/* —— 表单区（#twikoo 前缀提高优先级，压过 Element UI 动态注入的样式） —— */
#twikoo .tk-submit { background: none !important; }
#twikoo .tk-avatar { border-radius: 50%; overflow: hidden; }
#twikoo .tk-avatar-img img, #twikoo .tk-avatar-img svg { border-radius: 50%; }

/* 输入框前缀标签（昵称/邮箱/网址） */
#twikoo .tk-meta-input .el-input-group__prepend {
  background: var(--paper-dark) !important;
  border-color: var(--border) !important;
  color: var(--ink-light) !important;
  font-family: var(--font-serif) !important; font-size: 13px !important;
  padding: 0 10px !important;
}
/* 输入框本体 */
#twikoo .tk-meta-input .el-input__inner,
#twikoo .el-textarea__inner {
  border-color: var(--border) !important;
  border-radius: 4px !important;
  font-family: var(--font-serif) !important;
  font-size: 14px !important;
  color: var(--ink) !important;
  background: var(--paper) !important;
  transition: border-color 0.2s;
}
#twikoo .tk-meta-input .el-input__inner:focus,
#twikoo .el-textarea__inner:focus {
  border-color: var(--vermilion) !important;
}
#twikoo .el-textarea__inner { line-height: 1.8; padding: 10px 14px !important; }
#twikoo .el-input__count { font-size: 12px; color: var(--ink-faint); }

/* 操作行 */
#twikoo .tk-row.actions { margin-top: 8px; gap: 8px; }
#twikoo .tk-submit-action-icon { color: var(--ink-light); }
#twikoo .tk-submit-action-icon:hover { color: var(--vermilion); }

/* 发送 / 预览按钮 */
#twikoo .el-button.tk-send {
  background: var(--vermilion) !important;
  border-color: var(--vermilion) !important;
  color: #fff !important;
  border-radius: 4px !important;
  font-family: var(--font-serif) !important;
  font-size: 14px !important;
  padding: 7px 18px !important;
}
#twikoo .el-button.tk-send:hover { opacity: 0.85; }
#twikoo .el-button.tk-preview {
  border-color: var(--border) !important;
  color: var(--ink-light) !important;
  border-radius: 4px !important;
  font-family: var(--font-serif) !important;
  font-size: 14px !important;
}
#twikoo .tk-error-message { color: #c0392b; font-size: 13px; }

/* —— 评论列表区 —— */
#twikoo .tk-comments-title {
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px; margin-bottom: 16px;
  font-family: var(--font-serif);
  color: var(--ink);
}
#twikoo .tk-comments-count { font-weight: 700; }

#twikoo .tk-comments-no {
  text-align: center; color: var(--ink-faint);
  font-family: var(--font-serif); padding: 32px 0;
}

/* 单条评论卡片 */
#twikoo .tk-comment {
  padding: 16px 0;
  border-bottom: 1px dashed var(--border);
}
#twikoo .tk-comment:last-child { border-bottom: none; }

/* 评论元信息行 */
#twikoo .tk-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
#twikoo .tk-nick { font-family: var(--font-serif) !important; font-weight: 600; color: var(--ink); }
#twikoo .tk-nick a { color: var(--link); }
#twikoo .tk-region { font-size: 12px; color: var(--ink-faint); }
#twikoo .tk-time { font-size: 12px; color: var(--ink-faint); }

/* 评论正文 */
#twikoo .tk-content {
  font-family: var(--font-serif); font-size: 15px;
  line-height: 1.85; color: var(--ink);
  margin: 4px 0 0; padding-left: 48px;
}
#twikoo .tk-content p { margin: 0.5em 0; }
#twikoo .tk-content a { color: var(--link); border-bottom: 1px solid var(--ink-fainter); }
#twikoo .tk-content img { max-width: 100%; border-radius: 4px; }
#twikoo .tk-content pre {
  background: var(--paper-dark); border-radius: 4px;
  padding: 12px; overflow-x: auto; font-size: 13px;
}
#twikoo .tk-content code { background: var(--paper-dark); padding: 2px 6px; border-radius: 3px; font-size: 13px; }

/* 评论操作（回复/点赞） */
#twikoo .tk-comment-actions { padding-left: 48px; margin-top: 4px; }
#twikoo .tk-comment-actions a {
  font-size: 13px; color: var(--ink-light);
  margin-right: 16px; border: none;
}
#twikoo .tk-comment-actions a:hover { color: var(--vermilion); }

/* 子评论缩进 */
#twikoo .tk-children { margin-left: 48px; padding-left: 16px; border-left: 2px solid var(--border); }

/* 分页/展开 */
#twikoo .tk-expand, #twikoo .tk-pagination {
  text-align: center; padding: 12px 0;
  font-size: 14px; color: var(--ink-light);
}
#twikoo .tk-expand a, #twikoo .tk-pagination a { color: var(--link); border: none; }
#twikoo .tk-expand a:hover, #twikoo .tk-pagination a:hover { color: var(--vermilion); }

/* 加载状态 */
#twikoo .el-loading-mask { background: transparent !important; }
#twikoo .el-loading-spinner .circular { width: 28px; height: 28px; }

/* 底部 Powered by */
#twikoo .tk-footer { text-align: center; margin-top: 16px; }
#twikoo .tk-footer a { font-size: 12px; color: var(--ink-faint); }

/* 管理面板 */
#twikoo .tk-admin { border-radius: 6px; border-color: var(--border) !important; }

.comment-fallback {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--paper-dark);
  color: var(--ink-faint);
  text-align: center;
  font-size: 14px;
}

/* 移动端适配 */
@media screen and (max-width: 1200px) {
  .toc-sidebar {
    position: fixed; left: auto; right: -260px; top: 0; bottom: 0;
    width: 260px; max-height: 100vh; background: var(--paper);
    padding: 60px 20px 20px; border-left: 1px solid var(--border);
    box-shadow: -4px 0 12px var(--shadow); transition: right 0.3s ease; z-index: 500;
  }
  .toc-sidebar.open { right: 0; }
  .toc-toggle { display: flex; align-items: center; justify-content: center; }
  .toc-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--color-overlay); z-index: 499;
  }
  .toc-overlay.open { display: block; }
}
@media screen and (max-width: 900px) {
  .wiki-sidebar {
    position: fixed; left: -260px; width: 260px;
    transition: left 0.3s ease; z-index: 500; box-shadow: none; background: var(--sidebar-bg);
  }
  .wiki-sidebar.open { left: 0; box-shadow: 4px 0 12px var(--shadow); }
  .sidebar-toggle { left: 8px; top: 72px; width: 36px; height: 36px; font-size: 18px; border-radius: 4px; z-index: 600; }
  .sidebar-toggle.on { left: 268px; }
  .wiki-main { margin-left: 0 !important; }
}
@media screen and (max-width: 768px) {
  .wiki-main { margin-right: 0 !important; }
  .markdown-section { padding: 24px 20px 60px !important; margin-right: 0; }
  .markdown-section h1 { font-size: 24px; }
  .markdown-section h2 { font-size: 20px; }
  .markdown-section p { font-size: 15.5px; }
  .app-nav { gap: 8px; padding: 0 12px; height: 64px; flex-wrap: nowrap; }
  .app-nav .nav-brand { font-size: 16px; gap: 6px; letter-spacing: 1px; }
  .app-nav .nav-logo { width: 32px; height: 32px; }
  .search-box { margin-left: auto; }
  .nav-search { width: 150px; padding: 7px 10px; font-size: 13px; }
  .theme-toggle { width: 36px; height: 36px; font-size: 16px; }
  .back-to-top { bottom: 70px; right: 20px; width: 40px; height: 40px; font-size: 18px; }
  .pdf-embed { display: none; }  /* 手机浏览器不支持内嵌 PDF，用链接代替 */
}
@media print {
  .app-nav, .wiki-sidebar, .toc-sidebar, .toc-toggle, .toc-overlay, .back-to-top, body::before { display: none !important; }
  .markdown-section { max-width: 100%; padding: 20px !important; margin: 0 !important; }
  .wiki-main { margin-left: 0 !important; }
  .content { padding-top: 0 !important; }
  body { background: var(--color-surface); }
}

/* 侧边栏平滑过渡（追加） */
/* 折叠时正文保持原位：侧栏是 fixed 定位，折叠后视觉消失但不占文档流，
   wiki-main 的 margin-left 保持 240px 不变，正文位置纹丝不动 */
.wiki-main { transition: margin-left 0.3s ease; }
.content.sidebar-collapsed .wiki-main { margin-left: 240px; }
.content.sidebar-collapsed .sidebar-toggle { left: 0; }

/* 客户端页面切换 */
#page-content.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

#page-content {
  min-height: 320px;
  transition: opacity 0.15s ease;
}

.router-status {
  position: fixed;
  top: 72px;
  right: 18px;
  z-index: 420;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink-faint);
  font-size: 12px;
  box-shadow: 0 2px 8px var(--shadow);
}

.page-progress {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 430;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.page-progress.active {
  opacity: 1;
}

.page-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.16s ease;
}

@media print {
  .router-status,
  .page-progress { display: none !important; }
}
