:root {
  --red: #b4232f;
  --red-dark: #8f1722;
  --red-soft: #fff1f2;
  --ink: #21242a;
  --muted: #747984;
  --line: #e5e7eb;
  --surface: #ffffff;
  --canvas: #eef0f3;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 1024px; overflow: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: white;
  background: linear-gradient(105deg, #8e1520, #bd2734);
  box-shadow: 0 2px 12px #5f101930;
  position: relative;
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 2px solid #ffffffd9; border-radius: 50%;
  font-family: "STKaiti", serif; font-size: 20px; font-weight: 700;
}
.brand div { display: grid; gap: 2px; }
.brand strong { font-size: 17px; letter-spacing: .04em; }
.brand span:last-child { font-size: 11px; opacity: .74; letter-spacing: .12em; }
.privacy { font-size: 12px; opacity: .75; }

.workspace { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - 64px); }
.sidebar {
  overflow-y: auto; padding: 20px; background: var(--surface);
  border-right: 1px solid var(--line);
}
.panel { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.panel h2 { margin: 0; font-size: 14px; font-weight: 700; }
.panel-heading, .switch-row { display: flex; align-items: center; justify-content: space-between; }
.count {
  min-width: 22px; height: 22px; padding: 0 7px; display: grid; place-items: center;
  border-radius: 99px; color: var(--red); background: var(--red-soft); font-size: 12px;
}
.hint { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 7px 0 12px; }
.seal-size-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 12px;
  color: #5c6068;
}
.seal-size-row select {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid #d8dadd;
  border-radius: 7px;
  background: white;
  color: #41454c;
  outline: none;
}

.upload-card {
  margin-top: 12px; min-height: 108px; border: 1.5px dashed #c8cbd0;
  border-radius: 10px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 5px; transition: .18s; cursor: pointer;
}
.upload-card:hover, .upload-card.dragging { border-color: var(--red); background: #fffafb; }
.upload-card input { display: none; }
.upload-card strong { font-size: 13px; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-card small { color: var(--muted); font-size: 11px; }
.upload-icon {
  padding: 4px 6px; border: 1px solid #e59098; border-radius: 4px;
  color: var(--red); background: var(--red-soft); font-size: 10px; font-weight: 800;
}
.upload-card.compact {
  min-height: 72px; padding: 10px 14px; flex-direction: row; justify-content: flex-start;
  border-style: solid; gap: 12px;
}
.upload-card.compact > span:last-child { min-width: 0; display: grid; gap: 4px; }
.seal-preview-wrap {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: #fff5f5;
  color: var(--red);
  font: 700 25px "STKaiti", serif;
}
.seal-preview-wrap img,
#sealPreview,
#signaturePreview {
  display: none;
  width: 44px;
  height: 44px;
  max-width: 44px;
  max-height: 44px;
  object-fit: contain;
}
.stamp-upload-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
}
.stamp-upload-grid .upload-card.compact {
  margin-top: 0;
  width: 100%;
  min-height: 64px;
  box-sizing: border-box;
  align-items: center;
  overflow: hidden;
}
.stamp-upload-grid .upload-card.compact strong {
  max-width: 100%;
  font-size: 12px;
}
.stamp-upload-grid .upload-card.compact small {
  font-size: 10px;
  line-height: 1.35;
  white-space: normal;
}
.signature-preview-wrap {
  background: #f4f7fb;
  color: #2f5d8c;
}
.upload-card.signature-upload:hover,
.upload-card.signature-upload.dragging {
  border-color: #5b87b5;
  background: #f7faff;
}
.upload-card.active-upload {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1px rgba(196, 64, 74, 0.18);
}
.upload-card.signature-upload.active-upload {
  border-color: #5b87b5;
  box-shadow: inset 0 0 0 1px rgba(91, 135, 181, 0.2);
}

