* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #202124;
  background: #f5f7fa;
  font-family: "Microsoft JhengHei", "PingFang TC", Arial, sans-serif;
}

.app {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto;
}

.upload-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 190px;
  padding: 28px;
  border: 2px dashed #6f8fb8;
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-area.dragging {
  border-color: #2563eb;
  background: #eef5ff;
}

h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.25;
}

p {
  margin: 0;
  color: #5f6b7a;
  line-height: 1.6;
}

.file-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: #2563eb;
  cursor: pointer;
  font-weight: 700;
}

.file-button input {
  display: none;
}

.status-box {
  margin: 18px 0;
  padding: 12px 14px;
  border-radius: 6px;
  background: #ffffff;
  color: #3f4a59;
  border: 1px solid #d9e1ec;
}

.result-list {
  display: grid;
  gap: 18px;
}

.file-card {
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.file-header {
  padding: 16px 18px;
  border-bottom: 1px solid #e6edf5;
  background: #fbfcfe;
}

.file-header h2 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.35;
  word-break: break-word;
}

.file-header span {
  color: #64748b;
  font-size: 14px;
}

.sheet-block {
  padding: 18px;
}

.sheet-block + .sheet-block {
  border-top: 1px solid #e6edf5;
}

.sheet-block h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #e3e8ef;
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  background: #ffffff;
}

th,
td {
  max-width: 280px;
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f6;
  border-right: 1px solid #edf1f6;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef3f8;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

th:last-child,
td:last-child {
  border-right: 0;
}

.empty-note {
  margin: 0;
  color: #8a5a00;
}

@media (max-width: 720px) {
  .app {
    width: min(100% - 20px, 1180px);
    margin: 16px auto;
  }

  .upload-area {
    align-items: stretch;
    flex-direction: column;
    padding: 20px;
  }

  h1 {
    font-size: 24px;
  }

  .file-button {
    width: 100%;
  }
}
