:root {
  --bg: #efe6d8;
  --bg-soft: #eadfcf;
  --panel: #fff8ec;
  --panel-2: #faefdf;
  --paper: #fffcf6;
  --card: #ffffff;
  --title-1: #fffcf5;
  --title-2: #f8eddd;
  --title-border: #d9c4a6;
  --footer-1: #faefde;
  --footer-2: #f4e7d3;
  --ink: #27231f;
  --muted: #75695b;
  --line: #e2d6c5;
  --accent: #a85a2a;
  --accent-2: #6b3418;
  --link: #6b3418;
  --link-hover: #a85a2a;
  --intro-line: #d8c6af;
  --btn-bg: #fff8ec;
  --btn-border: #d5b998;
  --btn-arrow: #744620;
  --shadow: 0 10px 28px rgba(33, 21, 11, 0.1);
  --reading-size: 23px;
  --page-max: 1080px;
  --page-gutter: 15px;
  --glass-bg: rgba(255, 255, 255, 0.38);
  --glass-strong: rgba(255, 255, 255, 0.52);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-size:12px;
}

body.read-v3 {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  color: var(--ink);
  font-family: "微软雅黑",Microsoft Yahei,simsun,arial,sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 56px;
}

.top-float,
.view_top,
#ksw_pagebody,
.view_t,
.view_info,
.view_content,
.view_page,
.view_tips,
.footer {
  margin-left: auto;
  margin-right: auto;
}

.view_top,
#ksw_pagebody,
.view_t,
.view_info,
.view_content,
.view_page,
.view_tips,
.footer {
  width: min(var(--page-max), calc(100% - (var(--page-gutter) * 2)));
}

a {
  color: var(--link);
  text-decoration: none !important;
}

a:hover {
  color: var(--link-hover);
  text-decoration: none !important;
}

a:visited,
a:focus,
a:active {
  text-decoration: none !important;
}

.top-float {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8000;
  padding: 0;
  width: 100%;
}

.top-float-inner {
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(145deg, var(--glass-strong), var(--glass-bg));
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  box-shadow: 0 6px 16px rgba(33, 21, 11, 0.1);
  text-align: center;
}

.top-float-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
  flex: 1;
  scrollbar-width: thin;
}

.top-float-nav a,
.top-float-auth a {
  display: inline-block;
  padding: 6px 7px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--link);
}

.top-float-nav a:hover,
.top-float-auth a:hover {
  color: var(--link-hover);
  background: rgba(255, 255, 255, 0.75);
}

.top-float-auth {
  flex: 0 0 auto;
  text-align: center;
}

#ksw_pagebody {
  margin-top: 12px;
}

.view_top {
  position: relative;
  z-index: 120;
  margin-top: 10px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--glass-strong), var(--glass-bg));
  backdrop-filter: blur(10px) saturate(115%);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
  box-shadow: var(--shadow);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.view_top .l {
  flex: 1 1 auto;
  min-width: 0;
}

.view_top .r {
  flex: 0 1 48%;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

.view_top .r span {
  display: block;
  margin-top: 4px;
  color: color-mix(in srgb, var(--muted) 72%, #fff 28%);
}

.sk_gb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 12px;
  box-shadow: 0 6px 18px rgba(33, 21, 11, 0.06);
}

.read-v3-toggle {
  display: none;
  border: 1px solid #d8bc98;
  border-radius: 10px;
  background: #fff6e7;
  color: #68361a;
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.duset,
#yanse,
.sk_wz {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.sk_wz,
#yanse {
  flex: 0 1 auto;
}

.duset {
  margin-bottom: 8px;
}

#yanse {
  position: relative;
  z-index: 300;
}

#skbglist,
#fonts {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

select#ffamily {
  border: 1px solid #d4c7b6;
  background: #fff;
  border-radius: 8px;
  padding: 2px 8px;
  color: #4d4136;
  font-size: 13px;
  cursor: pointer;
}

#skbglist .c {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.25);
}

