* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: #e9ebef; color: #1b2333;
  font: 14px/1.5 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 16px;
  padding: 0 16px; background: #fff; border-bottom: 1px solid #d5d9e0; }
nav { display: flex; max-width: 100%; overflow-x: auto; }
nav a { padding: 13px 14px 11px; white-space: nowrap; color: #4a5468; text-decoration: none; border-bottom: 3px solid transparent; }
nav a[aria-current] { color: #1f3864; font-weight: 600; border-bottom-color: #1f3864; }
#tools, #pdfTools { display: flex; align-items: center; gap: 6px; }
#tools { padding: 7px 0; margin-left: auto; }
button, .btn { height: 32px; min-width: 32px; padding: 0 10px; border: 1px solid #c6ccd6; border-radius: 5px; background: #fff;
  color: inherit; font: inherit; line-height: 30px; white-space: nowrap; text-decoration: none; cursor: pointer; }
button:hover, .btn:hover { background: #f1f3f7; }
.pages { white-space: nowrap; }
#pageNo { width: 40px; height: 32px; text-align: center; border: 1px solid #c6ccd6; border-radius: 5px; font: inherit; }
main { flex: 1; display: flex; min-height: 0; }
#stage { flex: 1; position: relative; min-width: 0; }
#pdfBox { position: absolute; inset: 0; overflow: auto; }
#excelBox { position: absolute; inset: 0; background: #fff; }
#status { position: absolute; top: 24px; left: 16px; right: 16px; margin: 0 auto; width: fit-content; padding: 8px 16px;
  background: #fff; border-radius: 6px; box-shadow: 0 2px 10px #0002; z-index: 20; }
@media (max-width: 700px) {
  header { padding: 0 8px; }
  nav a { padding-inline: 9px; font-size: 13px; }
  #tools { width: 100%; justify-content: space-between; gap: 4px; }
  #pdfTools { gap: 4px; }
  button, .btn { padding: 0 7px; }
  #fit { display: none; }
  #download { margin-left: auto; }
}
