:root {
  --rose: #C4A5A0;
  --rose-deep: #A9837D;
  --warm: #FAFAF8;
  --ink: #2B2624;
  --ink-soft: #6B615C;
  --line: #E5DCD8;
  --ok: #4E7A51;
  --err: #B0483F;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: var(--warm);
  color: var(--ink);
  min-height: 100vh;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 44px 32px 40px; }

/* ---------- 头部 ---------- */
.head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 34px; }
.brand h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 44px; font-weight: 700; letter-spacing: .5px;
}
.brand .arrow { color: var(--rose); margin: 0 6px; }
.sub { color: var(--ink-soft); font-size: 14px; margin-top: 6px; }
.badge {
  font-size: 12px; font-weight: 600; color: var(--rose-deep);
  border: 1.5px solid var(--rose); border-radius: 999px; padding: 4px 14px;
}

/* ---------- 拖放区 ---------- */
.drop {
  border: 2.5px dashed var(--rose);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.drop:hover, .drop.dragover {
  background: #F6EEEC;
  border-color: var(--rose-deep);
  transform: translateY(-1px);
}
.drop-inner { padding: 56px 24px; text-align: center; }
.ico { width: 56px; height: 56px; margin-bottom: 14px; }
.drop-title { font-size: 19px; font-weight: 600; }
.drop-hint { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
.drop.busy { pointer-events: none; opacity: .55; }

/* ---------- 保存位置栏 ---------- */
.save-bar {
  margin-top: 18px;
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 18px;
}
.save-ico { flex: 0 0 22px; width: 22px; height: 22px; }
.save-label { font-size: 14px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.save-path {
  flex: 1; min-width: 0;
  font-size: 13.5px; font-family: 'Consolas', 'Segoe UI', monospace;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  direction: ltr;
}
.save-bar .btn-ghost { flex: 0 0 auto; padding: 7px 18px; }

/* ---------- 保存结果 toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 18px);
  background: var(--ink); color: #fff;
  font-size: 13.5px; line-height: 1.4;
  padding: 11px 20px; border-radius: 9px;
  max-width: min(760px, 86vw);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s;
  z-index: 99;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 转换队列 ---------- */
.files { margin-top: 26px; }
.files-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.files-title { font-size: 15px; font-weight: 600; }
.btn-ghost {
  background: none; border: 1.5px solid var(--rose); color: var(--rose-deep);
  font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 6px 16px; border-radius: 8px; cursor: pointer;
  transition: background .15s;
}
.btn-ghost:hover { background: #F6EEEC; }

.file-row {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 18px; margin-bottom: 8px;
}
.file-row[data-state="done"] { border-color: #CFE0D0; }
.file-row[data-state="fail"] { border-color: #E5C4C0; background: #FBF3F2; }
.f-name {
  flex: 0 1 300px; min-width: 120px;
  font-weight: 600; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.f-state { flex: 1; font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.file-row[data-state="done"] .f-state { color: var(--ok); }
.file-row[data-state="fail"] .f-state { color: var(--err); }
.f-bar {
  flex: 0 0 140px; height: 8px; background: #EFE7E4;
  border-radius: 5px; overflow: hidden;
}
.f-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--rose), var(--rose-deep));
  border-radius: 5px; transition: width .25s;
}
.file-row[data-state="done"] .f-fill { background: var(--ok); }
.f-acts { display: flex; gap: 8px; }
.btn-mini {
  background: #fff; border: 1.5px solid var(--rose); color: var(--rose-deep);
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  padding: 6px 14px; border-radius: 7px; cursor: pointer;
  transition: background .15s;
}
.btn-mini:hover { background: #F6EEEC; }
.btn-mini-p { background: var(--rose); border-color: var(--rose); color: #fff; }
.btn-mini-p:hover { background: var(--rose-deep); }

/* ---------- 预览 ---------- */
.preview-section { margin-top: 26px; }
.preview-frame {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  overflow: auto;
  max-height: 720px;
}
.sheet-wrap { position: relative; width: fit-content; min-width: 100%; }
.sheet-wrap img { position: absolute; pointer-events: none; }
.sheet-table { border-collapse: collapse; table-layout: fixed; }
.sheet-table td {
  border: 1px solid #EDE6E2;
  vertical-align: top;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: hidden;
  padding: 2px 4px;
  line-height: 1.25;
  font-family: 'Calibri', 'Segoe UI', sans-serif;
  color: #1f1b19;
}

/* ---------- 页脚 ---------- */
.foot { margin-top: 44px; border-top: 1px solid var(--line); padding-top: 18px; }
.foot p { font-size: 12.5px; color: var(--ink-soft); }

.hidden { display: none !important; }

.sheet-label {
  font-size: 13px; font-weight: 600; color: #8a6f68;
  margin: 18px 0 8px 2px;
}
