* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #e8eaee;
  color: #1f2329;
}

.hidden { display: none !important; }

.loading {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #8a919c;
}

/* 密码页 */
.pw-wrap {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #f4f6f9, #e6e9ef); padding: 20px;
}
.pw-card {
  background: #fff; width: 380px; max-width: 100%; border-radius: 14px;
  padding: 40px 32px; text-align: center; box-shadow: 0 12px 40px rgba(31,45,80,.12);
}
.pw-lock { font-size: 40px; margin-bottom: 12px; }
.pw-card h1 { font-size: 20px; margin-bottom: 6px; }
.pw-sub { font-size: 13px; color: #8a919c; margin-bottom: 24px; }
.pw-card input {
  width: 100%; height: 44px; border: 1px solid #d9dde4; border-radius: 8px;
  padding: 0 14px; font-size: 15px; outline: none; text-align: center; letter-spacing: 2px;
}
.pw-card input:focus { border-color: #4f7cff; }
.pw-error { color: #e5484d; font-size: 13px; min-height: 20px; margin-top: 10px; }
.pw-card button {
  width: 100%; height: 44px; border: none; border-radius: 8px; margin-top: 8px;
  background: #4f7cff; color: #fff; font-size: 15px; cursor: pointer;
}
.pw-card button:hover { background: #3f6af0; }

/* 查看页 */
.viewer-wrap { display: flex; flex-direction: column; height: 100vh; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px; background: #fff; border-bottom: 1px solid #e3e6ec; gap: 12px;
}
.tb-title-row { display: flex; align-items: center; gap: 10px; }
.tb-title { font-size: 16px; font-weight: 600; }
.tb-meta { font-size: 12px; color: #8a919c; margin-top: 2px; }
.back-home {
  border: 1px solid #d9dde4; border-radius: 6px; background: #fff; color: #4f7cff;
  font-size: 12px; padding: 3px 10px; cursor: pointer; white-space: nowrap;
}
.back-home:hover { background: #eef2ff; }
.tb-right { display: flex; align-items: center; gap: 12px; }
.tb-code {
  font-size: 12px; color: #4f7cff; background: #eef2ff; padding: 4px 10px;
  border-radius: 6px; white-space: nowrap;
}
.zoom { display: flex; gap: 6px; }
.zoom button {
  min-width: 34px; height: 32px; border: 1px solid #d9dde4; border-radius: 6px;
  background: #fff; cursor: pointer; font-size: 15px; color: #333;
}
.zoom button:hover { background: #f2f4f8; }

.stage { flex: 1; overflow: auto; padding: 16px; }
.tiles {
  margin: 0 auto; display: flex; flex-direction: column; gap: 0;
  width: 100%; max-width: 860px;
}
.page { position: relative; width: 100%; }
.tile {
  display: block; width: 100%; background: #fff;
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
  -webkit-touch-callout: none; pointer-events: auto;
}
.hotspot { position: absolute; display: block; cursor: pointer; }

.bottombar {
  text-align: center; padding: 9px; font-size: 12px; color: #8a919c;
  background: #fff; border-top: 1px solid #e3e6ec;
}

/* 手机端适配 */
@media (max-width: 640px) {
  .topbar { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; }
  .tb-right { justify-content: space-between; }
  .tb-code { font-size: 11px; }
  .stage { padding: 10px; }
}
