#tool-body {
  --po-card-bg: #ffffff;
  --po-text: #333;
  --po-sub: #8a8f99;
  --po-border: #e6e8eb;
  --po-hover: #f5f8ff;
  --po-primary: #3a7bfd;
  --po-ok: #16b779;
  --po-warn: #f5a623;
  --po-err: #e5484d;
  max-width: 900px;
  margin: 0 auto;
  padding-top: 16px;
  padding-bottom: 40px;
  color: var(--po-text);
}
.theme-dark-mode #tool-body {
  --po-card-bg: #2d2d2d;
  --po-text: #e8e8e8;
  --po-sub: #9a9a9a;
  --po-border: #3a3a3a;
  --po-hover: #383838;
}
#tool-body .po-card {
  background: var(--po-card-bg);
  border: 1px solid var(--po-border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
}
.theme-dark-mode #tool-body .po-card {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
#tool-body .po-tips {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--po-sub);
  margin-bottom: 14px;
  line-height: 1.6;
}
#tool-body .po-tips .fa { margin-right: 5px; color: var(--po-ok); }
#tool-body .po-section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
#tool-body .po-section-title .fa { margin-right: 6px; color: var(--po-primary); }
#tool-body .po-upload {
  border: 2px dashed var(--po-border);
  border-radius: 10px;
  background: var(--po-card-bg);
  padding: 30px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  margin-bottom: 14px;
}
#tool-body .po-upload:hover,
#tool-body .po-upload.po-dragover {
  border-color: var(--po-primary);
  background: var(--po-hover);
}
#tool-body .po-upload .fa {
  font-size: 34px;
  color: var(--po-primary);
  margin-bottom: 8px;
}
#tool-body .po-upload p { margin: 0; font-size: 14px; color: var(--po-sub); }
#tool-body .po-file {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
#tool-body .po-file .po-ficon { color: var(--po-err); font-size: 22px; flex-shrink: 0; }
#tool-body .po-file .po-finfo { flex: 1; min-width: 160px; }
#tool-body .po-file .po-fname { font-size: 14px; word-break: break-all; }
#tool-body .po-file .po-fsize { font-size: 12px; color: var(--po-sub); margin-top: 2px; }
#tool-body .po-file .po-fops { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
#tool-body .po-file .po-fops .layui-btn { margin: 0; }
#tool-body .po-hidden { display: none !important; }
#tool-body .po-list-hint {
  font-size: 12px;
  color: var(--po-sub);
  line-height: 1.6;
  margin: -2px 0 10px;
}
#tool-body .po-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
#tool-body .po-shortcuts .layui-btn { margin: 0; }
#tool-body .po-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}
#tool-body .po-page {
  position: relative;
  border: 2px solid var(--po-border);
  border-radius: 8px;
  padding: 8px;
  background: var(--po-card-bg);
  cursor: move;
  user-select: none;
}
#tool-body .po-page.po-on {
  border-color: var(--po-primary);
  background: var(--po-hover);
}
#tool-body .po-page.po-before { box-shadow: inset 3px 0 0 var(--po-primary); }
#tool-body .po-page.po-after { box-shadow: inset -3px 0 0 var(--po-primary); }
#tool-body .po-page.po-dragging { opacity: .45; cursor: move; }
@media (hover: hover) and (pointer: fine) {
  #tool-body .po-page:hover { background: var(--po-hover); }
}
#tool-body .po-ops,
#tool-body .po-ops .layui-btn { cursor: pointer; }
#tool-body .po-thumb {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
}
.theme-dark-mode #tool-body .po-thumb { background: #f4f4f4; }
#tool-body .po-thumb img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
}
#tool-body .po-ph {
  color: var(--po-sub);
  font-size: 12px;
}
#tool-body .po-meta {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  margin: 6px 0 4px;
  color: var(--po-sub);
}
#tool-body .po-page.po-on .po-no { color: var(--po-primary); font-weight: 600; }
#tool-body .po-orig {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#tool-body .po-ops {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
}
#tool-body .po-ops .layui-btn {
  margin: 0;
  flex: 1;
  min-width: 0;
  padding: 0;
}
#tool-body .po-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12px;
  color: var(--po-sub);
}
#tool-body .po-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: center;
}
#tool-body .po-progress { font-size: 13px; color: var(--po-sub); }
#tool-body .po-result { display: none; }
#tool-body .po-result.po-show { display: block; }
#tool-body .po-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
#tool-body .po-result-meta { font-size: 13px; color: var(--po-sub); margin-top: 4px; }
@media screen and (max-width: 640px) {
  #tool-body .po-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  #tool-body .po-thumb { height: 128px; }
}