.c1 { background: #cde4ff; }
.c2 { background: #d8d8d8; }
.c3 { background: #cfe7d4; }
.c4 { background: #f2e7ab; }
.c5 { background: #f8f8f8; }
.c6 { background: #f4ced6; }
.c7 { background: #17171b; border-color: rgba(255, 255, 255, 0.35) !important; }

#fonts .s {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid #d8cab7;
  border-radius: 8px;
  margin-right: 2px;
  color: #6f4f34;
}

#fonts .s.is-active {
  background: #fbe8ce;
  border-color: #d8a366;
  color: #80410f;
}

#x_menu,
#scrolltime,
.view_page select {
  border: 1px solid #d4c7b6;
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  color: #4d4136;
}

#x_menu {
  width: 62px;
  text-align: center;
}

#ys_menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid #dacdbb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(34, 22, 12, 0.12);
  z-index: 9999;
}

#ys_menu li {
  margin: 0;
  padding: 2px 0;
}

#ys_menu a {
  display: block;
  padding: 2px 8px;
  border-radius: 6px;
  color: #3f3f3f;
}

#ys_menu a:hover {
  background: #f5efe6;
}

#ys_menu #red a { color: #8c1f19; }
#ys_menu #lv a { color: #2c6b33; }
#ys_menu #blue a { color: #174f8d; }
#ys_menu #zong a { color: #6e4a2f; }
#ys_menu #hei a { color: #27231f; }

.view_t {
  position: relative;
  z-index: 10;
  margin-top: 10px;
  padding: 16px 13px 12px;
  border-radius: 14px;
  border: 1px solid var(--title-border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--title-1) 74%, transparent) 0%, color-mix(in srgb, var(--title-2) 70%, transparent) 100%);
  backdrop-filter: blur(8px) saturate(112%);
  -webkit-backdrop-filter: blur(8px) saturate(112%);
  box-shadow: var(--shadow);
  text-align: center;
}

.view_t h1 {
  margin: 0;
  font-family: "Hiragino Rounded GB", "YouYuan", "Microsoft YaHei", sans-serif;
  font-size: clamp(16px, 2.1vw, 22px);
  line-height: 1.42;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.view_t .view_intro {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed var(--intro-line);
  font-size: 13px;
  line-height: 1.82;
  font-weight: 400;
  color: var(--muted);
  text-align: center;
}

.view_info,
.view_page,
.view_tips,
.footer {
  margin-top: 10px;
  padding: 10px 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  backdrop-filter: blur(8px) saturate(108%);
  -webkit-backdrop-filter: blur(8px) saturate(108%);
  color: var(--muted);
}

.view_info {
  font-size: 13px;
}

center > table {
  display: none;
}

.view_content {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  backdrop-filter: blur(9px) saturate(110%);
  -webkit-backdrop-filter: blur(9px) saturate(110%);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow);
}

#view_content_txt {
  font-size: var(--reading-size);
  font-family: var(--reading-family, inherit);
  line-height: 1.76;
  letter-spacing: 0.01em;
  word-break: break-word;
}

#view_content_txt p {
  margin: 0 0 1.2em;
  text-indent: 2.4em;
}

#view_content_txt p:first-child {
  text-indent: 0;
}

.view_page {
  line-height: 1.88;
  font-size: 16px;
  text-align: center;
}

.view_tips {
  text-align: center;
  font-size: 13px;
  color: color-mix(in srgb, var(--muted) 72%, #fff 28%);
  border: 1px dashed var(--intro-line);
}

.footer {
  margin-bottom: 18px;
  background: linear-gradient(180deg, var(--footer-1) 0%, var(--footer-2) 100%);
}

.foot_nav,
.copyright {
  font-size: 14px;
  text-align: center;
}

.copyright {
  line-height: 1.8;
}

#btn.btn {
  position: fixed;
  right: max(8px, calc((100vw - var(--page-max)) / 2 - 52px));
  bottom: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--btn-border);
  border-radius: 50%;
  background: var(--btn-bg);
  box-shadow: 0 8px 20px rgba(33, 21, 11, 0.18);
  text-indent: -9999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, background-color 0.2s, border-color 0.2s;
}

#btn.btn:before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: 50%;
  top: 52%;
  border-left: 2px solid var(--btn-arrow);
  border-top: 2px solid var(--btn-arrow);
  transform: translate(-50%, -50%) rotate(45deg);
}

#btn.btn.is-visible {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 900px) {
  .view_top {
    flex-direction: column;
    align-items: flex-start;
  }

  .view_top .r {
    width: 100%;
    flex: 1 1 auto;
  }

  #view_content_txt {
    line-height: 1.76;
  }

  #btn.btn {
    right: var(--page-gutter);
  }
}

