:root{
  --bg:#eef1f5;
  --panel:#fff;
  --line:#dfe5ec;
  --text:#1b2430;
  --text-2:#5a6779;
  --accent:#1f6feb;
  --danger:#d13438;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;background:var(--bg);color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  font-size:14px;
  -webkit-user-select:none;user-select:none;          /* 禁止选中复制 */
  -webkit-touch-callout:none;
  -webkit-tap-highlight-color:transparent;
}

/* ---------- 顶部状态条 ---------- */
.topbar{
  position:fixed;top:0;left:0;right:0;height:44px;z-index:20;
  background:#fff;border-bottom:1px solid var(--line);
  display:flex;align-items:center;justify-content:space-between;padding:0 16px;
  font-size:12.5px;color:var(--text-2);
}
.tb-left{display:flex;align-items:center;gap:8px;min-width:0}
.tb-dot{width:7px;height:7px;border-radius:50%;background:#c2ccd9;flex:0 0 7px}
.tb-dot.ok{background:#0f9960}
.tb-dot.bad{background:var(--danger)}
.tb-name{max-width:52vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;color:var(--text)}
.tb-right{display:flex;align-items:center;gap:10px}
.tb-tag{
  font-family:"JetBrains Mono",Consolas,monospace;font-size:11.5px;
  background:#f3f6fa;border:1px solid var(--line);border-radius:20px;padding:3px 9px;
}
.tb-lock{font-size:11.5px;color:#8c98a8}
@media (max-width:720px){.tb-lock{display:none}}

/* ---------- 阅读区 ---------- */
.stage{
  padding:60px 20px 60px;display:flex;flex-direction:column;align-items:center;gap:18px;
  min-height:100%;overflow-x:auto;   /* 放大后可横向拖动查看 */
}
/* 页面容器：居中；放大超出屏宽时仍可完整滚动到左边缘 */
.pages-wrap{
  width:max-content;min-width:100%;margin:0 auto;
  display:flex;flex-direction:column;align-items:center;gap:18px;
}
/* 缩放条 */
.zoombar{
  position:fixed;right:16px;bottom:16px;z-index:9000;
  display:flex;align-items:center;gap:6px;
  background:var(--panel);border:1px solid var(--line);border-radius:10px;
  padding:6px 8px;box-shadow:0 4px 16px rgba(17,24,39,.12);
}
.zb{
  border:1px solid var(--line);background:#fff;color:var(--text-2);
  border-radius:6px;min-width:30px;height:28px;font-size:14px;line-height:1;cursor:pointer;
}
.zb:hover{background:#f3f6fa}
.zb-val{min-width:46px;text-align:center;font-size:12.5px;color:var(--text-2)}
.zb-fit{font-size:12px;padding:0 8px}
@media (max-width:520px){.zoombar{right:10px;bottom:10px}}
.page{
  position:relative;background:#fff;border-radius:4px;overflow:hidden;
  box-shadow:0 1px 3px rgba(16,24,40,.10),0 8px 24px rgba(16,24,40,.06);
}
.page canvas{
  display:block;pointer-events:none;                  /* 无法右键/拖拽另存 */
  -webkit-user-drag:none;user-drag:none;
  -webkit-user-select:none;user-select:none;
}
.page .wm{
  position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:6;
}
.page .wm .mk{
  position:absolute;transform:translate(-50%,-50%);
  width:340px;height:220px;
  background-repeat:no-repeat;background-position:center;background-size:contain;
}

/* ---------- 状态 / 403 ---------- */
.state{
  margin-top:14vh;display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center;padding:0 20px;
}
.spinner{
  width:26px;height:26px;border:2.5px solid #d7dee7;border-top-color:var(--accent);
  border-radius:50%;animation:spin .8s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}
.state-text{font-size:13.5px;color:var(--text-2)}
.state.bad .spinner{display:none}
.state-code{
  font-family:"JetBrains Mono",Consolas,monospace;font-size:44px;font-weight:700;color:var(--danger);
  letter-spacing:2px;line-height:1;
}
.state-title{font-size:16px;font-weight:650}
.state-desc{font-size:12.5px;color:var(--text-2);max-width:420px;line-height:1.7}
.state-note{margin-top:6px;font-size:11.5px;color:#9aa6b4}

/* ---------- 全局水印 ---------- */
.wm-global{
  position:fixed;inset:0;z-index:15;pointer-events:none;background-repeat:repeat;
}

/* ---------- 反调试遮罩 ---------- */
.devmask{
  position:fixed;inset:0;z-index:9999;background:#eef1f5;
  display:flex;align-items:center;justify-content:center;font-size:13.5px;color:var(--text-2);
}

/* ---------- 防截屏遮蔽层（检测到截屏/离开时盖住正文） ---------- */
.shield{
  position:fixed;inset:0;z-index:10000;background:var(--bg);
  display:flex;align-items:center;justify-content:center;padding:24px;
}
.shield-box{
  max-width:420px;text-align:center;color:var(--text-2);
  background:var(--panel);border:1px solid var(--line);border-radius:12px;
  padding:26px 24px;box-shadow:0 8px 30px rgba(17,24,39,.08);
}
.shield-title{font-size:16px;font-weight:600;color:var(--text);margin-bottom:10px}
.shield-desc{font-size:13px;line-height:1.7;margin-bottom:18px}
.shield-btn{
  border:0;border-radius:8px;padding:9px 22px;font-size:13.5px;cursor:pointer;
  background:var(--accent);color:#fff;
}
.shield-btn:hover{filter:brightness(1.06)}
.shield-note{margin-top:14px;font-size:11.5px;color:#9aa5b1}

/* ---------- 打印：一律禁止 ---------- */
@media print{
  body{background:#fff}
  body *{visibility:hidden !important}
  body::after{
    content:"该文档已被禁止打印";visibility:visible !important;
    position:fixed;inset:0;display:flex;align-items:center;justify-content:center;
    font-size:18px;color:#8c98a8;background:#fff;
  }
}