.button-row { display: flex; gap: 8px; }
.secondary, .ghost, .primary, .fit-button, .icon-button {
  border: 0; border-radius: 7px; transition: .15s;
}
.secondary.signature-add { color: #2f5d8c; background: #eef4fb; }
.secondary.signature-add:hover:not(:disabled) { background: #e2ecf8; }
.ghost { padding: 9px 12px; color: #5d6169; background: #f3f4f6; font-size: 12px; }
.ghost:hover:not(:disabled) { background: #e9eaed; }
.danger { color: var(--red); }

.switch { position: relative; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #c9ccd1; border-radius: 99px; transition: .2s; }
.switch span::after {
  content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px;
  background: white; border-radius: 50%; box-shadow: 0 1px 4px #0003; transition: .2s;
}
.switch input:checked + span { background: var(--red); }
.switch input:checked + span::after { transform: translateX(18px); }
.controls { display: grid; gap: 13px; margin-top: 14px; transition: .2s; }
.controls.disabled { opacity: .38; pointer-events: none; }
.controls label { display: grid; grid-template-columns: 80px 1fr; align-items: center; gap: 8px; font-size: 12px; color: #5c6068; }
.controls label > span { display: flex; flex-direction: column; gap: 2px; }
.controls output { color: var(--red); font-size: 10px; }
.controls select { border: 1px solid #d8dadd; border-radius: 6px; padding: 7px; background: white; }
input[type="range"] { width: 100%; accent-color: var(--red); }

.primary {
  width: 100%; padding: 12px; color: white;
  background: linear-gradient(100deg, var(--red-dark), var(--red));
  box-shadow: 0 5px 14px #b4232f30; font-size: 13px; font-weight: 700;
}
.primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 7px 18px #b4232f45; }
.status { min-height: 18px; margin: 8px 0 0; text-align: center; color: var(--muted); font-size: 11px; }

.document-area { min-width: 0; display: grid; grid-template-rows: 52px 1fr; }
.viewer-toolbar {
  display: flex; justify-content: space-between; align-items: center; padding: 0 20px;
  background: white; border-bottom: 1px solid var(--line); color: #62666e; font-size: 12px;
}
.pager, .zoom { display: flex; align-items: center; gap: 6px; }
.zoom { flex-wrap: wrap; justify-content: flex-end; }
.fit-button.active-fit { color: var(--red); background: var(--red-soft); }
.pager input { width: 42px; padding: 4px; text-align: center; border: 1px solid #d8dadd; border-radius: 5px; }
.icon-button { width: 28px; height: 28px; background: #f1f2f4; color: #4f535a; font-size: 16px; }
.icon-button:hover:not(:disabled), .fit-button:hover:not(:disabled) { background: #e4e6e9; }
.fit-button { padding: 6px 9px; color: #5d6169; background: #f1f2f4; font-size: 11px; }
.viewer-scroll {
  overflow: auto;
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 16px;
}
.empty-state { align-self: center; margin: auto; text-align: center; color: var(--muted); }
.empty-state h1 { margin: 24px 0 8px; color: #3c4047; font-size: 20px; }
.empty-state p { margin: 0; font-size: 13px; }
.empty-document {
  margin: auto; width: 106px; height: 134px; display: grid; place-items: center;
  border: 2px solid #ccd0d6; border-radius: 8px; background: #f8f9fa;
  box-shadow: 8px 8px 0 white, 8px 8px 0 1px #d9dce0;
}
.empty-document span { color: #a7abb2; font-size: 18px; font-weight: 800; }

.page-stage {
  position: relative; line-height: 0; background: white;
  box-shadow: 0 6px 30px #22252a26; user-select: none;
}
.hidden { display: none !important; }
#pdfCanvas { display: block; }
.stamp-layer { position: absolute; inset: 0; overflow: hidden; }
.stamp-item {
  position: absolute; border: 1px dashed transparent; cursor: move; touch-action: none;
}
.stamp-item:hover, .stamp-item.selected { border-color: var(--red); background: #fff0f018; }
.stamp-item img { width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.stamp-item .resize {
  display: none; position: absolute; right: -5px; bottom: -5px; width: 10px; height: 10px;
  border: 1px solid white; border-radius: 50%; background: var(--red); cursor: nwse-resize;
}
.stamp-item.selected .resize { display: block; }
.stamp-item .remove {
  display: none; position: absolute; right: -8px; top: -9px; width: 17px; height: 17px;
  padding: 0; border: 0; border-radius: 50%; color: white; background: var(--red);
  font-size: 11px; line-height: 17px;
}
.stamp-item.selected .remove { display: block; }
.seam-preview {
  position: absolute; z-index: 3; pointer-events: none; overflow: hidden;
  outline: 1px dashed #b4232f88; background-repeat: no-repeat;
}

.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 20;
  transform: translate(-50%, 20px); padding: 10px 16px;
  border-radius: 7px; color: white; background: #272a30eF; font-size: 12px;
  opacity: 0; pointer-events: none; transition: .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-height: 720px) {
  .sidebar { padding-top: 14px; }
  .panel { padding-bottom: 14px; margin-bottom: 14px; }
  .upload-card { min-height: 85px; }
}

/* 趣多惠工具站 */
.brand-button { border: 0; color: inherit; background: transparent; padding: 0; text-align: left; }
.topbar-copy { font-size: 13px; letter-spacing: .08em; opacity: .8; }
.site-shell {
  height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
}
.tool-nav {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 10px;
  overflow-y: auto; background: #fff; border-right: 1px solid var(--line);
}
.tool-nav > p { margin: 0 10px 5px; color: #a0a4ab; font-size: 10px; letter-spacing: .15em; }
.nav-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 10px;
  border: 0; border-radius: 8px; color: #61656d; background: transparent; text-align: left;
  font-size: 13px; transition: .15s;
}
.nav-item b {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px;
  color: #858991; background: #f2f3f5; font-family: "STKaiti", serif; font-size: 13px;
}
.nav-item:hover { color: var(--red); background: #fff7f8; }
.nav-item.active { color: var(--red); background: var(--red-soft); font-weight: 700; }
.nav-item.active b { color: white; background: var(--red); }
.nav-note {
  margin-top: auto; display: grid; grid-template-columns: 26px 1fr; padding: 9px;
  border-radius: 9px; color: #646871; background: #f7f8f9;
}
.nav-note span { grid-row: 1 / 3; font-size: 17px; }
.nav-note strong { font-size: 11px; }
.nav-note small { margin-top: 3px; color: #9599a0; font-size: 9px; }

.tool-main { min-width: 0; min-height: 0; position: relative; overflow: hidden; }
.tool-view { display: none; width: 100%; height: 100%; }
.tool-view.active { display: block; }
.home-view.active {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 56px 7vw 0;
  background: linear-gradient(145deg, #fff 0%, #f8f4f4 100%);
}
.home-hero { max-width: 700px; margin-bottom: 42px; }
.eyebrow { color: var(--red); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.home-hero h1 { margin: 12px 0 12px; font-size: 38px; letter-spacing: -.04em; }
.home-hero p { margin: 0; color: var(--muted); font-size: 14px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 16px; max-width: 1050px; }
.site-footer {
  margin-top: auto;
  margin-left: -7vw;
  margin-right: -7vw;
  padding: 12px 7vw;
  text-align: center;
  color: #a7adb6;
  background: #1a1d24;
}
.site-footer-beian {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  font-size: 11px;
  line-height: 1.4;
}
.site-footer-beian a {
  color: #a7adb6;
  text-decoration: none;
}
.site-footer-beian a:hover { color: #fff; }
.beian-sep { color: #5c616a; }
.beian-police {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.beian-police img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}
.tool-card {
  min-height: 176px; padding: 22px; display: flex; flex-direction: column; align-items: flex-start;
  border: 1px solid #e7e8eb; border-radius: 13px; color: var(--ink); background: #fff;
  text-align: left; box-shadow: 0 5px 18px #282c3210; transition: .2s;
}
.tool-card:hover { transform: translateY(-3px); border-color: #d6a5a9; box-shadow: 0 10px 26px #5c20251a; }
.tool-card.featured { background: linear-gradient(145deg, #fff 30%, #fff3f4); border-color: #e9c5c8; }
.tool-icon {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 18px;
  border-radius: 10px; color: white; background: var(--red); font: 700 18px "STKaiti", serif;
}
.tool-icon.blue { background: #3579c7; }
.tool-icon.amber { background: #d48626; }
.tool-icon.green { background: #31856a; }
.tool-icon.purple { background: #7651b1; }
.tool-icon.coral { background: #c6564d; }
.tool-icon.teal { background: #277d86; }
.tool-icon.word-blue { background: #2b579a; font-family: Inter, sans-serif; }
.tool-icon.word-indigo { background: #4d63a8; }
.tool-card h2 { margin: 0 0 7px; font-size: 16px; }
.tool-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.tool-card i { margin-top: auto; color: var(--red); font-size: 11px; font-style: normal; font-weight: 600; }

.stamp-view .workspace { height: 100%; grid-template-columns: 320px 1fr; }
.view-title, .utility-header { display: flex; align-items: center; gap: 12px; }
.view-title { margin-bottom: 18px; }
.view-title h1, .view-title p, .utility-header h1, .utility-header p { margin: 0; }
.view-title h1 { font-size: 17px; }
.view-title p { margin-top: 3px; color: var(--muted); font-size: 10px; }
.back-home {
  flex: 0 0 30px; height: 30px; border: 0; border-radius: 7px;
  color: #656970; background: #f0f1f3; font-size: 15px;
}
.back-home:hover { color: var(--red); background: var(--red-soft); }

.utility-view { overflow-y: auto; padding: 42px max(40px, 8vw); background: #f5f6f8; }
.utility-view.active { display: block; }
.utility-header { max-width: 860px; margin: 0 auto 22px; }
.utility-header .tool-icon { flex: 0 0 42px; margin: 0; }
.utility-header h1 { font-size: 21px; }
.utility-header p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.utility-card {
  max-width: 860px; min-height: 420px; margin: auto; padding: 26px;
  border: 1px solid #e4e6e9; border-radius: 14px; background: #fff;
  box-shadow: 0 8px 28px #282c3210;
}
.big-drop {
  min-height: 155px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 7px; border: 1.5px dashed #c9cdd3; border-radius: 11px;
  color: var(--muted); background: #fafbfc; cursor: pointer; transition: .18s;
}
.big-drop:hover, .big-drop.dragging { border-color: var(--red); background: #fff8f8; }
.big-drop input { display: none; }
.big-drop > span {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  color: var(--red); background: var(--red-soft); font-size: 23px;
}
.big-drop strong { color: #41454c; font-size: 13px; }
.big-drop small { color: #989ca3; font-size: 10px; }
.file-list { display: grid; gap: 7px; margin-top: 16px; }
.file-row {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto;
  align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid #eceef0; border-radius: 8px; background: #fff;
}
.file-row .file-kind {
  display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 6px; color: var(--red); background: var(--red-soft); font-size: 9px; font-weight: 800;
}
.file-row .file-info { min-width: 0; display: grid; gap: 2px; }
.file-row .file-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.file-row .file-info small { color: var(--muted); font-size: 9px; }
.row-actions { display: flex; gap: 3px; }
.row-actions button {
  width: 25px; height: 25px; border: 0; border-radius: 5px;
  color: #757981; background: #f1f2f4; font-size: 11px;
}
.row-actions button:hover { color: var(--red); background: var(--red-soft); }
.form-group { display: grid; gap: 7px; margin-top: 20px; }
.form-group label { color: #555960; font-size: 11px; font-weight: 700; }
.form-group > small { color: var(--muted); font-size: 9px; }
.form-group.inline { grid-template-columns: 100px 230px; align-items: center; }
.text-input, .form-group select {
  width: 100%; padding: 9px 11px; border: 1px solid #d9dce0; border-radius: 7px;
  color: #41454c; background: white; outline: none; font-size: 12px;
}
.text-input:focus, .form-group select:focus { border-color: var(--red); box-shadow: 0 0 0 3px #b4232f12; }
.option-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; }
.utility-action { max-width: 280px; display: block; margin: 24px auto 0; }
.preset-title { margin: 22px 0 10px; color: #555960; font-size: 11px; font-weight: 700; }
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.preset-option { position: relative; cursor: pointer; }
.preset-option input { position: absolute; opacity: 0; pointer-events: none; }
.preset-option > span {
  min-height: 92px; padding: 16px; display: flex; flex-direction: column; justify-content: center;
  gap: 6px; border: 1px solid #dde0e4; border-radius: 9px; background: #fff; transition: .15s;
}
.preset-option:hover > span { border-color: #caa4a7; background: #fffafa; }
.preset-option input:checked + span {
  border-color: var(--red); background: var(--red-soft); box-shadow: 0 0 0 2px #b4232f10;
}
.preset-option b { font-size: 12px; }
.preset-option small { color: var(--muted); font-size: 9px; }
.preset-option i {
  position: absolute; right: 8px; top: 8px; padding: 2px 5px;
  border-radius: 99px; color: white; background: var(--red); font-size: 8px; font-style: normal;
}
.compress-result {
  margin-top: 16px; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between;
  border: 1px solid #bcdccb; border-radius: 8px; color: #286c50; background: #f1faf5; font-size: 11px;
}
.compress-result b { font-size: 15px; }
.office-card { max-width: 760px; }
.office-drop { min-height: 178px; }
.conversion-info {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px;
}
.conversion-info span {
  padding: 9px; border-radius: 7px; color: #39715a; background: #f1f8f4;
  text-align: center; font-size: 10px;
}
.quality-note {
  margin-top: 16px; padding: 13px 15px; border-left: 3px solid #2b579a;
  border-radius: 4px 8px 8px 4px; background: #f3f6fb;
}
.quality-note b { color: #3f4e68; font-size: 11px; }
.quality-note p { margin: 4px 0 0; color: #777c85; font-size: 9px; line-height: 1.5; }
.quality-note.neutral { border-left-color: #8b78b8; background: #f7f5fb; }

.organize-view { padding: 10px 16px 12px; }
.organize-view.active { display: flex; flex-direction: column; overflow: hidden; }
.organize-view .utility-header, .organize-card { max-width: 1400px; }
.organize-view .utility-header { flex: 0 0 38px; width: 100%; margin-bottom: 8px; }
.organize-view .utility-header .tool-icon { flex-basis: 36px; width: 36px; height: 36px; }
.organize-view .utility-header h1 { font-size: 18px; }
.organize-view .utility-header p { display: none; }
.organize-card {
  flex: 1 1 auto; width: 100%; min-height: 0; padding: 8px; overflow: hidden;
}
.organize-workspace {
  height: 100%; min-height: 0; display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr);
  gap: 10px;
}
.organize-left {
  min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 8px;
}
.organize-left > .big-drop {
  min-height: 104px; margin: 0; padding: 12px 9px;
}
.organize-left > .big-drop > strong {
  width: 100%; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap;
}
.organize-card.has-document .organize-left > .big-drop {
  min-height: 52px; padding: 6px; flex-direction: row; gap: 6px;
}
.organize-card.has-document .organize-left > .big-drop > span {
  flex: 0 0 28px; width: 28px; height: 28px; font-size: 15px;
}
.organize-card.has-document .organize-left > .big-drop > strong { text-align: left; }
.organize-card.has-document .organize-left > .big-drop > small { display: none; }
.organize-card:not(.has-document) .organize-toolbar,
.organize-card:not(.has-document) .thumbnail-grid,
.organize-card:not(.has-document) .organize-submit { display: none; }
.organize-toolbar {
  display: grid; gap: 5px; color: var(--muted); font-size: 9px;
}
.organize-toolbar > div { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.organize-toolbar .ghost { padding: 6px 4px; font-size: 9px; }
.thumbnail-grid {
  min-height: 0; max-height: none; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); gap: 12px;
  align-content: start; padding: 14px; border-radius: 10px; background: #f2f3f5;
}
.organize-submit {
  width: 100%; padding: 10px; border: 0; border-radius: 7px;
  color: white; background: linear-gradient(100deg, var(--red-dark), var(--red));
  font-size: 11px; font-weight: 700;
}
.page-thumb {
  position: relative; min-width: 0; padding: 8px 8px 30px; border: 1px solid #dfe1e4;
  border-radius: 8px; background: white; box-shadow: 0 2px 6px #25282d0d;
  cursor: grab; transition: .15s;
}
.page-thumb:hover { border-color: #c29a9e; box-shadow: 0 4px 12px #25282d18; }
.page-thumb.selected { border-color: var(--red); box-shadow: 0 0 0 2px #b4232f22; }
.page-thumb.selected::before {
  content: "✓"; position: absolute; z-index: 2; left: 5px; top: 5px;
  display: grid; place-items: center; width: 18px; height: 18px;
  border-radius: 50%; color: white; background: var(--red); font-size: 10px;
}
.page-thumb.dragging { opacity: .4; transform: scale(.97); }
.page-thumb.drag-over { border-color: var(--red); box-shadow: 0 0 0 2px #b4232f20; }
.thumb-canvas-wrap {
  height: 145px; display: grid; place-items: center; overflow: hidden;
  border-radius: 4px; background: #eceef0;
}
.thumb-canvas-wrap canvas { max-width: 100%; max-height: 100%; box-shadow: 0 1px 4px #0002; }
.page-thumb .page-label {
  position: absolute; left: 9px; bottom: 9px; color: #62666e; font-size: 9px;
}
.thumb-actions { position: absolute; right: 7px; bottom: 5px; display: flex; gap: 3px; }
.thumb-actions button {
  width: 23px; height: 23px; padding: 0; border: 0; border-radius: 5px;
  color: #696d74; background: #f0f1f3; font-size: 11px;
}
.thumb-actions button:hover { color: var(--red); background: var(--red-soft); }
.thumb-actions button.delete:hover { color: white; background: var(--red); }
.thumb-loading { color: #9a9ea5; font-size: 9px; }
.page-preview-panel {
  min-width: 0; min-height: 0; height: 100%; display: grid;
  grid-template-rows: 34px minmax(0, 1fr) 38px;
  overflow: hidden; border: 1px solid #e0e2e5; border-radius: 10px; background: #fff;
}
.preview-toolbar, .preview-footer {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 10px; border-bottom: 1px solid #eceef0; color: #545860; font-size: 10px;
}
.preview-toolbar strong { min-width: 100px; text-align: center; font-size: 11px; }
.preview-canvas-area {
  position: relative; min-height: 0; overflow: auto; display: grid; place-items: center;
  padding: 18px; background: #e9ebee;
}
.preview-canvas-area canvas {
  display: block; max-width: none; max-height: none; background: white;
  box-shadow: 0 4px 18px #23262b26;
}
.preview-footer { justify-content: space-between; border-top: 1px solid #eceef0; border-bottom: 0; }
.preview-footer > div, .preview-zoom { display: flex; align-items: center; gap: 5px; }
.preview-footer .ghost { padding: 5px 7px; }
.preview-zoom span { min-width: 38px; color: #767a82; text-align: center; font-size: 9px; }
.preview-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 7px; color: #8b8f96;
}
.preview-empty span {
  display: grid; place-items: center; width: 56px; height: 70px;
  border: 1px solid #c9cdd2; border-radius: 6px; color: #a2a6ad; background: #f7f8f9;
  font-size: 11px; font-weight: 800;
}
.preview-empty strong { color: #686c73; font-size: 12px; }
.preview-empty small { font-size: 9px; }
.global-progress {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 9px; color: white; background: #15171bd9;
  backdrop-filter: blur(2px);
}
.global-progress strong { font-size: 14px; }
.global-progress small { opacity: .65; font-size: 10px; }
.spinner {
  width: 30px; height: 30px; border: 3px solid #ffffff45; border-top-color: white;
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .site-shell { grid-template-columns: 168px minmax(0, 1fr); }
  .organize-workspace { grid-template-columns: minmax(170px, 1fr) minmax(0, 3fr); }
}