@media (max-width: 680px) {
  :root {
    --page-gutter: 11px;
  }

  .read-v3-toggle {
    display: inline-block;
  }

  .sk_gb.is-collapsed .duset,
  .sk_gb.is-collapsed #yanse {
    display: none;
  }

  #view_content_txt {
    line-height: 1.76;
  }

  #view_content_txt p {
}

#view_content_txt p:first-child {
  text-indent: 0;
  text-indent: 2.4em;
  }

  .top-float {
    top: 0;
    padding: 0 3px;
  }

  .top-float-inner {
    padding: 10px 6px;
  }

  .top-float-nav a,
  .top-float-auth a {
    font-size: 12px;
    padding: 3px 7px;
  }


  .top-float-nav[data-mobile-short="1"] {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .read-v3-mobile-btn {
    display: inline-block;
    min-width: 64px;
    text-align: center;
    font-size: 13px !important;
    padding: 5px 10px !important;
    border: 1px solid rgba(107, 52, 24, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.76);
  }

  .read-v3-mobile-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 9005;
    width: 100%;
    max-height: 58vh;
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fffaf1;
    background: color-mix(in srgb, var(--paper) 88%, #fff 12%);
    box-shadow: 0 10px 24px rgba(33, 21, 11, 0.16);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .read-v3-mobile-menu a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    background: #f7ecdc;
    background: color-mix(in srgb, var(--panel-2) 74%, #fff 26%);
    border: 1px solid color-mix(in srgb, var(--line) 82%, var(--btn-border) 18%);
  }

  .read-v3-mobile-menu a + a {
    margin-top: 0;
  }
}

/* 顶部导航全局隐藏横向滚动条（功能保留，仅去除可视滚动条） */
.top-float-nav { scrollbar-width: none; -ms-overflow-style: none; }
.top-float-nav::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* 顶部 nav 允许换行（窄屏自动两行），不溢出 */
/* .top-float-nav { flex-wrap: wrap; row-gap: 6px; justify-content: center; } */
/* 视口 <1184 时返回顶部按钮会落入正文区域，直接隐藏 */
@media (max-width: 1183px) {
  #btn.btn { display: none !important; }
}

/* mobile 模式样式不再受 viewport 限制（现在按"是否装得下"触发） */
.top-float-nav[data-mobile-short="1"] {
  width: 100%;
  justify-content: space-between;
  gap: 10px;
}
.read-v3-mobile-btn {
  display: inline-block;
  min-width: 64px;
  text-align: center;
  font-size: 13px !important;
  padding: 5px 10px !important;
  border: 1px solid rgba(107, 52, 24, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}
.read-v3-mobile-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 9005;
  width: 100%;
  max-height: 58vh;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffaf1;
  background: color-mix(in srgb, var(--paper) 88%, #fff 12%);
  box-shadow: 0 10px 24px rgba(33, 21, 11, 0.16);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.read-v3-mobile-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  background: #f7ecdc;
  background: color-mix(in srgb, var(--panel-2) 74%, #fff 26%);
  border: 1px solid color-mix(in srgb, var(--line) 82%, var(--btn-border) 18%);
}
.read-v3-mobile-menu a + a { margin-top: 0; }

/* 标题（view_t）、正文（view_content）、翻页（view_page）合并成一个卡片：
   去掉中间间距、内侧圆角和接缝处边框，统一外框和背景（三块都用正文的 paper 色）；阴影用 clip-path 裁掉接缝处，只在整体外沿显示 */
.view_t,
.view_content,
.view_page {
  border-color: var(--line);
  box-shadow: var(--shadow);
  background: var(--paper);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.view_t {
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  clip-path: inset(-40px -40px 1px -40px);
}
.view_content {
  margin-top: -2px; /* 接缝重叠 2px，且相邻块的 clip-path 边缘内缩 1px：接缝落在小数像素时，抗锯齿行落在纯色背景上，不会把阴影漏成细线 */
  border-top: 0;
  border-bottom: 0;
  border-radius: 0;
  clip-path: inset(0 -40px);
}
.view_page {
  margin-top: -2px;
  padding: 14px 16px 16px;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  clip-path: inset(1px -40px -40px -40px);
}
.view_page .view_tips {
  width: auto;
  margin: 12px 0 0;
  background: var(--paper);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* 页脚：不单独设背景（透出页面主题底色），只保留顶边实线 */
.footer {
  margin-top: 18px;
  padding: 14px 9px 4px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

/* 顶部浮动导航：跟随阅读主题色的立体渐变（上亮下深 + 顶部高光 + 底部投影），颜色取自 read.js 主题变量 --panel/--panel-2 */
.top-float-inner {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--panel) 55%, #fff 45%) 0%,
    var(--panel) 48%,
    color-mix(in srgb, var(--panel-2) 55%, var(--bg-soft) 45%) 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, #000 18%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.04),
    0 2px 4px rgba(33, 21, 11, 0.08),
    0 8px 22px rgba(33, 21, 11, 0.14);
}
html[data-read-theme="7"] .top-float-inner {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--panel) 86%, #fff 14%) 0%,
    var(--panel) 50%,
    color-mix(in srgb, var(--panel-2) 80%, #000 20%) 100%);
  border-bottom-color: #000;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 8px 22px rgba(0, 0, 0, 0.45);
}

/* 顶部浮动栏立体感（加强版基础上回调约一半）：渐变跨度加大（顶部近白、底部压暗）、底边加深、内阴影和更深的投影；按钮做成凸起效果 */
.top-float-inner {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--panel) 42%, #fff 58%) 0%,
    color-mix(in srgb, var(--panel) 85%, #fff 15%) 40%,
    var(--panel-2) 70%,
    color-mix(in srgb, var(--bg-soft) 93%, #000 7%) 100%);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, #000 30%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -2px 4px rgba(0, 0, 0, 0.05),
    0 2px 3px rgba(33, 21, 11, 0.12),
    0 10px 24px rgba(33, 21, 11, 0.14);
}
.read-v3-mobile-btn,
.top-float-nav a,
.top-float-auth a {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.read-v3-mobile-btn {
  background: linear-gradient(180deg, #fff 0%, color-mix(in srgb, var(--panel) 70%, #fff 30%) 100%) !important;
  border-color: color-mix(in srgb, var(--line) 80%, #000 20%) !important;
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(0, 0, 0, 0.10);
}
.read-v3-mobile-btn:active {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}
html[data-read-theme="7"] .top-float-inner {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--panel) 75%, #fff 25%) 0%,
    color-mix(in srgb, var(--panel) 90%, #fff 10%) 35%,
    var(--panel-2) 65%,
    color-mix(in srgb, var(--panel-2) 75%, #000 25%) 100%);
  border-bottom-color: #000;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    inset 0 -2px 4px rgba(0, 0, 0, 0.22),
    0 2px 3px rgba(0, 0, 0, 0.4),
    0 8px 22px rgba(0, 0, 0, 0.48);
}
html[data-read-theme="7"] .read-v3-mobile-btn,
html[data-read-theme="7"] .top-float-nav a,
html[data-read-theme="7"] .top-float-auth a {
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
}
html[data-read-theme="7"] .read-v3-mobile-btn {
  background: linear-gradient(180deg, #34343e 0%, #23232b 100%) !important;
  border-color: #0c0c10 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* 阅读设置栏 .sk_gb：去掉内层边框、背景和阴影（外层 .view_top 卡片保留） */
.sk_gb {
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* 阅读设置栏 .view_top 并入下方卡片（view_t/view_content/view_page）成为卡片顶部：
   背景同正文 paper 色、去掉底边和下圆角、与 view_t 重叠 2px。
   view_top 的 z-index 高于 view_t（字体颜色下拉 #ys_menu 要盖住标题），不能用 clip-path 裁阴影（会裁掉下拉），
   改用只向上和两侧扩散的阴影，不压到下方标题上 */
.view_top {
  margin-bottom: 0;
  border-color: var(--line);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: var(--paper);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 -6px 16px -10px rgba(33, 21, 11, 0.18);
}
.view_t {
  margin-top: -2px;
  border-top: 0;
  border-radius: 0;
}
html[data-read-theme="7"] .view_top {
  box-shadow: 0 -6px 16px -10px rgba(0, 0, 0, 0.5);
}

/* 字号滑块（read.js initSizeSlider 把 #fonts 的档位链接替换成 range）：小 A —— 刻度轨道 —— 大 A + 当前像素 */
#fonts.fs-slider { gap: 6px; }
.fs-a { color: var(--muted); font-weight: 700; line-height: 1; user-select: none; }
.fs-a-sm { font-size: 11px; }
.fs-a-lg { font-size: 17px; }
#fs-val {
  min-width: 34px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--link);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
#fs-val::after { content: "px"; font-weight: 400; color: var(--muted); margin-left: 1px; }
.fs-track {
  position: relative;
  display: inline-block;
  width: 160px;
  height: 22px;
}
/* 刻度：每 2px 一格（16~36 共 11 条），左右各让出半个滑块宽度与滑块中心对齐 */
.fs-track::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 7px; /* 比左侧少 1px，给最后一条刻度留出线宽 */
  bottom: 0;
  height: 5px;
  background: linear-gradient(to right, var(--muted) 0 1px, transparent 1px) 0 0 / calc((100% - 1px) / 10) 100% repeat-x;
  opacity: .45;
  pointer-events: none;
}
#fs-range {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  left: 0;
  top: 2px;
  width: 100%;
  height: 14px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  --fs-p: 35%;
}
#fs-range:focus { outline: none; }
#fs-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--link) 0 var(--fs-p), var(--line) var(--fs-p) 100%);
}
#fs-range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line); }
#fs-range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--link); }
#fs-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid var(--link);
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .12s;
}
#fs-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--link);
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
#fs-range:hover::-webkit-slider-thumb,
#fs-range:focus-visible::-webkit-slider-thumb { transform: scale(1.15); }
#fs-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 25%, transparent); }
@media (max-width: 680px) {
  .fs-track { width: 130px; }
}

/* 双击滚屏速度：按钮 + 弹出竖向滑块（read.js initAutoScroll 生成；上快下慢 1~10 档）。
   滑块沿用 id=scrolltime，选择器写成 html .sp-ctl .sp-rail input#scrolltime 以压过旧的 #scrolltime 框样式和 read.js 夜间样式 */
.sp-ctl { position: relative; display: inline-block; vertical-align: middle; }
.sp-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding: 0 9px 0 7px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, #000 20%);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, color-mix(in srgb, var(--panel) 70%, #fff 30%) 100%);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(0, 0, 0, 0.10);
  color: var(--link);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.sp-btn[aria-expanded="true"] { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12); }
.sp-ico { color: var(--muted); font-size: 14px; line-height: 1; }
.sp-val { min-width: 1.2em; text-align: center; font-variant-numeric: tabular-nums; }
.sp-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(33, 21, 11, 0.18);
}
.sp-pop[hidden] { display: none; }
.sp-pop::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: var(--paper);
  transform: rotate(45deg);
}
.sp-lab { font-size: 12px; color: var(--muted); line-height: 1; user-select: none; }
.sp-rail { position: relative; display: block; width: 34px; height: 130px; }
/* 刻度：竖向 10 条（1~10 档），上下各让出半个滑块与滑块中心对齐 */
.sp-rail::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 7px;
  right: 2px;
  width: 6px;
  background: linear-gradient(to bottom, var(--muted) 0 1px, transparent 1px) 0 0 / 100% calc((100% - 1px) / 9) repeat-y;
  opacity: .45;
  pointer-events: none;
}
html .sp-ctl .sp-rail input#scrolltime {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 130px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  transform: translate(-50%, -50%) rotate(-90deg); /* 横向 range 逆时针转 90°：最大值在上 */
  cursor: pointer;
  --sp-p: 44%;
}
html .sp-ctl .sp-rail input#scrolltime:focus { outline: none; }
html .sp-ctl .sp-rail input#scrolltime::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--link) 0 var(--sp-p), var(--line) var(--sp-p) 100%);
}
html .sp-ctl .sp-rail input#scrolltime::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line); }
html .sp-ctl .sp-rail input#scrolltime::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--link); }
html .sp-ctl .sp-rail input#scrolltime::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid var(--link);
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
html .sp-ctl .sp-rail input#scrolltime::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--link);
  background: var(--paper);
}
html .sp-ctl .sp-rail input#scrolltime:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 25%, transparent); }
html[data-read-theme="7"] .sp-btn {
  background: linear-gradient(180deg, #34343e 0%, #23232b 100%);
  border-color: #0c0c10;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 3px rgba(0, 0, 0, 0.6);
}
html[data-read-theme="7"] .sp-pop { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55); }
